JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbryookassa-sdk-validator/composer.json000064400000001551150364342670013675 0ustar00{ "name": "yoomoney/yookassa-sdk-validator", "description": "This is a developer tool for validating with YooMoney.", "type": "library", "license": "MIT", "authors": [ { "name": "YooMoney", "email": "cms@yoomoney.ru" } ], "dist": { "type": "zip", "url": "https://git.yoomoney.ru/rest/api/latest/projects/SDK/repos/yookassa-sdk-validator-php/archive?at=refs%2Ftags%2F1.0.1&format=zip" }, "version": "1.0.1", "require": { "php": ">=8.0.0", "ext-mbstring": "*" }, "require-dev": { "ext-xml": "*", "phpunit/phpunit": "^9.6" }, "autoload": { "psr-4": { "YooKassa\\Validator\\": "src/" } }, "autoload-dev": { "psr-4": { "Tests\\YooKassa\\Validator\\": "tests/" } } } yookassa-sdk-validator/tests/Fixtures/ArrayAccessClass.php000064400000001504150364342670020023 0ustar00container = [ "one" => 1, "two" => 2, "three" => 3, ]; } public function offsetSet($offset, $value) { if (is_null($offset)) { $this->container[] = $value; } else { $this->container[$offset] = $value; } } public function offsetExists($offset): bool { return isset($this->container[$offset]); } public function offsetUnset($offset) { unset($this->container[$offset]); } public function offsetGet($offset) { return $this->container[$offset] ?? null; } }yookassa-sdk-validator/tests/Fixtures/IteratorAggregateClass.php000064400000000570150364342670021225 0ustar00property = $value; } public function getIterator(): ArrayIterator { return new ArrayIterator($this); } }yookassa-sdk-validator/tests/Fixtures/ClassWithConstraints.php000064400000000437150364342670020772 0ustar00prop = $propVal; } }yookassa-sdk-validator/tests/Constraints/AllTypeValidatorTest.php000064400000003162150364342670021415 0ustar00getInstance(); $this->assertNull($instance->validate($value, new AllType(ClassWithConstraints::class))); } public function validDataProvider() { return [ ['value' => []], ['value' => null], ['value' => new IteratorAggregateClass(new ClassWithConstraints)] ]; } /** * @dataProvider invalidDataProvider */ public function testInvalidValidate($value) { $instance = $this->getInstance(); $this->expectException(ValidatorParameterException::class); $instance->validate($value, new AllType('string')); } public function invalidDataProvider(): array { return [ ['value' => new ArrayAccessClass], ['value' => 123], ['value' => 'test'], ['value' => 123.123], ['value' => new stdClass()] ]; } } yookassa-sdk-validator/tests/Constraints/ValidValidatorTest.php000064400000003237150364342670021105 0ustar00getInstance(); if ($value !== null) { $this->expectException(EmptyPropertyValueException::class); $instance->validate($value, new Valid); } else { $this->assertNull($instance->validate($value, new Valid)); } } public function validDataProvider(): array { return [ [null], [new IteratorAggregateClass(new ClassWithConstraints())], [[new ClassWithConstraints]], [new ClassWithConstraints] ]; } /** * @dataProvider invalidDataProvider */ public function testInvalidValidate($value) { $instance = $this->getInstance(); $this->expectException(ValidatorParameterException::class); $instance->validate($value, new Valid); } public function invalidDataProvider(): array { return [ [123], [123.123], ['test'] ]; } }yookassa-sdk-validator/tests/Constraints/NotNullTest.php000064400000001613150364342670017567 0ustar00getInstance($message); if ($message === null) { $this->assertNotEmpty($instance->getMessage()); } else { $this->assertSame($message, $instance->getMessage()); } } public function validDataProvider(): array { return [ [['message' => 'Some error message']], [['message' => null]], ]; } } yookassa-sdk-validator/tests/Constraints/NotNullValidatorTest.php000064400000001324150364342670021434 0ustar00getInstance(); $this->assertNull($instance->validate('NotNull', $constraint)); $this->expectException(EmptyPropertyValueException::class); $instance->validate(null, $constraint); } } yookassa-sdk-validator/src/Exceptions/InvalidPropertyValueTypeException.php000064400000003766150364342670023457 0ustar00type = 'null'; } elseif (is_object($value)) { $this->type = get_class($value); } else { $this->type = gettype($value); } } /** * @return string */ public function getType(): string { return $this->type; } } yookassa-sdk-validator/src/Exceptions/InvalidPropertyValueException.php000064400000003567150364342670022614 0ustar00invalidValue = $value; } } /** * @return mixed */ public function getValue(): mixed { return $this->invalidValue; } } yookassa-sdk-validator/src/Exceptions/ValidatorParameterException.php000064400000002367150364342670022247 0ustar00propertyName = $property; } /** * @return string */ public function getProperty(): string { return $this->propertyName; } } yookassa-sdk-validator/src/Validator.php000064400000006275150364342670014410 0ustar00object = $object; $this->parsePropRules(); } /** * @param string $propertyName * @param mixed $propertyValue * @throws \InvalidArgumentException * @return void */ public function validatePropertyValue(string $propertyName, mixed $propertyValue, ?array $filter = []): void { if (!isset($this->propRules[$propertyName])) { return; } foreach ($this->propRules[$propertyName] as $constraint) { if (!empty($filter) && in_array($constraint::class, $filter)) { continue; } $validator = $constraint->validatedBy(); $validator = new $validator($this->object::class, $propertyName); $validator->validate($propertyValue, $constraint); } } /** * @return void * @throws \InvalidArgumentException */ public function validateAllProperties(): void { foreach($this->propValues as $propName => $propValue) { $this->validatePropertyValue($propName, $propValue); } } /** * @param string $propName * @return array|null */ public function getRulesByPropName(string $propName): ?array { return $this->propRules[$propName] ?? null; } /** * @return void */ private function parsePropRules(): void { $reflector = new \ReflectionObject($this->object); foreach ($reflector->getProperties() as $property) { $property->setAccessible(true); if ($property->isInitialized($this->object)) { $this->propValues[$property->getName()] = $property->getValue($this->object); } foreach ($property->getAttributes() as $attribute) { $this->propRules[$property->getName()][] = $attribute->newInstance(); } } } }yookassa-sdk-validator/src/Constraints/IpValidator.php000064400000005741150364342670017205 0ustar00getVersion()) { Ip::V4 => \FILTER_FLAG_IPV4, Ip::V6 => \FILTER_FLAG_IPV6, Ip::V4_NO_PRIV => \FILTER_FLAG_IPV4 | \FILTER_FLAG_NO_PRIV_RANGE, Ip::V6_NO_PRIV => \FILTER_FLAG_IPV6 | \FILTER_FLAG_NO_PRIV_RANGE, Ip::ALL_NO_PRIV => \FILTER_FLAG_NO_PRIV_RANGE, Ip::V4_NO_RES => \FILTER_FLAG_IPV4 | \FILTER_FLAG_NO_RES_RANGE, Ip::V6_NO_RES => \FILTER_FLAG_IPV6 | \FILTER_FLAG_NO_RES_RANGE, Ip::ALL_NO_RES => \FILTER_FLAG_NO_RES_RANGE, Ip::V4_ONLY_PUBLIC => \FILTER_FLAG_IPV4 | \FILTER_FLAG_NO_PRIV_RANGE | \FILTER_FLAG_NO_RES_RANGE, Ip::V6_ONLY_PUBLIC => \FILTER_FLAG_IPV6 | \FILTER_FLAG_NO_PRIV_RANGE | \FILTER_FLAG_NO_RES_RANGE, Ip::ALL_ONLY_PUBLIC => \FILTER_FLAG_NO_PRIV_RANGE | \FILTER_FLAG_NO_RES_RANGE, default => 0, }; if (!filter_var($value, \FILTER_VALIDATE_IP, $flag)) { throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMessage()), 0, $this->getPropClassConcat(), $value ); } } }yookassa-sdk-validator/src/Constraints/GreaterThan.php000064400000002662150364342670017172 0ustar00 $value2; } }yookassa-sdk-validator/src/Constraints/LessThanValidator.php000064400000002572150364342670020355 0ustar00min = $min; $this->max = $max; $this->exactMessage = $exactMessage ?? $this->exactMessage; $this->minMessage = $minMessage ?? $this->minMessage; $this->maxMessage = $maxMessage ?? $this->maxMessage; $this->charset = $charset ?? $this->charset; } /** * @return string */ public function getMaxMessage(): string { return str_replace('{{ limit }}', $this->max, $this->maxMessage); } /** * @return string */ public function getMinMessage(): string { return str_replace('{{ limit }}', $this->min, $this->minMessage); } /** * @return string */ public function getExactMessage(): string { return str_replace('{{ limit }}', $this->min, $this->exactMessage); } /** * @return string */ public function getCharsetMessage(): string { return str_replace('{{ charset }}', $this->min, $this->charsetMessage); } /** * @return string|null */ public function getMax(): ?string { return $this->max; } /** * @return string|null */ public function getMin(): ?string { return $this->min; } /** * @return string */ public function getCharset(): string { return $this->charset; } }yookassa-sdk-validator/src/Constraints/Type.php000064400000003765150364342670015714 0ustar00message = $message ?? $this->message; $this->type = $type; } /** * @return string|array */ public function getType(): string|array { return $this->type; } /** * @return string */ public function getMessage(): string { $type = is_array($this->type) ? implode(', ', $this->type) : $this->type; return str_replace('{{ type }}', $type, $this->message); } }yookassa-sdk-validator/src/Constraints/Count.php000064400000005040150364342670016047 0ustar00min = $min; $this->max = $max; if (null === $this->min && null === $this->max) { throw new ValidatorParameterException('Either option "min", "max" must be given for constraint'); } } /** * @return int|null */ public function getMin(): ?int { return $this->min; } /** * @return int|null */ public function getMax(): ?int { return $this->max; } /** * @return string */ public function getMinMessage(): string { return str_replace('{{ limit }}', $this->min, $this->minMessage); } /** * @return string */ public function getMaxMessage(): string { return str_replace('{{ limit }}', $this->max, $this->maxMessage); } }yookassa-sdk-validator/src/Constraints/TimeValidator.php000064400000005346150364342670017534 0ustar00= 0 && $hour < 24 && $minute >= 0 && $minute < 60 && $second >= 0 && $second < 60; } /** * @throws InvalidPropertyValueException|ValidatorParameterException */ public function validate(mixed $value, Time $constraint): void { if (null === $value || '' === $value || $value instanceof \DateTime) { return; } if (!\is_scalar($value) && !$value instanceof \Stringable) { throw new ValidatorParameterException('Value must be scalar or type of \Stringable'); } $value = (string) $value; if (!preg_match(static::PATTERN, $value, $matches)) { throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMessage()), 0, $this->getPropClassConcat(), $value ); } if (!self::checkTime($matches[1], $matches[2], $matches[3])) { throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMessage()), 0, $this->getPropClassConcat(), $value ); } } }yookassa-sdk-validator/src/Constraints/EmailValidator.php000064400000006151150364342670017660 0ustar00 self::PATTERN_LOOSE, Email::VALIDATION_MODE_HTML5 => self::PATTERN_HTML5, Email::VALIDATION_MODE_HTML5_ALLOW_NO_TLD => self::PATTERN_HTML5_ALLOW_NO_TLD, ]; /** * @throws InvalidPropertyValueException|ValidatorParameterException */ public function validate(mixed $value, Email $constraint): void { if (null === $value || '' === $value) { return; } if (!\is_scalar($value) && !$value instanceof \Stringable) { throw new ValidatorParameterException('Value must be scalar or type of \Stringable'); } $value = (string) $value; if ('' === $value) { return; } if (!\in_array($constraint->getMode(), Email::VALIDATION_MODES, true)) { throw new ValidatorParameterException( sprintf('The "%s::$mode" parameter value is not valid.', get_debug_type($constraint)) ); } if (!preg_match(self::EMAIL_PATTERNS[$constraint->getMode()], $value)) { throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMessage()), 0, $this->getPropClassConcat(), $value ); } } }yookassa-sdk-validator/src/Constraints/Valid.php000064400000002554150364342670016025 0ustar00generateMessage(self::EMPTY_PROP_VALUE_TMPL, $constraint->getMessage()) ); } } }yookassa-sdk-validator/src/Constraints/AbstractConstraint.php000064400000002467150364342670020601 0ustar00choices = $choices; $this->callback = $callback ?? $this->callback; $this->multiple = $multiple ?? $this->multiple; $this->message = $message ?? $this->message; $this->multipleMessage = $multipleMessage ?? $this->multipleMessage; $this->match = $match ?? $this->match; } /** * @return string */ public function getMessage(): string { return $this->message; } /** * @return array|null */ public function getChoices(): ?array { return $this->choices; } /** * @return bool */ public function isMultiple(): bool { return $this->multiple; } /** * @return bool */ public function isMatch(): bool { return $this->match; } /** * @return string */ public function getMultipleMessage(): string { return $this->multipleMessage; } /** * @return callable|string|null */ public function getCallback(): callable|string|null { return $this->callback; } }yookassa-sdk-validator/src/Constraints/GreaterThanOrEqualValidator.php000064400000002561150364342670022327 0ustar00= $value2; } }yookassa-sdk-validator/src/Constraints/Json.php000064400000003207150364342670015673 0ustar00message = $message ?? $this->message; } /** * @return string */ public function getMessage(): string { return $this->message; } }yookassa-sdk-validator/src/Constraints/UrlValidator.php000064400000006474150364342670017403 0ustar00isRelativeProtocol() ? str_replace('(%s):', '(?:(%s):)?', static::PATTERN) : static::PATTERN; $pattern = sprintf($pattern, implode('|', $constraint->getProtocols())); if (!preg_match($pattern, $value)) { throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMessage()), 0, $this->getPropClassConcat(), $value ); } } }yookassa-sdk-validator/src/Constraints/GreaterThanOrEqual.php000064400000002705150364342670020461 0ustar00version = $version ?? $this->version; $this->message = $message ?? $this->message; } /** * @return string */ public function getVersion(): string { return $this->version; } /** * @return string */ public function getMessage(): string { return $this->message; } }yookassa-sdk-validator/src/Constraints/DateValidator.php000064400000005445150364342670017513 0ustar00\d{4})-(?\d{2})-(?\d{2})$/'; public static function checkDate(int $year, int $month, int $day): bool { return checkdate($month, $day, $year); } /** * @throws InvalidPropertyValueException|ValidatorParameterException */ public function validate(mixed $value, Date $constraint): void { if (null === $value || '' === $value || $value instanceof \DateTime) { return; } if (!\is_scalar($value) && !$value instanceof \Stringable) { throw new ValidatorParameterException('Value must be scalar or type of \Stringable'); } $value = (string) $value; if (!preg_match(static::PATTERN, $value, $matches)) { throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMessage()), 0, $this->getPropClassConcat(), $value ); } if (!self::checkDate( $matches['year'] ?? $matches[1], $matches['month'] ?? $matches[2], $matches['day'] ?? $matches[3] )) { throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMessage()), 0, $this->getPropClassConcat(), $value ); } } }yookassa-sdk-validator/src/Constraints/AbstractComparisonValidator.php000064400000004361150364342670022430 0ustar00getValue(); if (\is_string($comparedValue) && $value instanceof \DateTimeInterface) { $dateTimeClass = $value instanceof \DateTimeImmutable ? \DateTimeImmutable::class : \DateTime::class; $comparedValue = new $dateTimeClass($comparedValue); } if (!$this->compareValues($value, $comparedValue)) { throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMessage()), 0, $this->getPropClassConcat(), $value ); } } abstract protected function compareValues(mixed $value1, mixed $value2): bool; }yookassa-sdk-validator/src/Constraints/AbstractComparison.php000064400000003261150364342670020560 0ustar00message = $message ?? $this->message; $this->value = $value; } public function getValue(): mixed { return $this->value; } /** * @return string */ public function getMessage(): string { return str_replace('{{ compared_value }}', $this->value, $this->message); } }yookassa-sdk-validator/src/Constraints/AllType.php000064400000003122150364342670016330 0ustar00type = $type; } /** * @return string */ public function getType(): string { return $this->type; } }yookassa-sdk-validator/src/Constraints/JsonValidator.php000064400000004157150364342670017546 0ustar00generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMessage()), 0, $this->getPropClassConcat(), $value ); } } }yookassa-sdk-validator/src/Constraints/RegexValidator.php000064400000003507150364342670017705 0ustar00getPattern(), $value)) { throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMessage()), 0, $this->getPropClassConcat(), $value ); } } }yookassa-sdk-validator/src/Constraints/NotNull.php000064400000003210150364342670016347 0ustar00message = $message ?? $this->message; } /** * @return string */ public function getMessage(): string { return $this->message; } }yookassa-sdk-validator/src/Constraints/NotBlank.php000064400000003212150364342670016466 0ustar00message = $message ?? $this->message; } /** * @return string */ public function getMessage(): string { return $this->message; } }yookassa-sdk-validator/src/Constraints/Url.php000064400000004304150364342670015523 0ustar00message = $message ?? $this->message; $this->protocols = $protocols ?? $this->protocols; $this->relativeProtocol = $relativeProtocol ?? $this->relativeProtocol; } /** * @return string */ public function getMessage(): string { return $this->message; } /** * @return array */ public function getProtocols(): array { return $this->protocols; } /** * @return bool */ public function isRelativeProtocol(): bool { return $this->relativeProtocol; } }yookassa-sdk-validator/src/Constraints/LessThanOrEqual.php000064400000002677150364342670020006 0ustar00 'is_bool', 'boolean' => 'is_bool', 'int' => 'is_int', 'integer' => 'is_int', 'long' => 'is_int', 'float' => 'is_float', 'double' => 'is_float', 'real' => 'is_float', 'numeric' => 'is_numeric', 'string' => 'is_string', 'scalar' => 'is_scalar', 'array' => 'is_array', 'iterable' => 'is_iterable', 'countable' => 'is_countable', 'callable' => 'is_callable', 'object' => 'is_object', 'resource' => 'is_resource', 'null' => 'is_null', 'alnum' => 'ctype_alnum', 'alpha' => 'ctype_alpha', 'cntrl' => 'ctype_cntrl', 'digit' => 'ctype_digit', 'graph' => 'ctype_graph', 'lower' => 'ctype_lower', 'print' => 'ctype_print', 'punct' => 'ctype_punct', 'space' => 'ctype_space', 'upper' => 'ctype_upper', 'xdigit' => 'ctype_xdigit', ]; /** * @throws InvalidPropertyValueTypeException */ public function validate(mixed $value, Type $constraint): void { if (null === $value) { return; } $types = (array) $constraint->getType(); foreach ($types as $type) { $type = strtolower($type); if (isset(self::VALIDATION_FUNCTIONS[$type]) && self::VALIDATION_FUNCTIONS[$type]($value)) { return; } if ($value instanceof $type) { return; } } throw new InvalidPropertyValueTypeException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMessage()), 0, $this->getPropClassConcat(), $value ); } }yookassa-sdk-validator/src/Constraints/ChoiceValidator.php000064400000005634150364342670020030 0ustar00isMultiple() && !\is_array($value)) { throw new ValidatorParameterException('Value must be type of array.'); } if (null === $value) { return; } if ($constraint->getCallback()) { if (!\is_callable($choices = $constraint->getCallback())) { throw new ValidatorParameterException('The Choice constraint expects a valid callback.'); } $choices = $choices(); } else { $choices = $constraint->getChoices(); } if ($constraint->isMultiple()) { foreach ($value as $valueItem) { if ($constraint->isMatch() xor \in_array($valueItem, $choices, true)) { throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMessage()), 0, $this->getPropClassConcat(), $value ); } } } elseif ($constraint->isMatch() xor \in_array($value, $choices)) { throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMultipleMessage()), 0, $this->getPropClassConcat(), $value ); } } }yookassa-sdk-validator/src/Constraints/CountValidator.php000064400000004661150364342670017725 0ustar00getMax() && $count > $constraint->getMax()) { throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMaxMessage()), 0, $this->getPropClassConcat(), $value ); } if (null !== $constraint->getMin() && $count < $constraint->getMin()) { throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMinMessage()), 0, $this->getPropClassConcat(), $value ); } } }yookassa-sdk-validator/src/Constraints/ConstraintValidator.php000064400000004220150364342670020750 0ustar00className = $className; $this->propertyName = $propertyName; } protected function generateMessage(string $message, string $extraMessage = null): string { $message = str_replace(['{{ class }}', '{{ value }}'], [$this->className, $this->propertyName], $message); $message .= $extraMessage ? ('. ' . $extraMessage) : ''; return $message; } protected function getPropClassConcat(): string { return $this->className . '.' . $this->propertyName; } }yookassa-sdk-validator/src/Constraints/LengthValidator.php000064400000005627150364342670020061 0ustar00charset); if ($invalidCharset) { throw new ValidatorParameterException($constraint->getCharsetMessage()); } $length = mb_strlen($value, $constraint->getCharset()); if (null !== $constraint->getMax() && $length > $constraint->getMax()) { $exactlyOptionEnabled = $constraint->getMin() == $constraint->getMax(); $constraintMessage = $exactlyOptionEnabled ? $constraint->getExactMessage() : $constraint->getMaxMessage(); throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraintMessage), 0, $this->getPropClassConcat(), $value ); } if (null !== $constraint->getMin() && $length < $constraint->getMin()) { $exactlyOptionEnabled = $constraint->getMin() == $constraint->getMax(); $constraintMessage = $exactlyOptionEnabled ? $constraint->getExactMessage() : $constraint->getMinMessage(); throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraintMessage), 0, $this->getPropClassConcat(), $value ); } } }yookassa-sdk-validator/src/Constraints/ValidValidator.php000064400000003601150364342670017665 0ustar00validateAllProperties(); } } }yookassa-sdk-validator/src/Constraints/NotBlankValidator.php000064400000003244150364342670020341 0ustar00generateMessage(self::EMPTY_PROP_VALUE_TMPL, $constraint->getMessage()) ); } } }yookassa-sdk-validator/src/Constraints/LessThanOrEqualValidator.php000064400000002556150364342670021650 0ustar00message = $message ?? $this->message; } /** * @return string */ public function getMessage(): string { return $this->message; } }yookassa-sdk-validator/src/Constraints/Email.php000064400000004321150364342670016007 0ustar00mode = $mode ?? $this->mode; $this->message = $message ?? $this->message; } /** * @return string */ public function getMessage(): string { return $this->message; } /** * @return string */ public function getMode(): string { return $this->mode; } }yookassa-sdk-validator/src/Constraints/AllTypeValidator.php000064400000003727150364342670020211 0ustar00getType()); $typeValidator = new TypeValidator($this->className, $this->propertyName); $typeValidator->validate($item, $typeConstraint); } } }yookassa-sdk-validator/src/Constraints/DateTimeValidator.php000064400000004451150364342670020326 0ustar00getFormat(), $value); $errors = \DateTime::getLastErrors() ?: ['error_count' => 0, 'warnings' => []]; if (0 < $errors['error_count']) { throw new InvalidPropertyValueException( $this->generateMessage(self::INVALID_PROP_VALUE_TMPL, $constraint->getMessage()), 0, $this->getPropClassConcat(), $value ); } } }yookassa-sdk-validator/src/Constraints/Regex.php000064400000003514150364342670016035 0ustar00message = $message ?? $this->message; $this->pattern = $pattern; } /** * @return string */ public function getPattern(): string { return $this->pattern; } /** * @return string */ public function getMessage(): string { return $this->message; } }yookassa-sdk-validator/src/Constraints/LessThan.php000064400000002654150364342670016510 0ustar00message = $message ?? $this->message; $this->format = $format ?? $this->format; } /** * @return string */ public function getFormat(): string { return $this->format; } /** * @return string */ public function getMessage(): string { return $this->message; } }yookassa-sdk-validator/src/Constraints/Date.php000064400000003206150364342670015636 0ustar00message = $message ?? $this->message; } /** * @return string */ public function getMessage(): string { return $this->message; } }yookassa-sdk-validator/README.md000064400000011456150364342670012437 0ustar00# YooKassa API PHP Validator [![Latest Stable Version](https://img.shields.io/packagist/v/yoomoney/yookassa-sdk-validator?label=stable)](https://packagist.org/packages/yoomoney/yookassa-sdk-validator) [![Total Downloads](https://img.shields.io/packagist/dt/yoomoney/yookassa-sdk-validator)](https://packagist.org/packages/yoomoney/yookassa-sdk-validator) [![Monthly Downloads](https://img.shields.io/packagist/dm/yoomoney/yookassa-sdk-validator)](https://packagist.org/packages/yoomoney/yookassa-sdk-validator) [![License](https://img.shields.io/packagist/l/yoomoney/yookassa-sdk-validator)](https://packagist.org/packages/yoomoney/yookassa-sdk-validator) Библиотека для валидирования значений, присваиваемых полям объекта, через чтение атрибутов этих полей. Предназначена для использования в составе [YooKassa API PHP Client Library](https://git.yoomoney.ru/projects/SDK/repos/yookassa-sdk-php/browse) ## Требования PHP 8.0 (и выше) ## Установка ### В консоли с помощью Composer 1. [Установите менеджер пакетов Composer](https://getcomposer.org/download/). 2. В консоли выполните команду: ```bash composer require yoomoney/yookassa-sdk-validator ``` ### В файле composer.json своего проекта 1. Добавьте строку `"yoomoney/yookassa-sdk-validator": "^1.0"` в список зависимостей вашего проекта в файле composer.json: ``` ... "require": { "php": ">=8.0", "yoomoney/yookassa-sdk-validator": "^1.0" ... ``` 2. Обновите зависимости проекта. В консоли перейдите в каталог, где лежит composer.json, и выполните команду: ```bash composer install ``` 3. В коде вашего проекта подключите автозагрузку файлов валидатора: ```php require __DIR__ . '/vendor/autoload.php'; ``` ## Начало работы 1. Импортируйте нужные классы валидатора: ```php use YooKassa\Validator\Validator; use YooKassa\Validator\Constraints as Assert; ``` 2. Добавьте нужные правила для валидации полей класса через атрибуты: ```php #[Assert\NotBlank] #[Assert\Length(min: 2)] private string $title; ``` 3. Создайте экземпляр валидатора, передав в конструктор экземпляр класса, поля которого необходимо валидировать: ```php $validator = new Validator($this); ``` 4. Вызовите функцию validatePropertyValue(), передав в нее название валидируемого поля и значение: ```php $validator->validatePropertyValue('title', $title); ``` 5. Если значение не будет соответствовать правилам, заданным через атрибуты, валидатор выбросит исключение. Чтобы пропустить проверку по какому-либо правилу или списку правил, заданному для поля класса, передайте массив с именами классов-правил в качестве параметра в функцию validatePropertyValue: ```php $validator->validatePropertyValue('title', $title, [Assert\Length::class]); ``` Чтобы получить список правил для конкретного поля, вызовите функцию getRulesByPropName(), передав в качестве параметра название поля: ```php $constraintsList = $validator->getRulesByPropName('title'); ``` ## Example ```php validator = new Validator($this); } public function setTitle(?string $title): PaymentItemModel { $this->validator->validatePropertyValue('title', $title); $this->title = $title; return $this; } } $paymentItem = new PaymentItemModel(); try { // Валидатор не выбросит исключение $paymentItem->setTitle('title'); echo 'success!'; } catch (Exception $exception) { var_dump($exception->getMessage()); } try { // Валидатор выбросит исключение $paymentItem->setTitle('titl'); } catch (Exception $exception) { echo 'fail!'; var_dump($exception->getMessage()); } ```yookassa-sdk-validator/LICENSE.md000064400000002073150364342670012557 0ustar00 The MIT License Copyright (c) 2023 "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. yookassa-sdk-validator/CHANGELOG.md000064400000000172150364342670012762 0ustar00### v1.0.1 от 23.06.2023 * Изменения в текстах ### v1.0.0 от 05.06.2023 * Первая версия yookassa-sdk-validator/.gitignore000064400000000051150364342670013135 0ustar00/vendor/ .idea composer.lock phpunit.xml yookassa-sdk-php/composer.json000064400000003276150364342670012505 0ustar00{ "name": "yoomoney/yookassa-sdk-php", "description": "This is a developer tool for integration with YooMoney.", "type": "library", "license": "MIT", "homepage": "https://yookassa.ru/developers/api", "keywords": ["yoomoney", "yookassa", "payments", "api", "sdk"], "authors": [ { "name": "YooMoney", "email": "cms@yoomoney.ru" } ], "dist": { "type": "zip", "url": "https://git.yoomoney.ru/rest/api/latest/projects/SDK/repos/yookassa-sdk-php/archive?at=refs%2Ftags%2F3.1.1&format=zip" }, "version": "3.1.1", "require": { "php": ">=8.0", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", "yoomoney/yookassa-sdk-validator": "^1.0", "php-ds/php-ds": "^1.4", "psr/log": "^2.0 || ^3.0" }, "require-dev": { "ext-xml": "*", "phpunit/phpunit": "^9.6", "mockery/mockery": "^1.5", "php-parallel-lint/php-parallel-lint": "^1.3", "phpmd/phpmd": "^2.13", "friendsofphp/php-cs-fixer": "^3.15", "phpstan/phpstan": "^1.10" }, "scripts": { "test": [ "@phpunit", "@phpcsf", "@phpmd" ], "ci": [ "@phplint", "@phpunit", "@phpcsf", "@phpmd" ], "phplint": "vendor/bin/parallel-lint --exclude vendor/ --exclude .idea/ --exclude tests/ --exclude lsp/ -e php .", "phpunit": "vendor/bin/phpunit --configuration=phpunit.xml.dist", "phpcsf": "vendor/bin/php-cs-fixer fix . --config=.php-cs-fixer.dist.php", "phpmd": "vendor/bin/phpmd --exclude vendor/,.idea/,tests/,lsp/ --suffixes php . text phpmd.xml" }, "autoload": { "psr-4": { "YooKassa\\": "lib/" } }, "autoload-dev": { "psr-4": { "Tests\\YooKassa\\": "tests/" } } } yookassa-sdk-php/tests/Client/fixtures/paymentOptionsFixtures.json000064400000000467150364342670021671 0ustar00{ "items": [ { "payment_method_type": "yoo_money", "confirmation_types": [ "redirect" ], "charge": { "value": "10.00", "currency": "RUB" }, "fee": { "value": "10.00", "currency": "RUB" }, "extra_fee": true } ] }yookassa-sdk-php/tests/Client/fixtures/cancelPaymentFixtures.json000064400000001540150364342670021414 0ustar00{ "id": "1da5c87d-0984-50e8-a7f3-8de646dd9ec9", "status": "succeeded", "error": { "code": "insufficient_funds", "description": "Съешь еще этих мягких французских булок" }, "recipient": { "account_id": "123", "gateway_id": "456" }, "amount": { "value": "10.00", "currency": "RUB" }, "payment_method": { "id": "1da5c87d-0984-50e8-a7f3-8de646dd9ec9", "saved": true, "title": "Основная карта", "type": "qiwi" }, "created_at": "2018-07-18T10:51:18.139Z", "captured_at": "2015-11-19T17:05:31.000Z", "confirmation": { "type": "redirect", "confirmation_url": "https://test.com" }, "refunded_amount": { "value": "10.00", "currency": "RUB" }, "paid": true, "refundable": true, "receipt_registration": "succeeded", "metadata": {} } yookassa-sdk-php/tests/Client/fixtures/createSelfEmployedFixtures.json000064400000000146150364342670022406 0ustar00{ "itn": "123456789012", "phone": "79001002030", "confirmation": { "type": "redirect" } } yookassa-sdk-php/tests/Client/fixtures/personalDataInfoFixtures.json000064400000000457150364342670022070 0ustar00{ "id": "pd-285c0ab7-0003-5000-9000-0e1166498fda", "type": "sbp_payout_recipient", "status": "waiting_for_operation", "created_at": "2021-06-16T13:04:55.633Z", "metadata": { "order_id": 37 }, "cancellation_details": { "party": "yoo_money", "reason": "expired_by_timeout" } } yookassa-sdk-php/tests/Client/fixtures/createPersonalDataFixtures.json000064400000000263150364342670022373 0ustar00{ "type": "sbp_payout_recipient", "last_name": "Иванов", "first_name": "Иван", "middle_name": "Иванович", "metadata": { "recipient_id": "37" } } yookassa-sdk-php/tests/Client/fixtures/createDealFixtures.json000064400000000233150364342670020660 0ustar00{ "type": "safe_deal", "fee_moment": "payment_succeeded", "metadata": { "order_id": "37" }, "description": "SAFE_DEAL 123554642-2432FF344R" }yookassa-sdk-php/tests/Client/fixtures/createPaymentErrorsGeneralFixtures.json000064400000001326150364342670024127 0ustar00{ "id": "1da5c87d-0984-50e8-a7f3-8de646dd9ec9", "status": "canceled", "paid": false, "refundable": false, "amount": { "value": "20.00", "currency": "RUB" }, "created_at": "2018-07-17T11:14:53.131Z", "metadata": {}, "payment_method": { "type": "bank_card", "id": "1da5c87d-0984-50e8-a7f3-8de646dd9ec9", "saved": false, "card": { "first6": "111111", "last4": "1026", "expiry_month": "12", "expiry_year": "2022", "card_type": "Unknown" }, "title": "Bank card *1026" }, "recipient": { "account_id": "123", "gateway_id": "456" }, "test": true, "cancellation_details": { "party": "yoo_money", "reason": "general_decline" } }yookassa-sdk-php/tests/Client/fixtures/dealsInfoFixtures.json000064400000001167150364342670020542 0ustar00{ "type": "list", "items": [ { "type": "safe_deal", "fee_moment": "deal_closed", "id": "dl-285e5ee7-0022-5000-8000-01516a44b147", "balance": { "value": -45, "currency": "RUB" }, "payout_balance": { "value": 0, "currency": "RUB" }, "status": "closed", "created_at": "2021-06-18T07:28:39.390Z", "expires_at": "2021-09-16T07:28:39.390Z", "metadata": { "order_id": 37 }, "description": "SAFE_DEAL 123554642-2432FF344R", "test": false } ], "next_cursor": "37a5c87d-3984-51e8-a7f3-8de646d39ec15" }yookassa-sdk-php/tests/Client/fixtures/payoutInfoFixtures.json000064400000001256150364342670020772 0ustar00{ "id": "po-285c0ab7-0003-5000-9000-0e1166498fda", "amount": { "value": 400, "currency": "RUB" }, "status": "canceled", "payout_destination": { "type": "bank_card", "card": { "first6": 444444, "last4": 4448, "card_type": "Visa", "issuer_country": "PL", "issuer_name": "Krakowski Bank Spoldzielczy" } }, "description": "Выплата по заказу №37", "created_at": "2021-06-16T13:04:55.633Z", "deal": { "id": "dl-28559370-0022-5000-8000-0b65d8e0e06d" }, "metadata": { "order_id": 37 }, "cancellation_details": { "party": "yoo_money", "reason": "general_decline" }, "test": false } yookassa-sdk-php/tests/Client/fixtures/dealInfoFixtures.json000064400000000706150364342670020355 0ustar00{ "type": "safe_deal", "fee_moment": "payment_succeeded", "id": "dl-285e5ee7-0022-5000-8000-01516a44b147", "balance": { "value": 0, "currency": "RUB" }, "payout_balance": { "value": 0, "currency": "RUB" }, "status": "opened", "created_at": "2021-06-18T07:28:39.390Z", "expires_at": "2021-09-16T07:28:39.390Z", "metadata": { "order_id": 37 }, "description": "SAFE_DEAL 123554642-2432FF344R", "test": false }yookassa-sdk-php/tests/Client/fixtures/paymentInfoFixtures.json000064400000001504150364342670021122 0ustar00{ "id": "1da5c87d-0984-50e8-a7f3-8de646dd9ec9", "status": "succeeded", "error": { "code": "insufficient_funds", "description": "Съешь еще этих мягких французских булок" }, "recipient": { "account_id": "123", "gateway_id": "456" }, "amount": { "value": "10.00", "currency": "RUB" }, "payment_method": { "id": "1da5c87d-0984-50e8-a7f3-8de646dd9ec9", "saved": true, "title": "Основная карта", "type": "qiwi" }, "created_at": "2015-11-19T17:05:07.119Z", "captured_at": "2015-11-19T17:05:31.132Z", "confirmation": { "type": "external" }, "refunded_amount": { "value": "10.00", "currency": "RUB" }, "paid": true, "refundable": true, "test": true, "receipt_registration": "succeeded", "metadata": {} } yookassa-sdk-php/tests/Client/fixtures/refundInfoFixtures.json000064400000000765150364342670020740 0ustar00{ "id": "1ddd77af-0bd7-500d-895b-c475c55fdefc", "payment_id": "1da5c87d-0984-50e8-a7f3-8de646dd9ec9", "status": "succeeded", "error": { "code": "authorization_rejected", "description": "Съешь еще этих мягких французских булок" }, "created_at": "2015-11-19T17:05:07.345Z", "authorized_at": "2015-11-19T17:05:31.867Z", "amount": { "value": "10.00", "currency": "RUB" }, "receipt_registered": "succeeded", "description": "string" } yookassa-sdk-php/tests/Client/fixtures/createPayoutFixtures.json000064400000000462150364342670021300 0ustar00{ "amount": { "value": "320.00", "currency": "RUB" }, "payout_token": "<Синоним банковской карты>", "description": "Выплата по заказу №37", "metadata": { "order_id": "37" }, "deal": { "id": "dl-285e5ee7-0022-5000-8000-01516a44b147" } }yookassa-sdk-php/tests/Client/fixtures/createPaymentFixtures.json000064400000001642150364342670021435 0ustar00{ "id": "1da5c87d-0984-50e8-a7f3-8de646dd9ec9", "status": "succeeded", "error": { "code": "insufficient_funds", "description": "Съешь еще этих мягких французских булок" }, "recipient": { "account_id": "123", "gateway_id": "456" }, "amount": { "value": "10.00", "currency": "RUB" }, "created_at": "2015-11-19T17:05:07.045Z", "captured_at": "2015-11-19T17:05:31.139Z", "payment_method": { "type": "yoo_money", "phone": "89990110101", "account_number": "123456789123" }, "confirmation": { "type": "redirect", "locale": "ru_RU", "enforce": true, "return_url": "https://return.url", "confirmation_url": "https://confirmation.url" }, "refunded_amount": { "value": "10.00", "currency": "RUB" }, "paid": true, "refundable": true, "test": true, "receipt_registration": "succeeded", "metadata": {} } yookassa-sdk-php/tests/Client/fixtures/getPaymentsFixtures.json000064400000002440150364342670021131 0ustar00{ "items": [ { "id": "1da5c87d-0984-50e8-a7f3-8de646dd9ec9", "status": "succeeded", "error": { "code": "insufficient_funds", "description": "Съешь еще этих мягких французских булок" }, "recipient": { "account_id": "123", "gateway_id": "456" }, "amount": { "value": "10.00", "currency": "RUB" }, "reference_id": "719505144571", "created_at": "2015-11-19T17:05:07.129Z", "captured_at": "2015-11-19T17:05:31.135Z", "payment_method": { "type": "yoo_money", "phone": "79990110101", "account_number": "123456789123" }, "confirmation": { "type": "redirect", "enforce": true, "return_url": "https://return.url", "confirmation_url": "https://confirmation.url" }, "charge": { "value": "10.00", "currency": "RUB" }, "income": { "value": "10.00", "currency": "RUB" }, "refunded_amount": { "value": "10.00", "currency": "RUB" }, "paid": true, "refundable": true, "test": true, "receipt_registration": "succeeded", "metadata": {} } ], "next_page": "01234567890ABCDEF" } yookassa-sdk-php/tests/Client/fixtures/getSbpBanksFixtures.json000064400000000217150364342670021034 0ustar00{ "type": "list", "items": [ { "bank_id": "100000000111", "name": "Сбербанк", "bic": "044525225" } ] } yookassa-sdk-php/tests/Client/fixtures/selfEmployedInfoFixtures.json000064400000000467150364342670022104 0ustar00{ "id": "se-d6b9b3fa-0cb8-4aa8-b3c0-254bf0358d4c", "status": "pending", "created_at": "2019-03-12T11:10:41.802Z", "itn": "123456789012", "phone": "79297771234", "confirmation": { "type": "redirect", "confirmation_url": "https://himself-ktr.nalog.ru/settings/partners" }, "test": false } yookassa-sdk-php/tests/Client/fixtures/capturePaymentFixtures.json000064400000001722150364342670021634 0ustar00{ "id": "1da5c87d-0984-50e8-a7f3-8de646dd9ec9", "status": "succeeded", "error": { "code": "insufficient_funds", "description": "Съешь еще этих мягких французских булок" }, "recipient": { "account_id": "123", "gateway_id": "456" }, "amount": { "value": "10.00", "currency": "RUB" }, "payment_method": { "id": "1da5c87d-0984-50e8-a7f3-8de646dd9ec9", "saved": true, "title": "Основная карта", "type": "bank_card", "last4": "3563", "expiry_year": "2023", "expiry_month": "05", "card_type": "MasterCard" }, "created_at": "2015-11-19T17:05:07.139Z", "captured_at": "2015-11-19T17:05:31.756Z", "confirmation": { "type": "embedded", "confirmation_token": "confirmation_token" }, "refunded_amount": { "value": "10.00", "currency": "RUB" }, "paid": true, "refundable": true, "receipt_registration": "succeeded", "metadata": {} } yookassa-sdk-php/tests/Client/fixtures/createReceiptFixtures.json000064400000002157150364342670021415 0ustar00{ "id": "rt_1da5c87d-0984-50e8-a7f3-8de646dd9ec9", "type": "payment", "payment_id": "215d8da0-000f-50be-b000-0003308c89be", "status": "pending", "items": [ { "description": "Мобильный телефон Хувей", "quantity": "1.00", "amount": { "value": "14000.00", "currency": "RUB" }, "vat_code": "2", "payment_mode": "full_payment", "payment_subject": "commodity", "country_of_origin_code": "CN" }, { "description": "Переносное зарядное устройство Хувей", "quantity": "1.00", "amount": { "value": "1000.00", "currency": "RUB" }, "vat_code": "2", "payment_mode": "full_payment", "payment_subject": "commodity", "country_of_origin_code": "CN" } ], "settlements": [ { "type": "prepayment", "amount": { "value": "8000.00", "currency": "RUB" } }, { "type": "prepayment", "amount": { "value": "7000.00", "currency": "RUB" } } ], "tax_system_code": 1 }yookassa-sdk-php/tests/Client/fixtures/createRefundFixtures.json000064400000000765150364342670021250 0ustar00{ "id": "1ddd77af-0bd7-500d-895b-c475c55fdefc", "payment_id": "1da5c87d-0984-50e8-a7f3-8de646dd9ec9", "status": "succeeded", "error": { "code": "authorization_rejected", "description": "Съешь еще этих мягких французских булок" }, "created_at": "2015-11-19T17:05:07.045Z", "authorized_at": "2015-11-19T17:05:31.139Z", "amount": { "value": "10.00", "currency": "RUB" }, "receipt_registered": "succeeded", "description": "string" } yookassa-sdk-php/tests/Client/fixtures/refundsInfoFixtures.json000064400000001613150364342670021114 0ustar00{ "items": [ { "id": "1ddd77af-0bd7-500d-895b-c475c55fdefc", "payment_id": "1da5c87d-0984-50e8-a7f3-8de646dd9ec9", "status": "succeeded", "error": { "code": "authorization_rejected", "description": "Съешь еще этих мягких французских булок" }, "created_at": "2015-11-19T17:05:07.005Z", "authorized_at": "2015-11-19T17:05:31.1019Z", "amount": { "value": "10.00", "currency": "RUB" }, "receipt_registered": "succeeded", "description": "string", "deal": { "id": "dl-285e5ee7-0022-5000-8000-01516a44b147", "refund_settlements": [ { "type": "payout", "amount": { "value": "10.00", "currency": "RUB" } } ] } } ], "next_page": "01234567890ABCDEF" } yookassa-sdk-php/tests/Client/BaseClientTest.php000064400000012375150364342670015725 0ustar00setAuth('123456', 'shopPassword'); self::assertTrue($instance->getApiClient() instanceof ApiClientInterface); } /** * @dataProvider validDataProvider * * @param mixed $apiClient * @param mixed $configLoader */ public function testSetAuthToken($apiClient, $configLoader): void { $instance = self::getInstance($apiClient, $configLoader); $instance->setAuthToken(Random::str(36)); self::assertTrue($instance->getApiClient() instanceof ApiClientInterface); } /** * @dataProvider validConfigurationDataProvider * * @param mixed $value */ public function testSetApiClient($value): void { $instance = self::getInstance(); $client = new CurlClient(); $client->setConnectionTimeout($value['connectionTimeout']); $client->setTimeout($value['timeout']); $client->setProxy($value['proxy']); $client->setConfig($value['config']); $client->setShopId($value['shopId']); $client->setShopPassword($value['shopPassword']); $instance->setApiClient($client); self::assertEquals($client->getConfig(), $instance->getConfig()); self::assertTrue($instance->getApiClient() instanceof ApiClientInterface); } /** * @dataProvider validDataProvider * * @param mixed $apiClient * @param mixed $configLoader */ public function testGetSetConfig($apiClient, $configLoader): void { $config = ['url' => 'test:url']; $instance = self::getInstance($apiClient, $configLoader); $instance->setConfig($config); $client = new CurlClient(); $client->setConfig($config); self::assertEquals($client->getConfig(), $instance->getConfig()); } /** * @dataProvider validIPv4DataProvider * * @param mixed $ip */ public function testIsIPInTrustedRangeValid($ip): void { $instance = self::getInstance(); $checkResult = $instance->isNotificationIPTrusted($ip); self::assertEquals(true, $checkResult); } /** * @dataProvider inValidIPv4DataProvider * * @param mixed $ip */ public function testIsIPInTrustedRangeInValid($ip): void { $instance = self::getInstance(); $checkResult = $instance->isNotificationIPTrusted($ip); self::assertEquals(false, $checkResult); } public static function validDataProvider(): array { return [ [ 'apiClient' => null, 'configLoader' => null, ], [ 'apiClient' => new CurlClient(), 'configLoader' => new ConfigurationLoader(), ], ]; } public static function validConfigurationDataProvider(): array { return [ [ [ 'connectionTimeout' => 10, 'timeout' => 10, 'proxy' => 'proxy_url:8889', 'config' => ['url' => 'test:url'], 'shopId' => 'shopId', 'shopPassword' => 'shopPassword', ], ], [ [ 'connectionTimeout' => 30, 'timeout' => 30, 'proxy' => '123.456.789.5', 'config' => [], 'shopId' => null, 'shopPassword' => null, ], ], ]; } public static function validIPv4DataProvider() { return [ ['185.71.76.' . Random::int(1, 31)], ['185.71.77.' . Random::int(1, 31)], ['77.75.153.' . Random::int(1, 127)], ['77.75.154.' . Random::int(128, 254)], ['77.75.156.11'], ['77.75.156.35'], ['2a02:5180:0000:2669:0000:0000:0000:7d35'], ['2a02:5180:0000:2655:0000:0000:7d35:0000'], ['2a02:5180:0000:1533:0000:7d35:0000:0000'], ['2a02:5180:0000:2669:7d35:0000:0000:0000'], ]; } public static function inValidIPv4DataProvider() { return [ ['185.71.76.32'], ['185.71.77.32'], ['185.71.153.128'], ['185.71.154.' . Random::int(1, 128)], ['127.0.0.1'], ['77.75.156.12'], ['192.168.1.1'], ['8701:746f:d4f1:d39d:9dcc:6ea2:875e:7d35'], ['::1'], ]; } /** * @param null $apiClient * @param null $configLoader */ protected static function getInstance($apiClient = null, $configLoader = null): BaseClient { return new BaseClient($apiClient, $configLoader); } } yookassa-sdk-php/tests/Client/CurlClientTest.php000064400000007244150364342670015757 0ustar00setConnectionTimeout(10); $this->assertEquals(10, $client->getConnectionTimeout()); } public function testTimeout(): void { $client = new CurlClient(); $client->setTimeout(10); $this->assertEquals(10, $client->getTimeout()); } public function testProxy(): void { $client = new CurlClient(); $client->setProxy('proxy_url:8889'); $this->assertEquals('proxy_url:8889', $client->getProxy()); } /** * @dataProvider curlErrorCodeProvider * * @param mixed $error * @param mixed $errn * @throws ReflectionException */ public function testHandleCurlError(mixed $error, mixed $errn): void { $this->expectException(ApiConnectionException::class); $client = new CurlClient(); $reflector = new ReflectionClass(CurlClient::class); $method = $reflector->getMethod('handleCurlError'); $method->setAccessible(true); $method->invokeArgs($client, [$error, $errn]); } public function testConfig(): void { $config = ['url' => 'test:url']; $client = new CurlClient(); $client->setConfig($config); $this->assertEquals($config, $client->getConfig()); } /** * @throws ApiException * @throws ExtensionNotFoundException * @throws ApiConnectionException * @throws AuthorizeException */ public function testCloseConnection(): void { $wrapped = new ArrayLogger(); $logger = new LoggerWrapper($wrapped); $curlClientMock = $this->getMockBuilder(CurlClient::class) ->onlyMethods(['closeCurlConnection', 'sendRequest']) ->getMock() ; $curlClientMock->setLogger($logger); $curlClientMock->setConfig(['url' => 'test:url']); $curlClientMock->setKeepAlive(false); $curlClientMock->setShopId(123); $curlClientMock->setShopPassword(234); $curlClientMock->expects($this->once())->method('sendRequest')->willReturn([ ['Header-Name' => 'HeaderValue'], '{body:sample}', ['http_code' => 200], ]); $curlClientMock->expects($this->once())->method('closeCurlConnection'); $curlClientMock->call( '', HttpVerb::HEAD, ['queryParam' => 'value'], 'testBodyValue', ['testHeader' => 'testValue'] ); } /** * @throws ExtensionNotFoundException * @throws ApiConnectionException * @throws ApiException */ public function testAuthorizeException(): void { $this->expectException(AuthorizeException::class); $client = new CurlClient(); $client->call( '', HttpVerb::HEAD, ['queryParam' => 'value'], 'testValue', ['testHeader' => 'testValue'] ); } public static function curlErrorCodeProvider(): array { return [ ['error message', CURLE_SSL_CACERT], ['error message', CURLE_COULDNT_CONNECT], ['error message', 0], ]; } } yookassa-sdk-php/tests/Client/ClientTest.php000064400000242762150364342670015137 0ustar00setAmount(123) ->setRecipient(['gateway_id' => 123, 'account_id' => 321]) ->setAirline([]) ->setDeal(null) ->setFraudData(null) ->setReceipt([]) ->setPaymentToken(Random::str(36)) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createPaymentFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayment($payment) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(CreatePaymentResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createPaymentFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayment([ 'amount' => [ 'value' => 123, 'currency' => 'USD', ], 'payment_token' => Random::str(36), ], 123) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(CreatePaymentResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted","retry_after":1800}', ['http_code' => 202], ]) ; try { $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayment($payment, 123) ; self::fail('Исключение не было выброшено'); } catch (ApiException $e) { self::assertInstanceOf(ResponseProcessingException::class, $e); return; } $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted"}', ['http_code' => 202], ]) ; try { $apiClient->setRetryTimeout(0); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayment($payment, 123) ; self::fail('Исключение не было выброшено'); } catch (ResponseProcessingException $e) { self::assertEquals(Client::DEFAULT_DELAY, $e->retryAfter); return; } } /** * @dataProvider errorResponseDataProvider * * @param mixed $httpCode * @param mixed $errorResponse * @param mixed $requiredException * * @throws Exception */ public function testInvalidCreatePayment($httpCode, $errorResponse, $requiredException): void { $payment = CreatePaymentRequest::builder() ->setAmount(123) ->setRecipient(['gateway_id' => 123, 'account_id' => 321]) ->setAirline([]) ->setDeal(null) ->setFraudData(null) ->setReceipt([]) ->setPaymentToken(Random::str(36)) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Authorization' => 'HeaderValue'], $errorResponse, ['http_code' => $httpCode], ]) ; $apiClient = new Client(); $apiClient->setApiClient($curlClientStub)->setAuth('123456', 'shopPassword'); try { $apiClient->createPayment($payment, 123); } catch (ApiException $e) { self::assertInstanceOf($requiredException, $e); return; } self::fail('Exception not thrown'); } /** * @dataProvider paymentsListDataProvider * * @throws ApiException * @throws ResponseProcessingException * @throws BadApiRequestException * @throws ForbiddenException * @throws InternalServerError * @throws NotFoundException * @throws TooManyRequestsException * @throws UnauthorizedException */ public function testPaymentsList(mixed $request): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Authorization' => 'HeaderValue'], $this->getFixtures('getPaymentsFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getPayments($request) ; $this->assertInstanceOf(PaymentsResponse::class, $response); } public static function paymentsListDataProvider(): array { return [ [null], [PaymentsRequest::builder()->build()], [[ 'account_id' => 12, ]], ]; } /** * @dataProvider errorResponseDataProvider * * @param mixed $httpCode * @param mixed $errorResponse * @param mixed $requiredException */ public function testInvalidPaymentsList($httpCode, $errorResponse, $requiredException): void { $payments = PaymentsRequest::builder()->build(); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $errorResponse, ['http_code' => $httpCode], ]) ; $apiClient = new Client(); $apiClient->setApiClient($curlClientStub)->setAuth('123456', 'shopPassword'); try { $apiClient->getPayments($payments); } catch (ApiException $e) { self::assertInstanceOf($requiredException, $e); return; } self::fail('Exception not thrown'); } /** * @dataProvider paymentInfoDataProvider * * @throws ApiException * @throws ResponseProcessingException * @throws BadApiRequestException * @throws ForbiddenException * @throws InternalServerError * @throws NotFoundException * @throws TooManyRequestsException * @throws UnauthorizedException */ public function testGetPaymentInfo(mixed $paymentId, string $exceptionClassName = null): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects(null !== $exceptionClassName ? self::never() : self::once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('paymentInfoFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); if (null !== $exceptionClassName) { $this->expectException($exceptionClassName); } $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getPaymentInfo($paymentId) ; self::assertInstanceOf(PaymentResponse::class, $response); } public static function paymentInfoDataProvider(): array { return [ [Random::str(36)], [new StringObject(Random::str(36))], [true, InvalidArgumentException::class], [false, InvalidArgumentException::class], [0, InvalidArgumentException::class], [1, InvalidArgumentException::class], [0.1, InvalidArgumentException::class], [Random::str(35), InvalidArgumentException::class], [Random::str(37), InvalidArgumentException::class], ]; } /** * @dataProvider errorResponseDataProvider * * @param mixed $httpCode * @param mixed $errorResponse * @param mixed $requiredException * * @throws Exception */ public function testInvalidGetPaymentInfo($httpCode, $errorResponse, $requiredException): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $errorResponse, ['http_code' => $httpCode], ]) ; $apiClient = new Client(); $apiClient->setApiClient($curlClientStub)->setAuth('123456', 'shopPassword'); try { $apiClient->getPaymentInfo(Random::str(36)); } catch (ApiException $e) { self::assertInstanceOf($requiredException, $e); return; } self::fail('Exception not thrown'); } public function testCapturePayment(): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('capturePaymentFixtures.json'), ['http_code' => 200], ]) ; $capturePaymentRequest = [ 'amount' => [ 'value' => 123, 'currency' => 'EUR', ], ]; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->capturePayment($capturePaymentRequest, '1ddd77af-0bd7-500d-895b-c475c55fdefc', 123) ; $this->assertInstanceOf(CreateCaptureResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('capturePaymentFixtures.json'), ['http_code' => 200], ]) ; $capturePaymentRequest = CreateCaptureRequest::builder()->setAmount(10)->build(); $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->capturePayment($capturePaymentRequest, '1ddd77af-0bd7-500d-895b-c475c55fdefc') ; $this->assertInstanceOf(CreateCaptureResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted","retry_after":123}', ['http_code' => 202], ]) ; try { $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->capturePayment($capturePaymentRequest, '1ddd77af-0bd7-500d-895b-c475c55fdefc', 123) ; self::fail('Exception not thrown'); } catch (ApiException $e) { self::assertInstanceOf(ResponseProcessingException::class, $e); } try { $apiClient->capturePayment($capturePaymentRequest, Random::str(37, 50), 123); } catch (InvalidArgumentException $e) { // it's ok return; } self::fail('Exception not thrown'); } /** * @dataProvider errorResponseDataProvider * * @param mixed $httpCode * @param mixed $errorResponse * @param mixed $requiredException * * @throws Exception */ public function testInvalidCapturePayment($httpCode, $errorResponse, $requiredException): void { $capturePaymentRequest = CreateCaptureRequest::builder() ->setAmount(10) ->setDeal(null) ->build(); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $errorResponse, ['http_code' => $httpCode], ]) ; $apiClient = new Client(); $apiClient->setApiClient($curlClientStub)->setAuth('123456', 'shopPassword'); try { $apiClient->capturePayment($capturePaymentRequest, '1ddd77af-0bd7-500d-895b-c475c55fdefc', 123); } catch (ApiException $e) { self::assertInstanceOf($requiredException, $e); return; } self::fail('Exception not thrown'); } /** * @dataProvider paymentInfoDataProvider * * @throws ApiException * @throws BadApiRequestException * @throws ExtensionNotFoundException * @throws ForbiddenException * @throws InternalServerError * @throws NotFoundException * @throws ResponseProcessingException * @throws TooManyRequestsException * @throws UnauthorizedException */ public function testPaymentIdCapturePayment(mixed $paymentId, string $exceptionClassName = null): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects(null === $exceptionClassName ? self::once() : self::never()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('capturePaymentFixtures.json'), ['http_code' => 200], ]) ; $capturePaymentRequest = [ 'amount' => [ 'value' => 123, 'currency' => 'EUR', ], ]; if (null !== $exceptionClassName) { $this->expectException($exceptionClassName); } $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->capturePayment($capturePaymentRequest, $paymentId, 123) ; self::assertInstanceOf(CreateCaptureResponse::class, $response); } /** * @dataProvider paymentInfoDataProvider * * @throws ApiException * @throws BadApiRequestException * @throws ExtensionNotFoundException * @throws ForbiddenException * @throws InternalServerError * @throws NotFoundException * @throws ResponseProcessingException * @throws TooManyRequestsException * @throws UnauthorizedException */ public function testCancelPayment(mixed $paymentId, string $exceptionClassName = null): void { $invalid = null !== $exceptionClassName; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($invalid ? self::never() : self::once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('cancelPaymentFixtures.json'), ['http_code' => 200], ]) ; if ($invalid) { $this->expectException($exceptionClassName); } $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->cancelPayment($paymentId, 123) ; $this->assertInstanceOf(CancelResponse::class, $response); } /** * @dataProvider errorResponseDataProvider * * @param mixed $httpCode * @param mixed $errorResponse * @param mixed $requiredException * * @throws ExtensionNotFoundException */ public function testInvalidCancelPayment($httpCode, $errorResponse, $requiredException): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $errorResponse, ['http_code' => $httpCode], ]) ; $apiClient = new Client(); $apiClient->setApiClient($curlClientStub)->setAuth('123456', 'shopPassword'); try { $apiClient->cancelPayment(Random::str(36)); } catch (ApiException $e) { self::assertInstanceOf($requiredException, $e); return; } self::fail('Exception not thrown'); } /** * @dataProvider refundsDataProvider * * @param mixed $refundsRequest * * @throws ApiException * @throws BadApiRequestException * @throws ExtensionNotFoundException * @throws ForbiddenException * @throws InternalServerError * @throws NotFoundException * @throws ResponseProcessingException * @throws TooManyRequestsException * @throws UnauthorizedException */ public function testGetRefunds($refundsRequest): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects(self::once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('refundsInfoFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getRefunds($refundsRequest) ; $this->assertInstanceOf(RefundsResponse::class, $response); } public static function refundsDataProvider(): array { return [ [null], [RefundsRequest::builder()->build()], [[ 'account_id' => 123, ]], ]; } /** * @dataProvider errorResponseDataProvider * * @param mixed $httpCode * @param mixed $errorResponse * @param mixed $requiredException * * @throws ExtensionNotFoundException */ public function testInvalidGetRefunds($httpCode, $errorResponse, $requiredException): void { $refundsRequest = RefundsRequest::builder()->build(); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $errorResponse, ['http_code' => $httpCode], ]) ; $apiClient = new Client(); $apiClient->setApiClient($curlClientStub)->setAuth('123456', 'shopPassword'); try { $apiClient->getRefunds($refundsRequest); } catch (ApiException $e) { self::assertInstanceOf($requiredException, $e); return; } self::fail('Exception not thrown'); } public function testCreateRefund(): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createRefundFixtures.json'), ['http_code' => 200], ]) ; $refundRequest = CreateRefundRequest::builder()->setPaymentId('1ddd77af-0bd7-500d-895b-c475c55fdefc')->setAmount(123)->build(); $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createRefund($refundRequest, 123) ; $this->assertInstanceOf(CreateRefundResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createRefundFixtures.json'), ['http_code' => 200], ]) ; $refundRequest = [ 'payment_id' => '1ddd77af-0bd7-500d-895b-c475c55fdefc', 'amount' => [ 'value' => 321, 'currency' => 'RUB', ], ]; $apiClient = new Client(); $response = $apiClient ->setMaxRequestAttempts(2) ->setRetryTimeout(1000) ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createRefund($refundRequest) ; $this->assertInstanceOf(CreateRefundResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted","retry_after":1800}', ['http_code' => 202], ]) ; try { $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createRefund($refundRequest, 123) ; } catch (ApiException $e) { self::assertInstanceOf(ResponseProcessingException::class, $e); return; } self::fail('Exception not thrown'); } /** * @dataProvider errorResponseDataProvider * * @param mixed $httpCode * @param mixed $errorResponse * @param mixed $requiredException * * @throws Exception */ public function testInvalidCreateRefund($httpCode, $errorResponse, $requiredException): void { $refundRequest = CreateRefundRequest::builder()->setPaymentId('1ddd77af-0bd7-500d-895b-c475c55fdefc')->setAmount(123)->build(); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $errorResponse, ['http_code' => $httpCode], ]) ; $apiClient = new Client(); $apiClient->setApiClient($curlClientStub)->setAuth('123456', 'shopPassword'); try { $apiClient->createRefund($refundRequest, 123); } catch (ApiException $e) { self::assertInstanceOf($requiredException, $e); return; } self::fail('Exception not thrown'); } /** * @dataProvider paymentInfoDataProvider * * @throws ApiException * @throws BadApiRequestException * @throws ForbiddenException * @throws InternalServerError * @throws NotFoundException * @throws ResponseProcessingException * @throws TooManyRequestsException * @throws UnauthorizedException * @throws ExtensionNotFoundException */ public function testRefundInfo(mixed $refundId, string $exceptionClassName = null): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects(null === $exceptionClassName ? self::once() : self::never()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('refundInfoFixtures.json'), ['http_code' => 200], ]) ; if (null !== $exceptionClassName) { $this->expectException($exceptionClassName); } $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getRefundInfo($refundId) ; $this->assertInstanceOf(RefundResponse::class, $response); try { $apiClient->getRefundInfo(Random::str(50, 100)); } catch (InvalidArgumentException $e) { // it's ok return; } self::fail('Exception not thrown'); } /** * @dataProvider errorResponseDataProvider * * @param mixed $httpCode * @param mixed $errorResponse * @param mixed $requiredException * * @throws Exception */ public function testInvalidRefundInfo($httpCode, $errorResponse, $requiredException): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $errorResponse, ['http_code' => $httpCode], ]) ; $apiClient = new Client(); $apiClient->setApiClient($curlClientStub)->setAuth('123456', 'shopPassword'); try { $apiClient->getRefundInfo(Random::str(36)); } catch (ApiException $e) { self::assertInstanceOf($requiredException, $e); return; } self::fail('Exception not thrown'); } public function testApiException(): void { $payment = CreatePaymentRequest::builder() ->setAmount(123) ->setPaymentToken(Random::str(36)) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], 'unknown response here', ['http_code' => 444], ]) ; $this->expectException(ApiException::class); $apiClient = new Client(); $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayment($payment, 123) ; } public function testBadRequestException(): void { $payment = CreatePaymentRequest::builder() ->setAmount(123) ->setPaymentToken(Random::str(36)) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"description": "error_msg", "code": "error_code", "parameter_name": "parameter_name"}', ['http_code' => 400], ]) ; $this->expectException(BadApiRequestException::class); $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayment($payment, 123) ; } public function testTechnicalErrorException(): void { $payment = CreatePaymentRequest::builder() ->setAmount(123) ->setPaymentToken(Random::str(36)) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"description": "error_msg", "code": "error_code"}', ['http_code' => 500], ]) ; $this->expectException(InternalServerError::class); $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayment($payment, 123) ; } public function testUnauthorizedException(): void { $payment = CreatePaymentRequest::builder() ->setAmount(123) ->setPaymentToken(Random::str(36)) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"description": "error_msg"}', ['http_code' => 401], ]) ; $this->expectException(UnauthorizedException::class); $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayment($payment, 123) ; } public function testForbiddenException(): void { $payment = CreatePaymentRequest::builder() ->setAmount(123) ->setPaymentToken(Random::str(36)) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"description": "error_msg","error_code": "error_code", "parameter_name": "parameter_name", "operation_name": "operation_name"}', ['http_code' => 403], ]) ; $this->expectException(ForbiddenException::class); $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayment($payment, 123) ; } public function testNotFoundException(): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"description": "error_msg","error_code": "error_code", "parameter_name": "parameter_name", "operation_name": "operation_name"}', ['http_code' => 404], ]) ; $this->expectException(NotFoundException::class); $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getPaymentInfo(Random::str(36)) ; } public function testToManyRequestsException(): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"description": "error_msg","error_code": "error_code", "parameter_name": "parameter_name", "operation_name": "operation_name"}', ['http_code' => 429], ]) ; $this->expectException(TooManyRequestsException::class); $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getPaymentInfo(Random::str(36)) ; } public function testAnotherExceptions(): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{}', ['http_code' => 322], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getPaymentInfo(Random::str(36)) ; self::assertNull($response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{}', ['http_code' => 402], ]) ; $apiClient = new Client(); $this->expectException(ApiException::class); $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getPaymentInfo(Random::str(36)) ; } public function testConfig(): void { $apiClient = new Client(); $apiClient->setConfig([ 'url' => 'test', ]); $this->assertEquals(['url' => 'test'], $apiClient->getConfig()); } public function testSetLogger(): void { $wrapped = new ArrayLogger(); $logger = new LoggerWrapper($wrapped); $apiClient = new Client(); $apiClient->setLogger($logger); $clientMock = $this->getMockBuilder(ApiClientInterface::class) ->onlyMethods(['setLogger', 'setConfig', 'call', 'setShopId', 'getUserAgent', 'setBearerToken', 'setShopPassword', 'setAdvancedCurlOptions']) ->disableOriginalConstructor() ->getMock() ; $expectedLoggers = []; $clientMock->expects(self::exactly(3))->method('setLogger')->willReturnCallback(function ($logger) use (&$expectedLoggers): void { $expectedLoggers[] = $logger; }); $clientMock->expects(self::once())->method('setConfig')->willReturn($clientMock); $apiClient->setApiClient($clientMock); self::assertSame($expectedLoggers[0], $logger); $apiClient->setLogger($wrapped); $apiClient->setLogger(function ($level, $log, $context = []) use ($wrapped): void { $wrapped->log($level, $log, $context); }); } public function testDecodeInvalidData(): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects(self::any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"invalid":"json"', ['http_code' => 200], ]) ; $this->expectException(JsonException::class); $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getPaymentInfo(Random::str(36)) ; } public function testEncodeMultibyteData(): void { $instance = new TestClient(); $value = ['hello' => 'Привет', 'olleh' => 'سلام']; $result = $instance->encode($value); self::assertTrue(str_contains($result, 'Привет')); self::assertTrue(str_contains($result, 'سلام')); } /** * @dataProvider invalidJsonDataProvider * @param mixed $value * @return void * @throws ReflectionException */ public function testEncodeInvalidData(mixed $value): void { $instance = new TestClient(); $this->expectException(JsonException::class); $instance->encode($value); } public function invalidJsonDataProvider(): array { $recursion = ['test' => 'test', 'val' => null]; $recursion['val'] = &$recursion; return [ [ $recursion ], [ ['test' => iconv('utf-8', 'windows-1251', 'абвгдеёжз')] ], ]; } public function testCreatePaymentErrors(): void { $payment = CreatePaymentRequest::builder() ->setAmount(123) ->setPaymentToken(Random::str(36)) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createPaymentErrorsGeneralFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayment($payment) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(CreatePaymentResponse::class, $response); self::assertEquals('canceled', $response->getStatus()); self::assertEquals('general_decline', $response->getCancellationDetails()->getReason()); } /** * @throws ApiException * @throws BadApiRequestException * @throws ForbiddenException * @throws InternalServerError * @throws NotFoundException * @throws ResponseProcessingException * @throws TooManyRequestsException * @throws UnauthorizedException * @throws ApiConnectionException * @throws AuthorizeException * @throws ExtensionNotFoundException */ public function testCreateReceipt(): void { // Create Receipt via object $receipt = $this->createReceiptViaObject(); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createReceiptFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createReceipt($receipt) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(AbstractReceiptResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createReceiptFixtures.json'), ['http_code' => 200], ]) ; // Create Receipt via array $receipt = $this->createReceiptViaArray(); $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createReceipt($receipt, 123) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(AbstractReceiptResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted","retry_after":1800}', ['http_code' => 202], ]) ; try { $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createReceipt($receipt, 123) ; self::fail('Исключение не было выброшено'); } catch (ApiException $e) { self::assertInstanceOf(ResponseProcessingException::class, $e); return; } $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted"}', ['http_code' => 202], ]) ; try { $apiClient->setRetryTimeout(0); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createReceipt($receipt, 123) ; self::fail('Исключение не было выброшено'); } catch (ResponseProcessingException $e) { self::assertEquals(Client::DEFAULT_DELAY, $e->retryAfter); return; } } public function testCreateDeal(): void { $deal = CreateDealRequest::builder() ->setType(DealType::SAFE_DEAL) ->setFeeMoment(FeeMoment::PAYMENT_SUCCEEDED) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createDealFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createDeal($deal) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(CreateDealResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createDealFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createDeal([ 'type' => 'safe_deal', 'fee_moment' => 'payment_succeeded', 'description' => Random::str(36), ], 123) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(CreateDealResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted","retry_after":1800}', ['http_code' => 202], ]) ; try { $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createDeal($deal, 123) ; self::fail('Исключение не было выброшено'); } catch (ApiException $e) { self::assertInstanceOf(ResponseProcessingException::class, $e); return; } $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted"}', ['http_code' => 202], ]) ; try { $apiClient->setRetryTimeout(0); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createDeal($deal, 123) ; self::fail('Исключение не было выброшено'); } catch (ResponseProcessingException $e) { self::assertEquals(Client::DEFAULT_DELAY, $e->retryAfter); return; } } /** * @dataProvider dealInfoDataProvider * * @throws ApiException * @throws ResponseProcessingException * @throws BadApiRequestException * @throws ForbiddenException * @throws InternalServerError * @throws NotFoundException * @throws TooManyRequestsException * @throws UnauthorizedException * @throws ExtensionNotFoundException */ public function testGetDealInfo(mixed $dealId, string $exceptionClassName = null): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects(null !== $exceptionClassName ? self::never() : self::once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('dealInfoFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); if (null !== $exceptionClassName) { $this->expectException($exceptionClassName); } $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getDealInfo($dealId) ; self::assertInstanceOf(DealResponse::class, $response); } public static function dealInfoDataProvider(): array { return [ [Random::str(36)], [new StringObject(Random::str(36))], [true, InvalidArgumentException::class], [false, InvalidArgumentException::class], [0, InvalidArgumentException::class], [1, InvalidArgumentException::class], [0.1, InvalidArgumentException::class], [Random::str(35), InvalidArgumentException::class], [Random::str(51), InvalidArgumentException::class], ]; } /** * @dataProvider dealsDataProvider * * @param mixed $dealsRequest * * @throws ApiException * @throws BadApiRequestException * @throws ExtensionNotFoundException * @throws ForbiddenException * @throws InternalServerError * @throws NotFoundException * @throws ResponseProcessingException * @throws TooManyRequestsException * @throws UnauthorizedException */ public function testGetDeals($dealsRequest): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects(self::once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('dealsInfoFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getDeals($dealsRequest) ; $this->assertInstanceOf(DealsResponse::class, $response); } public static function dealsDataProvider(): array { return [ [null], [DealsRequest::builder()->build()], [[ 'status' => 'closed', ]], ]; } public function testCreatePayout(): void { $payout = CreatePayoutRequest::builder() ->setAmount(['value' => '320', 'currency' => 'RUB']) ->setPayoutDestinationData([ 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => '41001614575714', ]) ->setDescription('Выплата по заказу №37') ->setMetadata(['order_id' => '37']) ->setDeal(['id' => 'dl-285e5ee7-0022-5000-8000-01516a44b147']) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createPayoutFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayout($payout) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(CreatePayoutResponse::class, $response); $payout = CreatePayoutRequest::builder() ->setAmount(['value' => '320', 'currency' => 'RUB']) ->setPayoutToken('<Синоним банковской карты>') ->setDescription('Выплата по заказу №37') ->setMetadata(['order_id' => '37']) ->setDeal(['id' => 'dl-285e5ee7-0022-5000-8000-01516a44b147']) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createPayoutFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayout($payout) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(CreatePayoutResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createPayoutFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayout([ 'amount' => ['value' => '320', 'currency' => 'RUB'], 'description' => 'Выплата по заказу №37', 'payout_token' => '<Синоним банковской карты>', 'deal' => ['id' => 'dl-285e5ee7-0022-5000-8000-01516a44b147'], 'metadata' => ['order_id' => '37'], ], 123) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(CreatePayoutResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted","retry_after":1800}', ['http_code' => 202], ]) ; try { $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayout($payout, 123) ; self::fail('Исключение не было выброшено'); } catch (ApiException $e) { self::assertInstanceOf(ResponseProcessingException::class, $e); return; } $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted"}', ['http_code' => 202], ]) ; try { $apiClient->setRetryTimeout(0); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayout($payout, 123) ; self::fail('Исключение не было выброшено'); } catch (ResponseProcessingException $e) { self::assertEquals(Client::DEFAULT_DELAY, $e->retryAfter); return; } $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted"}', ['http_code' => 202], ]) ; try { $apiClient->setRetryTimeout(0); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPayout([ 'amount' => ['value' => '320', 'currency' => 'RUB'], 'description' => 'Выплата по заказу №37', 'payout_token' => '<Синоним банковской карты>', 'payout_destination_data' => ['type' => 'bank_card', 'card' => ['number' => '1234567890123456']], 'deal' => ['id' => 'dl-285e5ee7-0022-5000-8000-01516a44b147'], 'metadata' => ['order_id' => '37'], ], 123) ; self::fail('Исключение не было выброшено'); } catch (ResponseProcessingException $e) { self::assertEquals(Client::DEFAULT_DELAY, $e->retryAfter); return; } } /** * @dataProvider payoutInfoDataProvider * * @throws ApiException * @throws ResponseProcessingException * @throws BadApiRequestException * @throws ForbiddenException * @throws InternalServerError * @throws NotFoundException * @throws TooManyRequestsException * @throws UnauthorizedException * @throws ExtensionNotFoundException */ public function testGetPayoutInfo(mixed $payoutId, string $exceptionClassName = null): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects(null !== $exceptionClassName ? self::never() : self::once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('payoutInfoFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); if (null !== $exceptionClassName) { $this->expectException($exceptionClassName); } $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getPayoutInfo($payoutId) ; self::assertInstanceOf(PayoutResponse::class, $response); } public static function payoutInfoDataProvider(): array { return [ [Random::str(36)], [new StringObject(Random::str(36))], [true, InvalidArgumentException::class], [false, InvalidArgumentException::class], [0, InvalidArgumentException::class], [1, InvalidArgumentException::class], [0.1, InvalidArgumentException::class], [Random::str(35), InvalidArgumentException::class], [Random::str(51), InvalidArgumentException::class], ]; } public function testCreatePersonalData(): void { $personalData = CreatePersonalDataRequest::builder() ->setType(PersonalDataType::SBP_PAYOUT_RECIPIENT) ->setLastName('Иванов') ->setFirstName('Иван') ->setMiddleName('Иванович') ->setMetadata(['recipient_id' => '37']) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createPersonalDataFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPersonalData($personalData) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(PersonalDataResponse::class, $response); $personalData = CreatePersonalDataRequest::builder() ->setType(PersonalDataType::SBP_PAYOUT_RECIPIENT) ->setLastName('Иванов') ->setFirstName('Иван') ->setMiddleName('Иванович') ->setMetadata(['recipient_id' => '37']) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createPersonalDataFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPersonalData($personalData) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(PersonalDataResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createPersonalDataFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPersonalData([ 'type' => 'sbp_payout_recipient', 'last_name' => 'Иванов', 'first_name' => 'Иван', 'middle_name' => 'Иванович', 'metadata' => ['recipient_id' => '37'], ], 123) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(PersonalDataResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted","retry_after":1800}', ['http_code' => 202], ]) ; try { $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPersonalData($personalData, 123) ; self::fail('Исключение не было выброшено'); } catch (ApiException $e) { self::assertInstanceOf(ResponseProcessingException::class, $e); return; } $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted"}', ['http_code' => 202], ]) ; try { $apiClient->setRetryTimeout(0); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPersonalData($personalData, 123) ; self::fail('Исключение не было выброшено'); } catch (ResponseProcessingException $e) { self::assertEquals(Client::DEFAULT_DELAY, $e->retryAfter); return; } $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted"}', ['http_code' => 202], ]) ; try { $apiClient->setRetryTimeout(0); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createPersonalData([ 'type' => 'sbp_payout_recipient', 'last_name' => 'Иванов', 'first_name' => 'Иван', 'middle_name' => 'Иванович', 'metadata' => ['recipient_id' => '37'], ], 123) ; self::fail('Исключение не было выброшено'); } catch (ResponseProcessingException $e) { self::assertEquals(Client::DEFAULT_DELAY, $e->retryAfter); return; } } /** * @dataProvider personalDataInfoDataProvider * * @throws ApiException * @throws ResponseProcessingException * @throws BadApiRequestException * @throws ForbiddenException * @throws InternalServerError * @throws NotFoundException * @throws TooManyRequestsException * @throws UnauthorizedException * @throws ExtensionNotFoundException */ public function testGetPersonalDataInfo(mixed $personalDataId, string $exceptionClassName = null): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects(null !== $exceptionClassName ? self::never() : self::once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('personalDataInfoFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); if (null !== $exceptionClassName) { $this->expectException($exceptionClassName); } $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getPersonalDataInfo($personalDataId) ; self::assertInstanceOf(PersonalDataResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted","retry_after":1800}', ['http_code' => 202], ]) ; try { $apiClient->setRetryTimeout(0); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getPersonalDataInfo($personalDataId) ; self::fail('Исключение не было выброшено'); } catch (ResponseProcessingException $e) { self::assertEquals(Client::DEFAULT_DELAY, $e->retryAfter); return; } } public static function personalDataInfoDataProvider(): array { return [ [Random::str(36)], [new StringObject(Random::str(36))], [true, InvalidArgumentException::class], [false, InvalidArgumentException::class], [0, InvalidArgumentException::class], [1, InvalidArgumentException::class], [0.1, InvalidArgumentException::class], [Random::str(35), InvalidArgumentException::class], [Random::str(51), InvalidArgumentException::class], ]; } /** * @dataProvider paymentsListDataProvider * * @throws ApiException * @throws ResponseProcessingException * @throws BadApiRequestException * @throws ForbiddenException * @throws InternalServerError * @throws NotFoundException * @throws TooManyRequestsException * @throws UnauthorizedException * @throws ExtensionNotFoundException */ public function testSbpBanksList(): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('getSbpBanksFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getSbpBanks() ; $this->assertInstanceOf(SbpBanksResponse::class, $response); } public function testCreateSelfEmployed(): void { $selfEmployed = SelfEmployedRequest::builder() ->setItn('123456789012') ->setPhone('79001002030') ->setConfirmation(['type' => 'redirect']) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createSelfEmployedFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createSelfEmployed($selfEmployed) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(SelfEmployedResponse::class, $response); $selfEmployed = SelfEmployedRequest::builder() ->setItn('123456789012') ->setPhone('79001002030') ->setConfirmation(['type' => 'redirect']) ->build() ; $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createSelfEmployedFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createSelfEmployed($selfEmployed) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(SelfEmployedResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('createSelfEmployedFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createSelfEmployed([ 'itn' => '123456789012', 'phone' => '79001002030', 'confirmation' => ['type' => 'redirect'], ], 123) ; self::assertSame($curlClientStub, $apiClient->getApiClient()); self::assertInstanceOf(SelfEmployedResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted","retry_after":1800}', ['http_code' => 202], ]) ; try { $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createSelfEmployed($selfEmployed, 123) ; self::fail('Исключение не было выброшено'); } catch (ApiException $e) { self::assertInstanceOf(ResponseProcessingException::class, $e); return; } $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted"}', ['http_code' => 202], ]) ; try { $apiClient->setRetryTimeout(0); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createSelfEmployed($selfEmployed, 123) ; self::fail('Исключение не было выброшено'); } catch (ResponseProcessingException $e) { self::assertEquals(Client::DEFAULT_DELAY, $e->retryAfter); return; } $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted"}', ['http_code' => 202], ]) ; try { $apiClient->setRetryTimeout(0); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->createSelfEmployed([ 'itn' => '123456789012', 'phone' => '79001002030', 'confirmation' => ['type' => 'redirect'], ], 123) ; self::fail('Исключение не было выброшено'); } catch (ResponseProcessingException $e) { self::assertEquals(Client::DEFAULT_DELAY, $e->retryAfter); return; } } /** * @dataProvider selfEmployedInfoDataProvider * * @param mixed $selfEmployedId * * @throws ApiException * @throws BadApiRequestException * @throws ExtensionNotFoundException * @throws ForbiddenException * @throws InternalServerError * @throws NotFoundException * @throws ResponseProcessingException * @throws TooManyRequestsException * @throws UnauthorizedException */ public function testGetSelfEmployedInfo($selfEmployedId, string $exceptionClassName = null): void { $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects(null !== $exceptionClassName ? self::never() : self::once()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], $this->getFixtures('selfEmployedInfoFixtures.json'), ['http_code' => 200], ]) ; $apiClient = new Client(); if (null !== $exceptionClassName) { $this->expectException($exceptionClassName); } $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getSelfEmployedInfo($selfEmployedId) ; self::assertInstanceOf(SelfEmployedResponse::class, $response); $curlClientStub = $this->getCurlClientStub(); $curlClientStub ->expects($this->any()) ->method('sendRequest') ->willReturn([ ['Header-Name' => 'HeaderValue'], '{"type":"error","code":"request_accepted","retry_after":1800}', ['http_code' => 202], ]) ; try { $apiClient->setRetryTimeout(0); $response = $apiClient ->setApiClient($curlClientStub) ->setAuth('123456', 'shopPassword') ->getSelfEmployedInfo($selfEmployedId) ; self::fail('Исключение не было выброшено'); } catch (ResponseProcessingException $e) { self::assertEquals(Client::DEFAULT_DELAY, $e->retryAfter); return; } } public static function selfEmployedInfoDataProvider(): array { return [ [Random::str(36)], [new StringObject(Random::str(36))], [true, InvalidArgumentException::class], [false, InvalidArgumentException::class], [0, InvalidArgumentException::class], [1, InvalidArgumentException::class], [0.1, InvalidArgumentException::class], [Random::str(35), InvalidArgumentException::class], [Random::str(51), InvalidArgumentException::class], ]; } public function getCurlClientStub(): MockObject { return $this->getMockBuilder(CurlClient::class) ->onlyMethods(['sendRequest']) ->getMock() ; } public static function errorResponseDataProvider(): array { return [ [NotFoundException::HTTP_CODE, '{}', NotFoundException::class], [BadApiRequestException::HTTP_CODE, '{}', BadApiRequestException::class], [BadApiRequestException::HTTP_CODE, '{}', BadApiRequestException::class], [ForbiddenException::HTTP_CODE, '{}', ForbiddenException::class], [UnauthorizedException::HTTP_CODE, '{}', UnauthorizedException::class], [TooManyRequestsException::HTTP_CODE, '{}', TooManyRequestsException::class], ]; } private function createReceiptViaArray(): array { return [ 'customer' => [ 'full_name' => 'Иванов Иван Иванович', 'inn' => '6321341814', 'email' => 'johndoe@yoomoney.ru', 'phone' => '79000000000', ], 'items' => [ [ 'description' => 'string', 'quantity' => 1, 'amount' => [ 'value' => '10.00', 'currency' => 'RUB', ], 'vat_code' => 1, 'payment_subject' => 'commodity', 'payment_mode' => 'full_prepayment', 'product_code' => '00 00 00 01 00 21 FA 41 00 23 05 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 00 AB 00', 'country_of_origin_code' => 'RU', 'customs_declaration_number' => '10714040/140917/0090376', 'excise' => '20.00', ], ], 'tax_system_code' => 1, 'type' => 'payment', 'send' => true, 'settlements' => [ [ 'type' => 'cashless', 'amount' => [ 'value' => '10.00', 'currency' => 'RUB', ], ], ], 'payment_id' => '1da5c87d-0984-50e8-a7f3-8de646dd9ec9', ]; } private function createReceiptViaObject(): CreatePostReceiptRequest { $customer = new ReceiptCustomer([ 'full_name' => 'Иванов Иван Иванович', 'inn' => '6321341814', 'email' => 'johndoe@yoomoney.ru', 'phone' => '79000000000', ]); $settlement = new Settlement([ 'type' => 'cashless', 'amount' => [ 'value' => '10.00', 'currency' => 'RUB', ], ]); $receiptItem = new ReceiptItem([ 'description' => 'string', 'quantity' => 1, 'amount' => [ 'value' => '10.00', 'currency' => 'RUB', ], 'vat_code' => 1, 'payment_subject' => 'commodity', 'payment_mode' => 'full_prepayment', 'product_code' => '00 00 00 01 00 21 FA 41 00 23 05 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 00 AB 00', 'country_of_origin_code' => 'RU', 'customs_declaration_number' => '10714040/140917/0090376', 'excise' => '20.00', ]); return CreatePostReceiptRequest::builder() ->setCustomer($customer) ->setType(ReceiptType::PAYMENT) ->setObjectId('1da5c87d-0984-50e8-a7f3-8de646dd9ec9', ReceiptType::PAYMENT) ->setSend(true) ->setSettlements([$settlement]) ->setOnBehalfOf('545665') ->setItems([$receiptItem]) ->build() ; } private function getFixtures($fileName): bool|string { return file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'fixtures' . DIRECTORY_SEPARATOR . $fileName); } } class ArrayLogger implements LoggerInterface { private array $lastLog; public function log($level, $message, array $context = []): void { $this->lastLog = [$level, $message, $context]; } public function getLastLog(): array { return $this->lastLog; } public function emergency($message, array $context = []): void { $this->log(LogLevel::EMERGENCY, $message, $context); } public function alert($message, array $context = []): void { $this->log(LogLevel::ALERT, $message, $context); } public function critical($message, array $context = []): void { $this->log(LogLevel::CRITICAL, $message, $context); } public function error($message, array $context = []): void { $this->log(LogLevel::ERROR, $message, $context); } public function warning($message, array $context = []): void { $this->log(LogLevel::WARNING, $message, $context); } public function notice($message, array $context = []): void { $this->log(LogLevel::NOTICE, $message, $context); } public function info($message, array $context = []): void { $this->log(LogLevel::INFO, $message, $context); } public function debug($message, array $context = []): void { $this->log(LogLevel::DEBUG, $message, $context); } } class TestClient extends Client { /** * @param mixed $data * * @return mixed * @throws ReflectionException */ public function encode(mixed $data): mixed { $reflection = new ReflectionMethod($this, 'encodeData'); $reflection->setAccessible(true); return $reflection->invoke($this, $data); } } yookassa-sdk-php/tests/Client/UserAgentTest.php000064400000007546150364342670015615 0ustar00getMethod('setOs'); $method->setAccessible(true); $method->invokeArgs($agent, ['name' => 'CentOS', 'version' => '6.7']); $method = $reflector->getMethod('setPhp'); $method->setAccessible(true); $method->invokeArgs($agent, ['name' => 'PHP', 'version' => '5.4.45']); $method = $reflector->getMethod('setSdk'); $method->setAccessible(true); $method->invokeArgs($agent, ['name' => 'YooKassa.PHP', 'version' => '1.4.1']); $agent->setCms('Wordpress', '2.0.4'); $agent->setModule('Woocommerce', '1.2.3'); $this->assertEquals('CentOS/6.7 PHP/5.4.45 Wordpress/2.0.4 Woocommerce/1.2.3 YooKassa.PHP/1.4.1', $agent->getHeaderString()); } /** * @throws ReflectionException */ public function testSetGetOs(): void { $agent = new UserAgent(); $reflector = new ReflectionClass('\YooKassa\Client\UserAgent'); $method = $reflector->getMethod('setOs'); $method->setAccessible(true); $method->invokeArgs($agent, ['name' => 'CentOS', 'version' => '6.7']); $this->assertEquals('CentOS/6.7', $agent->getOs()); } /** * @throws ReflectionException */ public function testSetGetPhp(): void { $agent = new UserAgent(); $reflector = new ReflectionClass('\YooKassa\Client\UserAgent'); $method = $reflector->getMethod('setPhp'); $method->setAccessible(true); $method->invokeArgs($agent, ['name' => 'PHP', 'version' => '5.4.45']); $this->assertEquals('PHP/5.4.45', $agent->getPhp()); } public function testSetGetFramework(): void { $agent = new UserAgent(); $agent->setFramework('Yii', '2.4.1'); $this->assertEquals('Yii/2.4.1', $agent->getFramework()); } public function testSetGetCms(): void { $agent = new UserAgent(); $agent->setCms('Wordpress', '2.0.4'); $this->assertEquals('Wordpress/2.0.4', $agent->getCms()); } public function testSetGetModule(): void { $agent = new UserAgent(); $agent->setModule('Woocommerce', '1.2.3'); $this->assertEquals('Woocommerce/1.2.3', $agent->getModule()); } /** * @throws ReflectionException */ public function testSetGetSdk(): void { $agent = new UserAgent(); $reflector = new ReflectionClass('\YooKassa\Client\UserAgent'); $method = $reflector->getMethod('setSdk'); $method->setAccessible(true); $method->invokeArgs($agent, ['name' => 'YooKassa.PHP', 'version' => '1.4.1']); $this->assertEquals('YooKassa.PHP/1.4.1', $agent->getSdk()); } /** * @dataProvider validVersionDataProvider * * @param mixed $input * @param mixed $output */ public function testCreateVersion($input, $output): void { $agent = new UserAgent(); $this->assertEquals($agent->createVersion($input['name'], $input['version']), $output); } public static function validVersionDataProvider() { return [ [ ['name' => 'PHP ', 'version' => '1.2.3 '], 'PHP/1.2.3', ], [ ['name' => 'Ubuntu GNU/Linux', 'version' => ' 14.04'], 'Ubuntu.GNU.Linux/14.04', ], [ ['name' => 'YooKassa PHP', 'version' => '1/4.3'], 'YooKassa.PHP/1.4.3', ], ]; } } yookassa-sdk-php/tests/Helpers/RandomTest.php000064400000013616150364342670015317 0ustar00load($fileName); if (empty($fileName)) { $fileName = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'configuration.json'; } $data = file_get_contents($fileName); self::assertEquals(json_decode($data, true), $loader->getConfig()); } public static function validDataProvider() { return [ [null], [''], [__DIR__ . DIRECTORY_SEPARATOR . 'test_config.json'], ]; } } yookassa-sdk-php/tests/Helpers/Config/test_config.json000064400000000050150364342670017116 0ustar00{ "test":"test", "array":[1,2,3,4] }yookassa-sdk-php/tests/Helpers/ProductCodeTest.php000064400000043213150364342670016306 0ustar00getPrefix()); $instance->setPrefix($data['prefix']); if (empty($data['prefix'])) { self::assertNull($instance->getPrefix()); } else { self::assertNotNull($instance->getPrefix()); } } /** * @dataProvider dataProvider */ public function testSetGetGtin(mixed $data): void { $instance = new ProductCode(); $instance->setGtin($data['gtin']); if (empty($data['gtin'])) { self::assertNull($instance->getGtin()); } else { self::assertEquals($data['gtin'], $instance->getGtin()); } } /** * @dataProvider dataProvider */ public function testSetGetUsePrefix(mixed $data): void { $instance = new ProductCode(); self::assertTrue($instance->isUsePrefix()); $instance->setUsePrefix($data['usePrefix']); if (empty($data['usePrefix'])) { self::assertFalse($instance->isUsePrefix()); } else { self::assertTrue($instance->isUsePrefix()); } } /** * @dataProvider dataProvider */ public function testSetGetSerial(mixed $data): void { $instance = new ProductCode(); $instance->setSerial($data['serial']); if (empty($data['serial'])) { self::assertNull($instance->getSerial()); } else { self::assertEquals($data['serial'], $instance->getSerial()); } } /** * @dataProvider dataProvider */ public function testValidate(mixed $data): void { $instance = new ProductCode(); self::assertFalse($instance->validate()); $instance->setType($data['type']); $instance->setGtin($data['gtin']); $instance->setSerial($data['serial']); switch ($instance->getType()) { case ProductCode::TYPE_EAN_8: case ProductCode::TYPE_EAN_13: case ProductCode::TYPE_ITF_14: case ProductCode::TYPE_FUR: case ProductCode::TYPE_EGAIS_20: case ProductCode::TYPE_EGAIS_30: case ProductCode::TYPE_UNKNOWN: if (empty($data['gtin'])) { self::assertFalse($instance->validate()); } if (empty($data['gtin'])) { self::assertTrue($instance->validate()); } break; case ProductCode::TYPE_GS_10: case ProductCode::TYPE_GS_1M: case ProductCode::TYPE_SHORT: if (empty($data['gtin']) || empty($data['serial'])) { self::assertFalse($instance->validate()); } if (!empty($data['gtin']) || !empty($data['serial'])) { self::assertTrue($instance->validate()); } break; } } /** * @dataProvider dataStrProvider * * @throws ReflectionException */ public function testStrHex(mixed $data): void { $instance = new ProductCode(); $reflection = new ReflectionClass($instance::class); $method = $reflection->getMethod('strToHex'); $method->setAccessible(true); $result1 = $method->invokeArgs($instance, ['string' => $data]); $method = $reflection->getMethod('hexToStr'); $method->setAccessible(true); $result2 = $method->invokeArgs($instance, ['hex' => $result1]); self::assertEquals($data, $result2); } /** * @dataProvider dataNumProvider * * @throws ReflectionException */ public function testNumHex(mixed $data): void { $instance = new ProductCode(); $reflection = new ReflectionClass($instance::class); $method = $reflection->getMethod('baseConvert'); $method->setAccessible(true); $result1 = $method->invokeArgs($instance, ['numString' => $data]); $method2 = $reflection->getMethod('baseConvert'); $method2->setAccessible(true); $result2 = $method2->invokeArgs($instance, ['numString' => $result1, 'fromBase' => 16, 'toBase' => 10]); self::assertEquals( str_pad($data, 14, '0', STR_PAD_LEFT), str_pad($result2, 14, '0', STR_PAD_LEFT) ); } /** * @dataProvider dataProvider */ public function testGetResult(mixed $data): void { $instance = new ProductCode(); self::assertEmpty($instance->getResult()); $instance->setGtin($data['gtin']); $instance->setSerial($data['serial']); $instance->setPrefix($data['prefix']); $instance->setUsePrefix($data['usePrefix']); if ($instance->validate()) { self::assertNotEmpty($instance->calcResult()); self::assertNotEmpty($instance->getResult()); } else { self::assertEmpty($instance->calcResult()); self::assertEmpty($instance->getResult()); } } /** * @dataProvider dataProvider */ public function testMagicMethods(mixed $data): void { $instance = new ProductCode($data['dataMatrix'], $data['usePrefix'] ? $data['prefix'] : false); if ($instance->validate()) { self::assertNotEmpty($instance->calcResult()); self::assertNotEmpty($instance->getResult()); self::assertEquals($data['result'], $instance->calcResult()); self::assertEquals($data['result'], $instance->getResult()); self::assertEquals($data['result'], (string) $instance); } else { self::assertEmpty($instance->getResult()); self::assertEmpty($instance->getResult()); } $instance2 = new ProductCode($data['dataMatrix'], $data['usePrefix'] ? $data['prefix'] : false); if ($instance2->validate()) { self::assertEquals($data['result'], (string) $instance2); } else { self::assertEmpty($instance2->getResult()); } } /** * @dataProvider dataProvider */ public function testGetSetMarkCodeInfo(array $data): void { $instance = new ProductCode($data['dataMatrix'], $data['usePrefix'] ? $data['prefix'] : false); if (empty($data['dataMatrix'])) { self::assertNull($instance->getMarkCodeInfo()); return; } if (empty($data['mark_code_info'])) { self::assertInstanceOf(MarkCodeInfo::class, $instance->getMarkCodeInfo()); } else { self::assertNotNull($instance->getMarkCodeInfo()); if (!is_object($data['mark_code_info'])) { self::assertEquals($data['mark_code_info'], $instance->getMarkCodeInfo()->toArray()); } else { self::assertEquals($data['mark_code_info']->toArray(), $instance->getMarkCodeInfo()->toArray()); } } } public static function dataProvider(): array { return [ [ [ 'usePrefix' => false, 'prefix' => null, 'type' => 'gs_1m', 'gtin' => '04630037591316', 'serial' => 'sgEKKPPcS25y5', 'dataMatrix' => '010463003407001221SxMGorvNuq6Wk91fgr92sdfsdfghfgjh', 'result' => '04 36 03 89 39 FC 53 78 4D 47 6F 72 76 4E 75 71 36 57 6B', ], ], [ [ 'usePrefix' => true, 'prefix' => true, 'type' => 'gs_1m', 'gtin' => '4630037591316', 'serial' => 'sgEKKPPcS25y5', 'dataMatrix' => '010463003407001221SxMGorvNuq6Wk91fgr92sdfsdfghfgjh', 'result' => '44 4D 04 36 03 89 39 FC 53 78 4D 47 6F 72 76 4E 75 71 36 57 6B', ], ], [ [ 'usePrefix' => true, 'prefix' => '444D', 'type' => 'gs_1m', 'gtin' => '04630037591316', 'serial' => 'sgEKKPPcS25y5', 'dataMatrix' => '010463003407001221SxMGorvNuq6Wk91fgr92sdfsdfghfgjh', 'result' => '44 4D 04 36 03 89 39 FC 53 78 4D 47 6F 72 76 4E 75 71 36 57 6B', ], ], [ [ 'usePrefix' => true, 'prefix' => 17485, 'type' => 'gs_1m', 'gtin' => '04630037591316', 'serial' => 'sgEKKPPcS25y5', 'dataMatrix' => '010463003407001221SxMGorvNuq6Wk91fgr92sdfsdfghfgjh', 'result' => '44 4D 04 36 03 89 39 FC 53 78 4D 47 6F 72 76 4E 75 71 36 57 6B', ], ], [ [ 'usePrefix' => false, 'prefix' => null, 'type' => 'gs_1m', 'gtin' => '98765432101234', 'serial' => 'ABC1234', 'dataMatrix' => '019876543210123421ABC123491DmUO92sdfJSf/"fgjh', 'result' => '59 D3 9E 7F 19 72 41 42 43 31 32 33 34', ], ], [ [ 'usePrefix' => false, 'prefix' => null, 'type' => 'gs_10', 'gtin' => '98765432101234', 'serial' => 'ABC1234', 'dataMatrix' => '019876543210123421ABC1234', 'result' => '59 D3 9E 7F 19 72 41 42 43 31 32 33 34', 'mark_code_info' => [ 'gs_10' => '019876543210123421ABC1234', ], ], ], [ [ 'usePrefix' => true, 'prefix' => '444D', 'type' => 'gs_1m', 'gtin' => '04650157546607', 'serial' => '1>iGl4Mmypg,w', 'dataMatrix' => '0104650157546607211>iGl4Mmypg,w91006492TCetfbrFRjPke+Scq0sUS9WX84GMz5zx+UR5y8I0QFCDte3E947cwYo3liObLS1uzTqOnzBkSjNJD+97P6OF7A==', 'result' => '44 4D 04 3A B2 FD 1C 6F 31 3E 69 47 6C 34 4D 6D 79 70 67 2C 77', 'mark_code_info' => [ 'gs_1m' => '0104650157546607211>iGl4Mmypg,w', ], ], ], [ [ 'usePrefix' => true, 'prefix' => '444D', 'type' => 'gs_1m', 'gtin' => '04601936005464', 'serial' => '5hHUGT', 'dataMatrix' => '0104601936005464215hHUGT93dpD0', 'result' => '44 4D 04 2F 78 C2 C9 58 35 68 48 55 47 54', 'mark_code_info' => new MarkCodeInfo([ 'gs_1m' => '0104601936005464215hHUGT', ]), ], ], [ [ 'usePrefix' => true, 'prefix' => '4909', 'type' => 'itf_14', 'gtin' => '01234567890123', 'serial' => '', 'dataMatrix' => '01234567890123', 'result' => '49 09 01 1F 71 FB 04 CB', 'mark_code_info' => [ 'itf_14' => '01234567890123', ], ], ], [ [ 'usePrefix' => true, 'prefix' => '450D', 'type' => 'ean_13', 'gtin' => '1234567890123', 'serial' => '', 'dataMatrix' => '1234567890123', 'result' => '45 0D 01 1F 71 FB 04 CB', 'mark_code_info' => [ 'ean_13' => '1234567890123', ], ], ], [ [ 'usePrefix' => true, 'prefix' => '4508', 'type' => 'ean_8', 'gtin' => '12345678', 'serial' => '', 'dataMatrix' => '12345678', 'result' => '45 08 00 00 00 BC 61 4E', 'mark_code_info' => [ 'ean_8' => '12345678', ], ], ], [ [ 'usePrefix' => true, 'prefix' => '5246', 'type' => 'fur', 'gtin' => 'AB-123456-ABCDEFGHIJ', 'serial' => '', 'dataMatrix' => 'AB-123456-ABCDEFGHIJ', 'result' => '52 46 41 42 2D 31 32 33 34 35 36 2D 41 42 43 44 45 46 47 48 49 4A', 'mark_code_info' => new MarkCodeInfo([ 'fur' => 'AB-123456-ABCDEFGHIJ', ]), ], ], [ [ 'usePrefix' => true, 'prefix' => '5246', 'type' => 'fur', 'gtin' => 'RU-430302-ABC1234567', 'serial' => '', 'dataMatrix' => 'RU-430302-ABC1234567', 'result' => '52 46 52 55 2D 34 33 30 33 30 32 2D 41 42 43 31 32 33 34 35 36 37', ], ], [ [ 'usePrefix' => true, 'prefix' => 'C514', 'type' => 'egais_20', 'gtin' => '52419RAYLTL37TX31219019', 'serial' => '', 'dataMatrix' => '20N0000152419RAYLTL37TX31219019004460R96J2Z9KXYLKRCWGQOUOIUDYXVY6MCW', 'result' => 'C5 14 35 32 34 31 39 52 41 59 4C 54 4C 33 37 54 58 33 31 32 31 39 30 31 39 30 30 34 34 36 30 52 39 36 4A', ], ], [ [ 'usePrefix' => true, 'prefix' => 'C51E', 'type' => 'egais_30', 'gtin' => '19530126773682', 'serial' => '', 'dataMatrix' => '195301267736820121001EO2BBV3RRHXBJTZYOD5A2IU5XMHT3ZKW44TYYAYE3GXPGSQTGJQS43TG5WLWTQVNHVHI2A6H7RBFYY4VO4THCK5HSFFUPMCAA7ZHNNXZ4ILMESLIGZPONDEQ5CK3J76JY', 'result' => 'C5 1E 31 39 35 33 30 31 32 36 37 37 33 36 38 32', ], ], [ [ 'usePrefix' => true, 'prefix' => '444D', 'type' => 'short', 'gtin' => '00046070061125', 'serial' => '75215MEZgB933==', 'dataMatrix' => '0004607006112575215MEZgB933==', 'result' => '44 4D 00 0A B9 FD 58 45 37 35 32 31 35 4D 45 5A 67 42 39 33 33 3D 3D', ], ], [ [ 'usePrefix' => true, 'prefix' => '444D', 'type' => 'gs_10', 'gtin' => '04630034070012', 'serial' => 'CMK45BrhN0WLf', 'dataMatrix' => '010463003407001221CMK45BrhN0WLf', 'result' => '44 4D 04 36 03 89 39 FC 43 4D 4B 34 35 42 72 68 4E 30 57 4C 66', ], ], [ [ 'usePrefix' => true, 'prefix' => '444D', 'type' => 'gs_10', 'gtin' => '04600439931256', 'serial' => 'JgXJ5.T', 'dataMatrix' => '010460043993125621JgXJ5.T\u001d8005112000\u001d930001\u001d923zbrLA==\u001d24014276281.', 'result' => '44 4D 04 2F 1F 96 81 78 4A 67 58 4A 35 2E 54 31 31 32 30 30 30', ], ], [ [ 'usePrefix' => true, 'prefix' => '0000', 'type' => 'unknown', 'gtin' => '123%123&sldkfjldksfj*(*', 'serial' => '123%123&sldkfjldksfj*(*', 'dataMatrix' => '123%123&sldkfjldksfj*(*', 'result' => '00 00 31 32 33 25 31 32 33 26 73 6C 64 6B 66 6A 6C 64 6B 73 66 6A 2A 28 2A', ], ], [ [ 'usePrefix' => false, 'prefix' => '', 'type' => '', 'gtin' => '', 'serial' => '', 'dataMatrix' => '', 'result' => '', ], ], ]; } public static function dataStrProvider(): array { return [ [ 'this is a test!', ], [ 'ABC1234', ], [ 'sgEKKPPcS25y5', ], ]; } public static function dataNumProvider(): array { return [ [ '98765432101234', ], [ '04630037591316', ], [ '04603725748040', ], [ '04603725748057', ], [ '4603725748057', ], ]; } } yookassa-sdk-php/tests/Helpers/TypeCastTest.php000064400000010336150364342670015627 0ustar00getTimestamp(), $instance->getTimestamp()); self::assertNotSame($value, $instance); } else { self::assertEquals($expected, $instance->getTimestamp()); } } else { self::assertNull($instance); } } public static function canCastToStringDataProvider(): array { return [ ['', true], ['test_string', true], [0, true], [1, true], [-1, true], [0.0, true], [-0.001, true], [0.001, true], [true, false], [false, false], [null, false], [[], false], [new stdClass(), false], [fopen(__FILE__, 'rb'), false], [new StringObject('test'), true], ]; } public static function canCastToEnumStringDataProvider(): array { return [ ['', false], ['test_string', true], [0, false], [1, false], [-1, false], [0.0, false], [-0.001, false], [0.001, false], [true, false], [false, false], [null, false], [[], false], [new stdClass(), false], [fopen(__FILE__, 'rb'), false], [new StringObject('test'), true], ]; } public static function canCastToDateTimeDataProvider(): array { return [ ['', false], ['test_string', true], [0, true], [1, true], [-1, false], [0.0, true], [-0.001, false], [0.001, true], [true, false], [false, false], [null, false], [[], false], [new stdClass(), false], [fopen(__FILE__, 'rb'), false], [new StringObject('test'), true], [new DateTime(), true], ]; } /** * @throws Exception */ public static function castToDateTimeDataProvider(): array { $result = []; date_default_timezone_set('UTC'); $time = time(); $result[] = [$time, $time, true]; $result[] = [date(YOOKASSA_DATE, $time), $time, true]; $result[] = [new DateTime(date(YOOKASSA_DATE, $time)), $time, true]; $result[] = ['3234-new-23', $time, false]; $result[] = [[], $time, false]; return $result; } } yookassa-sdk-php/tests/Helpers/RawHeadersParserTest.php000064400000006403150364342670017275 0ustar00assertEquals($expected, RawHeadersParser::parse($rawHeaders)); } public static function headersDataProvider(): array { return [ [ 'Server: nginx Date: Thu, 03 Dec 2020 16:04:35 GMT Content-Type: text/html Content-Length: 178 Connection: keep-alive Location: https://yoomoney.ru/', [ 'Server' => 'nginx', 'Date' => 'Thu, 03 Dec 2020 16:04:35 GMT', 'Content-Type' => 'text/html', 'Content-Length' => '178', 'Connection' => 'keep-alive', 'Location' => 'https://yoomoney.ru/', ], ], [ "HTTP/1.1 200 Ok\r\n" . "Server: nginx\r\n" . "Date: Thu, 03 Dec 2020 16:04:35 GMT\r\n" . "Content-Type: text/html\r\n" . "Content-Length: 178\r\n" . "Array-Header: value1\r\n" . "Connection: keep-alive\r\n" . "Array-Header: value2\r\n" . "Location: https://yoomoney.ru/\r\n" . "\r\n" . 'Content-Length: 132', [ 0 => 'HTTP/1.1 200 Ok', 'Server' => 'nginx', 'Date' => 'Thu, 03 Dec 2020 16:04:35 GMT', 'Content-Type' => 'text/html', 'Content-Length' => '178', 'Array-Header' => [ 'value1', 'value2', ], 'Connection' => 'keep-alive', 'Location' => 'https://yoomoney.ru/', ], ], [ "HTTP/1.1 200 Ok\r\n" . "Server: nginx\r\n" . "\tversion 1.3.4\r\n" . "Date: Thu, 03 Dec 2020 16:04:35 GMT\r\n" . "Content-Type: text/html\r\n" . "Content-Length: 178\r\n" . "Array-Header: value1\r\n" . "Connection: keep-alive\r\n" . "Array-Header: value2\r\n" . "Location: https://yoomoney.ru/\r\n" . "Array-Header: value3\r\n" . "\r\n" . 'Content-Length: 132', [ 0 => 'HTTP/1.1 200 Ok', 'Server' => "nginx\r\n\tversion 1.3.4", 'Date' => 'Thu, 03 Dec 2020 16:04:35 GMT', 'Content-Type' => 'text/html', 'Content-Length' => '178', 'Array-Header' => [ 'value1', 'value2', 'value3', ], 'Connection' => 'keep-alive', 'Location' => 'https://yoomoney.ru/', ], ], ]; } } yookassa-sdk-php/tests/Helpers/UUIDTest.php000064400000000600150364342670014632 0ustar00__toString()); } public static function dataProvider(): array { return [ [''], ['value'], ]; } } yookassa-sdk-php/tests/Request/Payouts/SbpBanksResponseTest.php000064400000007753150364342670021020 0ustar00getType()); self::assertEquals($options['next_cursor'], $instance->getNextCursor()); if (!empty($options['items'])) { self::assertSameSize($options['items'], $instance->getItems()); foreach ($instance->getItems() as $index => $item) { self::assertInstanceOf(SbpParticipantBank::class, $item); self::assertArrayHasKey($index, $options['items']); self::assertEquals($options['items'][$index]['bank_id'], $item->getBankId()); self::assertEquals($options['items'][$index]['name'], $item->getName()); self::assertEquals($options['items'][$index]['bic'], $item->getBic()); } } else { self::assertEmpty($instance->getItems()); } } public static function validDataProvider(): array { return [ [ [ 'type' => 'list', 'items' => [], 'next_cursor' => Random::str(10), ], ], [ [ 'type' => 'list', 'items' => [ [ 'bank_id' => Random::str(SbpParticipantBank::MAX_LENGTH_BANK_ID), 'name' => Random::str(SbpParticipantBank::MAX_LENGTH_NAME), 'bic' => Random::str(9, '0123456789'), ], ], 'next_cursor' => Random::str(10, 100), ], ], [ [ 'type' => 'list', 'items' => [ [ 'bank_id' => Random::str(SbpParticipantBank::MAX_LENGTH_BANK_ID), 'name' => Random::str(SbpParticipantBank::MAX_LENGTH_NAME), 'bic' => Random::str(9, '0123456789'), ], [ 'bank_id' => Random::str(SbpParticipantBank::MAX_LENGTH_BANK_ID), 'name' => Random::str(SbpParticipantBank::MAX_LENGTH_NAME), 'bic' => Random::str(9, '0123456789'), ], ], 'next_cursor' => '37a5c87d-3984-51e8-a7f3-8de646d39ec15', ], ], [ [ 'type' => 'list', 'items' => [ [ 'bank_id' => Random::str(SbpParticipantBank::MAX_LENGTH_BANK_ID), 'name' => Random::str(SbpParticipantBank::MAX_LENGTH_NAME), 'bic' => Random::str(9, '0123456789'), ], [ 'bank_id' => Random::str(SbpParticipantBank::MAX_LENGTH_BANK_ID), 'name' => Random::str(SbpParticipantBank::MAX_LENGTH_NAME), 'bic' => Random::str(9, '0123456789'), ], [ 'bank_id' => Random::str(SbpParticipantBank::MAX_LENGTH_BANK_ID), 'name' => Random::str(SbpParticipantBank::MAX_LENGTH_NAME), 'bic' => Random::str(9, '0123456789'), ], ], 'next_cursor' => Random::str(Random::int(2, 32)), ], ], ]; } } yookassa-sdk-php/tests/Request/Payouts/AbstractTestPayoutResponse.php000064400000021364150364342670022254 0ustar00getTestInstance($options); self::assertEquals($options['id'], $instance->getId()); } /** * @dataProvider validDataProvider */ public function testGetAmount(array $options): void { $instance = $this->getTestInstance($options); self::assertEquals(number_format($options['amount']['value'], 2, '.', ''), $instance->getAmount()->getValue()); self::assertEquals($options['amount']['currency'], $instance->getAmount()->getCurrency()); } /** * @dataProvider validDataProvider */ public function testGetStatus(array $options): void { $instance = $this->getTestInstance($options); self::assertEquals($options['status'], $instance->getStatus()); } /** * @dataProvider validDataProvider */ public function testGetPayoutDestination(array $options): void { $instance = $this->getTestInstance($options); if (empty($options['payout_destination'])) { self::assertNull($instance->getPayoutDestination()); self::assertNull($instance->payout_destination); } else { self::assertEquals($options['payout_destination'], $instance->getPayoutDestination()->toArray()); self::assertEquals($options['payout_destination'], $instance->payoutDestination->toArray()); self::assertEquals($options['payout_destination'], $instance->payout_destination->toArray()); } } /** * @dataProvider validDataProvider */ public function testGetCreatedAt(array $options): void { $instance = $this->getTestInstance($options); if (empty($options['created_at'])) { self::assertNull($instance->getCreatedAt()); self::assertNull($instance->created_at); self::assertNull($instance->createdAt); } else { self::assertEquals($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider */ public function testGetDeal(array $options): void { $instance = $this->getTestInstance($options); if (empty($options['deal'])) { self::assertNull($instance->getDeal()); self::assertNull($instance->deal); } else { $instance->setDeal($options['deal']); self::assertSame($options['deal'], $instance->getDeal()->toArray()); self::assertSame($options['deal'], $instance->deal->toArray()); } } /** * @dataProvider validDataProvider */ public function testGetTest(array $options): void { $instance = $this->getTestInstance($options); if (!isset($options['test'])) { self::assertNull($instance->getTest()); } else { self::assertEquals($options['test'], $instance->getTest()); } } /** * @dataProvider validDataProvider */ public function testGetCancellationDetails(array $options): void { $instance = $this->getTestInstance($options); if (empty($options['cancellation_details'])) { self::assertNull($instance->getCancellationDetails()); } else { self::assertEquals( $options['cancellation_details']['party'], $instance->getCancellationDetails()->getParty() ); self::assertEquals( $options['cancellation_details']['reason'], $instance->getCancellationDetails()->getReason() ); } } /** * @dataProvider validDataProvider */ public function testGetMetadata(array $options): void { $instance = $this->getTestInstance($options); if (empty($options['metadata'])) { self::assertNull($instance->getMetadata()); } else { self::assertEquals($options['metadata'], $instance->getMetadata()->toArray()); } } public static function validDataProvider(): array { $result = []; $cancellationDetailsParties = PayoutCancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); $cancellationDetailsReasons = PayoutCancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); $payoutDestinations = [ PayoutDestinationType::YOO_MONEY => [ 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => Random::str(11, 33, '1234567890'), ], PayoutDestinationType::BANK_CARD => [ 'type' => PaymentMethodType::BANK_CARD, 'card' => [ 'first6' => Random::str(6, '0123456789'), 'last4' => Random::str(4, '0123456789'), 'card_type' => Random::value(BankCardType::getValidValues()), 'issuer_country' => 'RU', 'issuer_name' => 'SberBank', ], ], PayoutDestinationType::SBP => [ 'type' => PaymentMethodType::SBP, 'phone' => Random::str(4, 15, '0123456789'), 'bank_id' => Random::str(4, 12, '0123456789'), 'recipient_checked' => Random::bool(), ] ]; $result[] = [ [ 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => ['value' => Random::int(1, 10000), 'currency' => 'RUB'], 'description' => Random::str(1, Payout::MAX_LENGTH_DESCRIPTION), 'payout_destination' => $payoutDestinations[Random::value(PayoutDestinationType::getValidValues())], 'created_at' => date(YOOKASSA_DATE, Random::int(111111111, time())), 'test' => true, 'deal' => ['id' => Random::str(36, 50)], 'metadata' => ['order_id' => '37'], 'cancellation_details' => [ 'party' => Random::value($cancellationDetailsParties), 'reason' => Random::value($cancellationDetailsReasons), ], ], ]; $result[] = [ [ 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => ['value' => Random::int(1, 10000), 'currency' => 'RUB'], 'description' => Random::str(1, Payout::MAX_LENGTH_DESCRIPTION), 'payout_destination' => $payoutDestinations[Random::value(PayoutDestinationType::getValidValues())], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'test' => true, 'metadata' => null, 'cancellation_details' => null, ], ]; for ($i = 0; $i < 20; $i++) { $payment = [ 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => ['value' => Random::int(1, 10000), 'currency' => 'RUB'], 'description' => (0 === $i ? null : (1 === $i ? '' : (2 === $i ? Random::str(Payout::MAX_LENGTH_DESCRIPTION) : Random::str(1, Payout::MAX_LENGTH_DESCRIPTION)))), 'payout_destination' => $payoutDestinations[Random::value(PayoutDestinationType::getValidValues())], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'test' => (bool) ($i % 2), 'metadata' => [Random::str(3, 128, 'abcdefghijklmnopqrstuvwxyz') => Random::str(1, 512)], 'cancellation_details' => [ 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons], ], ]; $result[] = [$payment]; } return $result; } /** * @param mixed $options */ abstract protected function getTestInstance($options): PayoutInterface; } yookassa-sdk-php/tests/Request/Payouts/IncomeReceiptDataTest.php000064400000004401150364342670021101 0ustar00getTestInstance($options); self::assertEquals($options['service_name'], $instance->getServiceName()); } public static function validDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $deal = [ 'service_name' => Random::str(36, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), 'amount' => new MonetaryAmount(Random::int(1, 1000000)), ]; $result[] = [$deal]; } return $result; } /** * @dataProvider invalidServiceNameDataProvider * * @param mixed $value */ public function testSetInvalidServiceName($value): void { $this->expectException(InvalidArgumentException::class); $instance = new IncomeReceiptData(); $instance->setServiceName($value); } /** * @return array * @throws Exception */ public static function invalidServiceNameDataProvider(): array { return [ [''], [false], [Random::str(IncomeReceipt::MAX_LENGTH_SERVICE_NAME + 1, 60)], ]; } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetInvalidAmountToken($value): void { $this->expectException(InvalidArgumentException::class); $instance = new IncomeReceiptData(); $instance->setAmount($value); } public static function invalidAmountDataProvider(): array { return [ [false], [true], [new stdClass()], ]; } /** * @param mixed $options */ protected function getTestInstance($options): IncomeReceiptData { return new IncomeReceiptData($options); } } yookassa-sdk-php/tests/Request/Payouts/PayoutResponseTest.php000064400000000457150364342670020570 0ustar00build($options); $data = $serializer->serialize($instance); $request = new CreatePayoutRequest($options); $expected = $request->toArray(); self::assertEquals($expected, $data); } /** * @throws Exception */ public static function validDataProvider(): array { $metadata = new Metadata(); $metadata->test = 'test'; $result = [ [ [ 'amount' => new MonetaryAmount(Random::int(1, 1000000)), 'payoutToken' => uniqid('', true), 'payoutDestinationData' => null, 'metadata' => null, 'description' => null, 'deal' => null, 'payment_method_id' => null, 'self_employed' => null, 'receipt_data' => null, 'personal_data' => null, ], ], [ [ 'amount' => new MonetaryAmount(Random::int(1, 1000000)), 'payoutToken' => '', 'payoutDestinationData' => Random::value(self::payoutDestinationData()), 'metadata' => [Random::str(1)], 'description' => '', 'deal' => new PayoutDealInfo(['id' => Random::str(36, 50)]), 'payment_method_id' => '', 'self_employed' => new PayoutSelfEmployedInfo(['id' => Random::str(36, 50)]), 'receipt_data' => new IncomeReceiptData(['service_name' => Random::str(1, 50)]), 'personal_data' => [new PayoutPersonalData(['id' => Random::str(36, 50)])], ], ], ]; for ($i = 0; $i < 10; $i++) { $even = ($i % 3); $request = [ 'amount' => new MonetaryAmount(Random::int(1, 1000000)), 'payoutToken' => $even === 0 ? uniqid('', true) : null, 'payoutDestinationData' => $even === 1 ? Random::value(self::payoutDestinationData()) : null, 'metadata' => $even ? $metadata : ['test' => 'test'], 'description' => Random::str(5, 128), 'deal' => $even ? new PayoutDealInfo(['id' => Random::str(36, 50)]) : ['id' => Random::str(36, 50)], 'payment_method_id' => $even === 2 ? Random::str(5, 128) : null, 'self_employed' => $even ? new PayoutSelfEmployedInfo(['id' => Random::str(36, 50)]) : ['id' => Random::str(36, 50)], 'receipt_data' => $even ? new IncomeReceiptData(['service_name' => Random::str(36, 50), 'amount' => new MonetaryAmount(Random::int(1, 1000000))]) : ['service_name' => Random::str(36, 50), 'amount' => ['value' => Random::int(1, 1000000) . '.00', 'currency' => CurrencyCode::RUB]], 'personal_data' => [$even ? new PayoutPersonalData(['id' => Random::str(36, 50)]) : ['id' => Random::str(36, 50)]], ]; $result[] = [$request]; } return $result; } public static function payoutDestinationData(): array { return [ [ 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => Random::str(11, 33, '0123456789'), ], [ 'type' => PaymentMethodType::BANK_CARD, 'card' => [ 'number' => Random::str(16, 16, '0123456789'), ], ], [ 'type' => PaymentMethodType::SBP, 'phone' => Random::str(4, 15, '0123456789'), 'bank_id' => Random::str(4, 12, '0123456789'), ], ]; } } yookassa-sdk-php/tests/Request/Payouts/CreatePayoutRequestBuilderTest.php000064400000033466150364342670023063 0ustar00setOptions($options); $instance = $builder->build(); if (empty($options['deal'])) { self::assertNull($instance->getDeal()); } else { self::assertNotNull($instance->getDeal()); self::assertEquals($options['deal'], $instance->getDeal()->toArray()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetSelfEmployed($options): void { $builder = new CreatePayoutRequestBuilder(); $builder->setOptions($options); $instance = $builder->build(); if (empty($options['self_employed'])) { self::assertNull($instance->getSelfEmployed()); } else { self::assertNotNull($instance->getSelfEmployed()); if (is_array($options['self_employed'])) { self::assertEquals($options['self_employed'], $instance->getSelfEmployed()->toArray()); } else { self::assertEquals($options['self_employed'], $instance->getSelfEmployed()); } } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetReceiptData($options): void { $builder = new CreatePayoutRequestBuilder(); $builder->setOptions($options); $instance = $builder->build(); if (empty($options['receipt_data'])) { self::assertNull($instance->getReceiptData()); } else { self::assertNotNull($instance->getReceiptData()); if (is_array($options['receipt_data'])) { self::assertEquals($options['receipt_data'], $instance->getReceiptData()->toArray()); } else { self::assertEquals($options['receipt_data'], $instance->getReceiptData()); } } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetAmount($options): void { $builder = new CreatePayoutRequestBuilder(); $builder->setOptions($options); $instance = $builder->build(); self::assertNotNull($instance->getAmount()); if ($options['amount'] instanceof AmountInterface) { self::assertEquals($options['amount']->getValue(), $instance->getAmount()->getValue()); } else { self::assertEquals($options['amount']['value'], $instance->getAmount()->getValue()); } if (!$options['amount'] instanceof AmountInterface) { $builder->setAmount([ 'value' => $options['amount']['value'], 'currency' => 'EUR', ]); $builder->setPayoutToken($options['payoutDestinationData'] ? null : uniqid('', true)); $builder->setPayoutDestinationData($options['payoutDestinationData']); $instance = $builder->build(); self::assertEquals($options['amount']['value'], $instance->getAmount()->getValue()); } } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePayoutRequestBuilder(); $builder->setAmount($value); } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetPayoutToken($options): void { $builder = new CreatePayoutRequestBuilder(); $builder->setOptions($options); $instance = $builder->build(); if (empty($options['payoutToken'])) { self::assertNull($instance->getPayoutToken()); } else { self::assertNotNull($instance->getPayoutToken()); self::assertEquals($options['payoutToken'], $instance->getPayoutToken()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetPaymentMethodId($options): void { $builder = new CreatePayoutRequestBuilder(); $builder->setOptions($options); $instance = $builder->build(); if (empty($options['paymentMethodId'])) { self::assertNull($instance->getPaymentMethodId()); } else { self::assertNotNull($instance->getPaymentMethodId()); self::assertEquals($options['paymentMethodId'], $instance->getPaymentMethodId()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetPayoutDestinationData($options): void { $builder = new CreatePayoutRequestBuilder(); $builder->setOptions($options); $instance = $builder->build(); if (empty($options['payoutDestinationData'])) { self::assertNull($instance->getPayoutDestinationData()); } else { self::assertNotNull($instance->getPayoutDestinationData()); if (is_array($options['payoutDestinationData'])) { self::assertEquals($options['payoutDestinationData'], $instance->getPayoutDestinationData()->toArray()); } else { self::assertEquals($options['payoutDestinationData'], $instance->getPayoutDestinationData()); } } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetMetadata($options): void { $builder = new CreatePayoutRequestBuilder(); $builder->setOptions($options); $instance = $builder->build(); if (empty($options['metadata'])) { self::assertNull($instance->getMetadata()); } else { self::assertEquals($options['metadata'], $instance->getMetadata()->toArray()); } } public function invalidRecipientDataProvider(): array { return [ [null], [true], [false], [1], [1.1], ['test'], [new stdClass()], ]; } /** * @throws Exception */ public static function validDataProvider(): array { $payoutDestinationData = self::payoutDestinationData(); $result = [ [ [ 'description' => null, 'amount' => new MonetaryAmount(Random::int(1, 1000)), 'currency' => Random::value(CurrencyCode::getValidValues()), 'payoutToken' => null, 'paymentMethodId' => null, 'payoutDestinationData' => Random::value($payoutDestinationData), 'confirmation' => null, 'metadata' => null, 'deal' => [ 'id' => Random::str(36, 50), ], 'self_employed' => null, 'receipt_data' => null, ], ], [ [ 'description' => '', 'amount' => new MonetaryAmount(Random::int(1, 1000)), 'currency' => Random::value(CurrencyCode::getValidValues()), 'payoutToken' => uniqid('', true), 'paymentMethodId' => '', 'payoutDestinationData' => null, 'metadata' => [[]], 'deal' => [ 'id' => Random::str(36, 50), ], 'self_employed' => new PayoutSelfEmployedInfo([ 'id' => Random::str(36, 50), ]), 'receipt_data' => new IncomeReceiptData([ 'service_name' => Random::str(36, 50), 'amount' => new MonetaryAmount(Random::int(1, 99)), ]), ], ], ]; for ($i = 0; $i < 10; $i++) { $even = $i % 3; $request = [ 'description' => uniqid('', true), 'amount' => ['value' => Random::int(1, 99)], 'currency' => CurrencyCode::RUB, 'paymentMethodId' => $even === 0 ? uniqid('', true) : null, 'payoutToken' => $even === 1 ? uniqid('', true) : null, 'payoutDestinationData' => $even === 2 ? Random::value($payoutDestinationData) : null, 'metadata' => ['test' => 'test'], 'deal' => [ 'id' => Random::str(36, 50), ], 'self_employed' => new PayoutSelfEmployedInfo([ 'id' => Random::str(36, 50), ]), 'receipt_data' => [ 'service_name' => Random::str(36, 50), 'amount' => ['value' => Random::int(1, 99), 'currency' => CurrencyCode::RUB], ], ]; $result[] = [$request]; } return $result; } public static function payoutDestinationData(): array { return [ [ 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => Random::str(11, 33, '0123456789'), ], [ 'type' => PaymentMethodType::BANK_CARD, 'card' => [ 'number' => Random::str(16, 16, '0123456789'), ], ], [ 'type' => PaymentMethodType::SBP, 'phone' => Random::str(4, 15, '0123456789'), 'bank_id' => Random::str(4, 12, '0123456789'), ], ]; } public static function invalidAmountDataProvider(): array { return [ [-1], [true], [false], [new stdClass()], [0], ]; } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetDescription($options): void { $builder = new CreatePayoutRequestBuilder(); $builder->setOptions($options); $instance = $builder->build(); if (empty($options['description'])) { self::assertNull($instance->getDescription()); } else { self::assertEquals($options['description'], $instance->getDescription()); } } public function testSetInvalidLengthDescription(): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePayoutRequestBuilder(); $description = Random::str(Payout::MAX_LENGTH_DESCRIPTION + 1); $builder->setDescription($description); } /** * @throws Exception */ public static function invalidDealDataProvider(): array { return [ [true], [false], [new stdClass()], [0], [7], [Random::int(-100, -1)], [Random::int(7, 100)], ]; } /** * @dataProvider invalidDealDataProvider * * @param mixed $value */ public function testSetInvalidDeal($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePayoutRequestBuilder(); $builder->setDeal($value); } /** * @throws Exception */ public static function invalidSelfEmployedProvider(): array { return [ [true], [false], [new stdClass()], [0], [7], [Random::int(-100, -1)], [Random::int(7, 100)], ]; } /** * @dataProvider invalidSelfEmployedProvider * * @param mixed $value */ public function testSetInvalidSelfEmployed($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePayoutRequestBuilder(); $builder->setSelfEmployed($value); } /** * @param null $testingProperty * * @throws Exception */ protected function getRequiredData($testingProperty = null): array { $result = []; $even = Random::bool(); if ('amount' !== $testingProperty) { $result['amount'] = new MonetaryAmount(Random::int(1, 1000)); } if ('payoutToken' !== $testingProperty) { $result['payoutToken'] = $even ? Random::str(36, 50) : null; } $factory = new PayoutDestinationDataFactory(); if ('payoutDestinationData' !== $testingProperty) { $type = Random::value(PayoutDestinationType::getValidValues()); $payoutDestination = self::payoutDestinationData(); $result['payoutDestinationData'] = $even ? null : $factory->factory($type); } return $result; } } yookassa-sdk-php/tests/Request/Payouts/CreatePayoutRequestTest.php000064400000074345150364342670021555 0ustar00setAmount($options['amount']); self::assertSame($options['amount'], $instance->getAmount()); self::assertSame($options['amount'], $instance->amount); } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetInvalidAmountToken($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePayoutRequest(); $instance->setAmount($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testPayoutToken($options): void { $instance = new CreatePayoutRequest(); self::assertFalse($instance->hasPayoutToken()); self::assertNull($instance->getPayoutToken()); self::assertNull($instance->payoutToken); self::assertNull($instance->payout_token); $instance->setPayoutToken($options['payoutToken']); if (empty($options['payoutToken'])) { self::assertFalse($instance->hasPayoutToken()); self::assertNull($instance->getPayoutToken()); self::assertNull($instance->payoutToken); self::assertNull($instance->payout_token); } else { self::assertTrue($instance->hasPayoutToken()); self::assertSame($options['payoutToken'], $instance->getPayoutToken()); self::assertSame($options['payoutToken'], $instance->payoutToken); self::assertSame($options['payoutToken'], $instance->payout_token); } $instance->setPayoutToken(null); self::assertFalse($instance->hasPayoutToken()); self::assertNull($instance->getPayoutToken()); self::assertNull($instance->payoutToken); $instance->payoutToken = $options['payoutToken']; if (empty($options['payoutToken'])) { self::assertFalse($instance->hasPayoutToken()); self::assertNull($instance->getPayoutToken()); self::assertNull($instance->payoutToken); self::assertNull($instance->payout_token); } else { self::assertTrue($instance->hasPayoutToken()); self::assertSame($options['payoutToken'], $instance->getPayoutToken()); self::assertSame($options['payoutToken'], $instance->payoutToken); self::assertSame($options['payoutToken'], $instance->payout_token); } $instance->payoutToken = null; self::assertFalse($instance->hasPayoutToken()); self::assertNull($instance->getPayoutToken()); self::assertNull($instance->payoutToken); $instance->payout_token = $options['payoutToken']; if (empty($options['payoutToken'])) { self::assertFalse($instance->hasPayoutToken()); self::assertNull($instance->getPayoutToken()); self::assertNull($instance->payoutToken); self::assertNull($instance->payout_token); } else { self::assertTrue($instance->hasPayoutToken()); self::assertSame($options['payoutToken'], $instance->getPayoutToken()); self::assertSame($options['payoutToken'], $instance->payoutToken); self::assertSame($options['payoutToken'], $instance->payout_token); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testPaymentMethodId($options): void { $instance = new CreatePayoutRequest(); self::assertFalse($instance->hasPaymentMethodId()); self::assertNull($instance->getPaymentMethodId()); self::assertNull($instance->paymentMethodId); self::assertNull($instance->payment_method_id); $instance->setPaymentMethodId($options['payment_method_id']); if (empty($options['payment_method_id'])) { self::assertFalse($instance->hasPaymentMethodId()); self::assertNull($instance->getPaymentMethodId()); self::assertNull($instance->paymentMethodId); self::assertNull($instance->payment_method_id); } else { self::assertTrue($instance->hasPaymentMethodId()); self::assertSame($options['payment_method_id'], $instance->getPaymentMethodId()); self::assertSame($options['payment_method_id'], $instance->paymentMethodId); self::assertSame($options['payment_method_id'], $instance->payment_method_id); } $instance->setPaymentMethodId(null); self::assertFalse($instance->hasPaymentMethodId()); self::assertNull($instance->getPaymentMethodId()); self::assertNull($instance->paymentMethodId); $instance->paymentMethodId = $options['payment_method_id']; if (empty($options['payment_method_id'])) { self::assertFalse($instance->hasPaymentMethodId()); self::assertNull($instance->getPaymentMethodId()); self::assertNull($instance->paymentMethodId); self::assertNull($instance->payment_method_id); } else { self::assertTrue($instance->hasPaymentMethodId()); self::assertSame($options['payment_method_id'], $instance->getPaymentMethodId()); self::assertSame($options['payment_method_id'], $instance->paymentMethodId); self::assertSame($options['payment_method_id'], $instance->payment_method_id); } $instance->paymentMethodId = null; self::assertFalse($instance->hasPaymentMethodId()); self::assertNull($instance->getPaymentMethodId()); self::assertNull($instance->paymentMethodId); $instance->payment_method_id = $options['payment_method_id']; if (empty($options['payment_method_id'])) { self::assertFalse($instance->hasPaymentMethodId()); self::assertNull($instance->getPaymentMethodId()); self::assertNull($instance->paymentMethodId); self::assertNull($instance->payment_method_id); } else { self::assertTrue($instance->hasPaymentMethodId()); self::assertSame($options['payment_method_id'], $instance->getPaymentMethodId()); self::assertSame($options['payment_method_id'], $instance->paymentMethodId); self::assertSame($options['payment_method_id'], $instance->payment_method_id); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testPayoutDestinationData($options): void { $instance = new CreatePayoutRequest(); self::assertFalse($instance->hasPayoutDestinationData()); self::assertNull($instance->getPayoutDestinationData()); self::assertNull($instance->payoutDestinationData); self::assertNull($instance->payout_destination_data); $instance->setPayoutDestinationData($options['payoutDestinationData']); if (empty($options['payoutDestinationData'])) { self::assertFalse($instance->hasPayoutDestinationData()); self::assertNull($instance->getPayoutDestinationData()); self::assertNull($instance->payoutDestinationData); self::assertNull($instance->payout_destination_data); } else { self::assertTrue($instance->hasPayoutDestinationData()); self::assertEquals($options['payoutDestinationData'], $instance->getPayoutDestinationData()->toArray()); self::assertEquals($options['payoutDestinationData'], $instance->payoutDestinationData->toArray()); self::assertEquals($options['payoutDestinationData'], $instance->payout_destination_data->toArray()); } $instance->setPayoutDestinationData(null); self::assertFalse($instance->hasPayoutDestinationData()); self::assertNull($instance->getPayoutDestinationData()); self::assertNull($instance->payoutDestinationData); self::assertNull($instance->payout_destination_data); $instance->payoutDestinationData = $options['payoutDestinationData']; if (empty($options['payoutDestinationData'])) { self::assertFalse($instance->hasPayoutDestinationData()); self::assertNull($instance->getPayoutDestinationData()); self::assertNull($instance->payoutDestinationData); self::assertNull($instance->payout_destination_data); } else { self::assertTrue($instance->hasPayoutDestinationData()); self::assertEquals($options['payoutDestinationData'], $instance->getPayoutDestinationData()->toArray()); self::assertEquals($options['payoutDestinationData'], $instance->payoutDestinationData->toArray()); self::assertEquals($options['payoutDestinationData'], $instance->payout_destination_data->toArray()); } } /** * @dataProvider invalidPayoutDestinationDataDataProvider * * @param mixed $value */ public function testSetInvalidPayoutDestinationData($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePayoutRequest(); $instance->setPayoutDestinationData($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testDescription($options): void { $instance = new CreatePayoutRequest(); self::assertFalse($instance->hasDescription()); self::assertNull($instance->getDescription()); self::assertNull($instance->description); $expected = $options['description']; $instance->setDescription($options['description']); if (empty($options['description'])) { self::assertFalse($instance->hasDescription()); self::assertNull($instance->getDescription()); self::assertNull($instance->description); } else { self::assertTrue($instance->hasDescription()); self::assertSame($expected, $instance->getDescription()); self::assertSame($expected, $instance->description); } $instance->setDescription(null); self::assertFalse($instance->hasDescription()); self::assertNull($instance->getDescription()); self::assertNull($instance->description); $instance->description = $options['description']; if (empty($options['description'])) { self::assertFalse($instance->hasDescription()); self::assertNull($instance->getDescription()); self::assertNull($instance->description); } else { self::assertTrue($instance->hasDescription()); self::assertSame($expected, $instance->getDescription()); self::assertSame($expected, $instance->description); } } /** * @dataProvider invalidDescriptionDataProvider * * @param mixed $value */ public function testSetInvalidDescription($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePayoutRequest(); $instance->setDescription($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testDeal($options): void { $instance = new CreatePayoutRequest(); self::assertFalse($instance->hasDeal()); self::assertNull($instance->getDeal()); self::assertNull($instance->deal); $expected = $options['deal']; if ($expected instanceof PayoutDealInfo) { $expected = $expected->toArray(); } $instance->setDeal($options['deal']); if (empty($options['deal'])) { self::assertFalse($instance->hasDeal()); self::assertNull($instance->getDeal()); self::assertNull($instance->deal); } else { self::assertTrue($instance->hasDeal()); self::assertSame($expected, $instance->getDeal()->toArray()); self::assertSame($expected, $instance->deal->toArray()); } $instance->setDeal(null); self::assertFalse($instance->hasDeal()); self::assertNull($instance->getDeal()); self::assertNull($instance->deal); $instance->deal = $options['deal']; if (empty($options['deal'])) { self::assertFalse($instance->hasDeal()); self::assertNull($instance->getDeal()); self::assertNull($instance->deal); } else { self::assertTrue($instance->hasDeal()); self::assertSame($expected, $instance->getDeal()->toArray()); self::assertSame($expected, $instance->deal->toArray()); } } /** * @dataProvider invalidDealDataProvider * * @param mixed $value */ public function testSetInvalidDeal($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePayoutRequest(); $instance->setDeal($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSelfEmployed($options): void { $instance = new CreatePayoutRequest(); self::assertFalse($instance->hasSelfEmployed()); self::assertNull($instance->getSelfEmployed()); self::assertNull($instance->self_employed); self::assertNull($instance->selfEmployed); $expected = $options['self_employed']; if ($expected instanceof PayoutSelfEmployedInfo) { $expected = $expected->toArray(); } $instance->setSelfEmployed($options['self_employed']); if (empty($options['self_employed'])) { self::assertFalse($instance->hasSelfEmployed()); self::assertNull($instance->getSelfEmployed()); self::assertNull($instance->self_employed); self::assertNull($instance->selfEmployed); } else { self::assertTrue($instance->hasSelfEmployed()); self::assertSame($expected, $instance->getSelfEmployed()->toArray()); self::assertSame($expected, $instance->self_employed->toArray()); self::assertSame($expected, $instance->selfEmployed->toArray()); } $instance->setSelfEmployed(null); self::assertFalse($instance->hasSelfEmployed()); self::assertNull($instance->getSelfEmployed()); self::assertNull($instance->self_employed); self::assertNull($instance->selfEmployed); $instance->self_employed = $options['self_employed']; if (empty($options['self_employed'])) { self::assertFalse($instance->hasSelfEmployed()); self::assertNull($instance->getSelfEmployed()); self::assertNull($instance->self_employed); self::assertNull($instance->selfEmployed); } else { self::assertTrue($instance->hasSelfEmployed()); self::assertSame($expected, $instance->getSelfEmployed()->toArray()); self::assertSame($expected, $instance->self_employed->toArray()); self::assertSame($expected, $instance->selfEmployed->toArray()); } } /** * @dataProvider invalidSelfEmployedDataProvider * * @param mixed $value */ public function testSetInvalidSelfEmployed($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePayoutRequest(); $instance->setSelfEmployed($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testReceiptData($options): void { $instance = new CreatePayoutRequest(); self::assertFalse($instance->hasReceiptData()); self::assertNull($instance->getReceiptData()); self::assertNull($instance->receipt_data); self::assertNull($instance->receiptData); $expected = $options['receipt_data']; if ($expected instanceof IncomeReceiptData) { $expected = $expected->toArray(); } $instance->setReceiptData($options['receipt_data']); if (empty($options['receipt_data'])) { self::assertFalse($instance->hasReceiptData()); self::assertNull($instance->getReceiptData()); self::assertNull($instance->receipt_data); self::assertNull($instance->receiptData); } else { self::assertTrue($instance->hasReceiptData()); self::assertSame($expected, $instance->getReceiptData()->toArray()); self::assertSame($expected, $instance->receipt_data->toArray()); self::assertSame($expected, $instance->receiptData->toArray()); } $instance->setReceiptData(null); self::assertFalse($instance->hasReceiptData()); self::assertNull($instance->getReceiptData()); self::assertNull($instance->receipt_data); self::assertNull($instance->receiptData); $instance->receipt_data = $options['receipt_data']; if (empty($options['receipt_data'])) { self::assertFalse($instance->hasReceiptData()); self::assertNull($instance->getReceiptData()); self::assertNull($instance->receipt_data); self::assertNull($instance->receiptData); } else { self::assertTrue($instance->hasReceiptData()); self::assertSame($expected, $instance->getReceiptData()->toArray()); self::assertSame($expected, $instance->receipt_data->toArray()); self::assertSame($expected, $instance->receiptData->toArray()); } } /** * @dataProvider invalidReceiptDataProvider * * @param mixed $value */ public function testSetInvalidReceiptData($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePayoutRequest(); $instance->setReceiptData($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testPersonalData($options): void { $instance = new CreatePayoutRequest(); self::assertFalse($instance->hasPersonalData()); self::assertEmpty($instance->getPersonalData()); self::assertEmpty($instance->personal_data); self::assertNull($instance->receiptData); $instance->setPersonalData($options['personal_data']); if (empty($options['personal_data'])) { self::assertFalse($instance->hasPersonalData()); self::assertEmpty($instance->getPersonalData()); self::assertEmpty($instance->personal_data); self::assertNull($instance->receiptData); } else { self::assertTrue($instance->hasPersonalData()); foreach ($options['personal_data'] as $key => $expected) { if ($expected instanceof PayoutPersonalData) { $expected = $expected->toArray(); } $array = $instance->getPersonalData(); self::assertSame($expected, $array[$key]->toArray()); $array = $instance->personal_data; self::assertSame($expected, $array[$key]->toArray()); $array = $instance->personalData; self::assertSame($expected, $array[$key]->toArray()); } } $instance->setPersonalData(null); self::assertFalse($instance->hasPersonalData()); self::assertEmpty($instance->getPersonalData()); self::assertEmpty($instance->personal_data); self::assertEmpty($instance->personalData); $instance->personal_data = $options['personal_data']; if (empty($options['personal_data'])) { self::assertFalse($instance->hasPersonalData()); self::assertEmpty($instance->getPersonalData()); self::assertEmpty($instance->personal_data); self::assertEmpty($instance->personalData); } else { self::assertTrue($instance->hasPersonalData()); foreach ($options['personal_data'] as $key => $expected) { if ($expected instanceof PayoutPersonalData) { $expected = $expected->toArray(); } $array = $instance->getPersonalData(); self::assertSame($expected, $array[$key]->toArray()); $array = $instance->personal_data; self::assertSame($expected, $array[$key]->toArray()); $array = $instance->personalData; self::assertSame($expected, $array[$key]->toArray()); } } } /** * @dataProvider invalidPersonalDataProvider * * @param mixed $value */ public function testSetInvalidPersonalData($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePayoutRequest(); $instance->setPersonalData($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testMetadata($options): void { $instance = new CreatePayoutRequest(); self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); $expected = $options['metadata']; if ($expected instanceof Metadata) { $expected = $expected->toArray(); } $instance->setMetadata($options['metadata']); if (empty($options['metadata'])) { self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); } else { self::assertTrue($instance->hasMetadata()); self::assertSame($expected, $instance->getMetadata()->toArray()); self::assertSame($expected, $instance->metadata->toArray()); } $instance->setMetadata(null); self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); $instance->metadata = $options['metadata']; if (empty($options['metadata'])) { self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); } else { self::assertTrue($instance->hasMetadata()); self::assertSame($expected, $instance->getMetadata()->toArray()); self::assertSame($expected, $instance->metadata->toArray()); } } /** * @dataProvider invalidMetadataDataProvider * * @param mixed $value */ public function testSetInvalidMetadata($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePayoutRequest(); $instance->setMetadata($value); } public function testValidate(): void { $instance = new CreatePayoutRequest(); self::assertFalse($instance->validate()); $amount = new MonetaryAmount(1); $instance->setAmount($amount); self::assertFalse($instance->validate()); $instance->setAmount(new MonetaryAmount(10)); self::assertFalse($instance->validate()); $instance->setPayoutToken(null); self::assertFalse($instance->validate()); $instance->setDescription('test'); self::assertFalse($instance->validate()); $instance->setDeal(new PayoutDealInfo(['id' => Random::str(36, 50)])); self::assertFalse($instance->validate()); $instance->setAmount(new MonetaryAmount(1)); self::assertFalse($instance->validate()); $instance->setPayoutToken(Random::str(10)); $instance->setPaymentMethodId('test'); self::assertFalse($instance->validate()); $instance->setPersonalData([new PayoutPersonalData(['id' => Random::str(36, 50)])]); self::assertFalse($instance->validate()); $instance->setReceiptData(new IncomeReceiptData(['service_name' => Random::str(1, 50)])); self::assertFalse($instance->validate()); $instance->setSelfEmployed(new PayoutSelfEmployedInfo(['id' => Random::str(36, 50)])); self::assertFalse($instance->validate()); $instance->setPayoutToken(Random::str(10)); $instance->setPayoutDestinationData(new PayoutDestinationDataBankCard()); self::assertFalse($instance->validate()); $instance->setPayoutToken(null); $instance->setPaymentMethodId(null); self::assertTrue($instance->validate()); } public function testBuilder(): void { $builder = CreatePayoutRequest::builder(); self::assertInstanceOf(CreatePayoutRequestBuilder::class, $builder); } public static function validDataProvider(): array { $metadata = new Metadata(); $metadata->test = 'test'; $result = [ [ [ 'amount' => new MonetaryAmount(Random::int(1, 1000000)), 'payoutToken' => null, 'payoutDestinationData' => null, 'metadata' => null, 'description' => null, 'deal' => null, 'payment_method_id' => null, 'self_employed' => null, 'receipt_data' => null, 'personal_data' => null, ], ], [ [ 'amount' => new MonetaryAmount(Random::int(1, 1000000)), 'payoutToken' => '', 'payoutDestinationData' => Random::value(self::payoutDestinationData()), 'metadata' => [new Metadata()], 'description' => '', 'deal' => new PayoutDealInfo(['id' => Random::str(36, 50)]), 'payment_method_id' => '', 'self_employed' => new PayoutSelfEmployedInfo(['id' => Random::str(36, 50)]), 'receipt_data' => new IncomeReceiptData(['service_name' => Random::str(1, 50)]), 'personal_data' => [new PayoutPersonalData(['id' => Random::str(36, 50)])], ], ], ]; for ($i = 0; $i < 10; $i++) { $request = [ 'amount' => new MonetaryAmount(Random::int(1, 1000000)), 'payoutToken' => uniqid('', true), 'payoutDestinationData' => Random::value(self::payoutDestinationData()), 'metadata' => ($i % 2) ? $metadata : ['test' => 'test'], 'description' => Random::str(5, 128), 'deal' => ($i % 2) ? new PayoutDealInfo(['id' => Random::str(36, 50)]) : ['id' => Random::str(36, 50)], 'payment_method_id' => Random::str(5, 128), 'self_employed' => ($i % 2) ? new PayoutSelfEmployedInfo(['id' => Random::str(36, 50)]) : ['id' => Random::str(36, 50)], 'receipt_data' => ($i % 2) ? new IncomeReceiptData(['service_name' => Random::str(36, 50), 'amount' => new MonetaryAmount(Random::int(1, 1000000))]) : ['service_name' => Random::str(36, 50), 'amount' => ['value' => Random::int(1, 1000000) . '.00', 'currency' => CurrencyCode::RUB]], 'personal_data' => [($i % 2) ? new PayoutPersonalData(['id' => Random::str(36, 50)]) : ['id' => Random::str(36, 50)]], ]; $result[] = [$request]; } return $result; } public static function payoutDestinationData(): array { return [ [ 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => Random::str(11, 33, '0123456789'), ], [ 'type' => PaymentMethodType::BANK_CARD, 'card' => [ 'number' => Random::str(16, 16, '0123456789'), ], ], [ 'type' => PaymentMethodType::SBP, 'phone' => Random::str(4, 15, '0123456789'), 'bank_id' => Random::str(4, 12, '0123456789'), ], ]; } public static function invalidAmountDataProvider(): array { return [ [null], [''], [false], [true], [new stdClass()], ]; } public static function invalidPayoutDestinationDataDataProvider(): array { return [ [[]], [false], [true], [1], [Random::str(10)], [new stdClass()], ]; } public static function invalidMetadataDataProvider(): array { return [ [false], [true], [1], [Random::str(10)], ]; } public static function invalidDescriptionDataProvider(): array { return [ [Random::str(Payout::MAX_LENGTH_DESCRIPTION + 1)], ]; } public static function invalidDealDataProvider(): array { return [ [false], [true], [new stdClass()], [Random::str(10)], ]; } public static function invalidSelfEmployedDataProvider(): array { return [ [false], [true], [new stdClass()], [Random::str(10)], ]; } public static function invalidReceiptDataProvider(): array { return [ [false], [true], [new stdClass()], [Random::str(10)], ]; } public static function invalidPersonalDataProvider(): array { return [ [new stdClass()], [Random::str(10)], ]; } } yookassa-sdk-php/tests/Request/Payouts/PayoutPersonalDataTest.php000064400000003347150364342670021350 0ustar00getTestInstance($options); self::assertEquals($options['id'], $instance->getId()); } public static function validDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $deal = [ 'id' => Random::str(36, 50), ]; $result[] = [$deal]; } return $result; } /** * @dataProvider invalidIdDataProvider * * @param mixed $value */ public function testSetInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PayoutPersonalData(); $instance->setId($value); } /** * @dataProvider invalidIdDataProvider * * @param mixed $value */ public function testSetterInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PayoutPersonalData(); $instance->id = $value; } public static function invalidIdDataProvider(): array { return [ [false], [true], [Random::str(1, 35)], [Random::str(51, 60)], ]; } /** * @param mixed $options */ protected function getTestInstance($options): PayoutPersonalData { return new PayoutPersonalData($options); } } yookassa-sdk-php/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataYooMoneyTest.php000064400000005775150364342670030031 0ustar00getTestInstance(); $instance->setAccountNumber($value); if (null === $value || '' === $value || [] === $value) { self::assertNull($instance->getAccountNumber()); self::assertNull($instance->accountNumber); self::assertNull($instance->account_number); } else { $expected = $value; self::assertEquals($expected, $instance->getAccountNumber()); self::assertEquals($expected, $instance->accountNumber); self::assertEquals($expected, $instance->account_number); } $instance = $this->getTestInstance(); $instance->account_number = $value; if (null === $value || '' === $value || [] === $value) { self::assertNull($instance->getAccountNumber()); self::assertNull($instance->accountNumber); self::assertNull($instance->account_number); } else { $expected = $value; self::assertEquals($expected, $instance->getAccountNumber()); self::assertEquals($expected, $instance->accountNumber); self::assertEquals($expected, $instance->account_number); } } /** * @dataProvider invalidAccountNumberDataProvider * * @param mixed $value */ public function testSetInvalidAccountNumber($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setAccountNumber($value); } /** * @dataProvider invalidAccountNumberDataProvider * * @param mixed $value */ public function testSetterInvalidAccountNumber($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->account_number = $value; } public static function validAccountNumberDataProvider(): array { return [ [1234567894560], ['0123456789456'], [Random::str(11, 33, '0123456789')], ]; } public static function invalidAccountNumberDataProvider(): array { return [ [0], [''], [null], [Random::str(34, 50, '0123456789')], [true], [Random::str(1, 10, '0123456789')], ]; } protected function getTestInstance(): PayoutDestinationDataYooMoney { return new PayoutDestinationDataYooMoney(); } protected function getExpectedType(): string { return PaymentMethodType::YOO_MONEY; } } yookassa-sdk-php/tests/Request/Payouts/PayoutDestinationData/AbstractTestPayoutDestinationData.php000064400000002352150364342670030002 0ustar00getTestInstance(); self::assertEquals($this->getExpectedType(), $instance->getType()); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testInvalidType($value): void { $this->expectException(InvalidArgumentException::class); new TestPaymentData($value); } public static function invalidTypeDataProvider(): array { return [ [''], [null], [Random::str(40)], [0], ]; } abstract protected function getTestInstance(): AbstractPayoutDestinationData; abstract protected function getExpectedType(): string; } class TestPaymentData extends AbstractPayoutDestinationData { public function __construct($type) { parent::__construct(); $this->setType($type); } } yookassa-sdk-php/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataSbpTest.php000064400000010753150364342670026767 0ustar00getTestInstance(); $instance->setPhone($value); if (null === $value || '' === $value) { self::assertNull($instance->getPhone()); self::assertNull($instance->phone); } else { $expected = $value; self::assertEquals($expected, $instance->getPhone()); self::assertEquals($expected, $instance->phone); } $instance = $this->getTestInstance(); $instance->phone = $value; if (null === $value || '' === $value) { self::assertNull($instance->getPhone()); self::assertNull($instance->phone); } else { $expected = $value; self::assertEquals($expected, $instance->getPhone()); self::assertEquals($expected, $instance->phone); } } /** * @dataProvider invalidPhoneDataProvider * * @param mixed $value */ public function testSetInvalidPhone($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setPhone($value); } /** * @dataProvider invalidPhoneDataProvider * * @param mixed $value */ public function testSetterInvalidPhone($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->phone = $value; } /** * @dataProvider validBankIdDataProvider */ public function testGetSetBankId(string $value): void { $instance = $this->getTestInstance(); $instance->setBankId($value); if (null === $value || '' === $value) { self::assertNull($instance->getBankId()); self::assertNull($instance->bankId); self::assertNull($instance->bank_id); } else { $expected = $value; self::assertEquals($expected, $instance->getBankId()); self::assertEquals($expected, $instance->bankId); self::assertEquals($expected, $instance->bank_id); } $instance = $this->getTestInstance(); $instance->bankId = $value; if (null === $value || '' === $value) { self::assertNull($instance->getBankId()); self::assertNull($instance->bankId); self::assertNull($instance->bank_id); } else { $expected = $value; self::assertEquals($expected, $instance->getBankId()); self::assertEquals($expected, $instance->bankId); self::assertEquals($expected, $instance->bank_id); } } /** * @dataProvider invalidBankIdDataProvider * * @param mixed $value */ public function testSetInvalidBankId($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setBankId($value); } /** * @dataProvider invalidBankIdDataProvider * * @param mixed $value */ public function testSetterInvalidBankId($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->bankId = $value; } public static function validPhoneDataProvider(): array { return [ [Random::str(4, 15, '0123456789')], [Random::str(4, 15, '0123456789')], ]; } public static function invalidPhoneDataProvider(): array { return [ [null], [''], ]; } public static function validBankIdDataProvider(): array { return [ [Random::str(7, 12, '0123456789')], [Random::str(7, 12, '0123456789')], ]; } public static function invalidBankIdDataProvider(): array { return [ [null], [''], [Random::str(13)], ]; } protected function getTestInstance(): PayoutDestinationDataSbp { return new PayoutDestinationDataSbp(); } protected function getExpectedType(): string { return PaymentMethodType::SBP; } } yookassa-sdk-php/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataBankCardTest.php000064400000006716150364342670027714 0ustar00getTestInstance(); $instance->setCard($value); if (null === $value || '' === $value || [] === $value) { self::assertNull($instance->getCard()); self::assertNull($instance->card); } else { if (is_array($value)) { $expected = new PayoutDestinationDataBankCardCard(); foreach ($value as $property => $val) { $expected->offsetSet($property, $val); } } else { $expected = $value; } self::assertEquals($expected, $instance->getCard()); self::assertEquals($expected, $instance->card); } $instance = $this->getTestInstance(); $instance->card = $value; if (null === $value || '' === $value || [] === $value) { self::assertNull($instance->getCard()); self::assertNull($instance->card); } else { if (is_array($value)) { $expected = new PayoutDestinationDataBankCardCard($value); } else { $expected = $value; } self::assertEquals($expected, $instance->getCard()); self::assertEquals($expected, $instance->card); self::assertEquals($expected['number'], $instance->getCard()->getNumber()); self::assertEquals($expected['number'], $instance->card->number); } } /** * @dataProvider invalidCardDataProvider * * @param mixed $value */ public function testSetInvalidCard($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCard($value); } /** * @dataProvider invalidCardDataProvider * * @param mixed $value */ public function testSetterInvalidCard($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->card = $value; } public static function validCardDataProvider(): array { return [ [null], [new PayoutDestinationDataBankCardCard(['number' => Random::str(16, '0123456789')])], [[ 'number' => Random::str(16, '0123456789'), ]], ]; } public static function invalidCardDataProvider(): array { return [ [0], [1], [-1], ['5'], [true], [new stdClass()], [new DateTime()], [['number' => '']], [['number' => null]], [['number' => Random::str(16)]], ]; } protected function getTestInstance(): PayoutDestinationDataBankCard { return new PayoutDestinationDataBankCard(); } protected function getExpectedType(): string { return PaymentMethodType::BANK_CARD; } } yookassa-sdk-php/tests/Request/Payouts/PayoutDestinationData/PayoutDestinationDataFactoryTest.php000064400000010316150364342670027645 0ustar00getTestInstance(); $paymentData = $instance->factory($type); self::assertNotNull($paymentData); self::assertInstanceOf(AbstractPayoutDestinationData::class, $paymentData); self::assertEquals($type, $paymentData->getType()); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $type */ public function testInvalidFactory($type): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factory($type); } /** * @dataProvider validArrayDataProvider */ public function testFactoryFromArray(array $options): void { $instance = $this->getTestInstance(); $paymentData = $instance->factoryFromArray($options); self::assertNotNull($paymentData); self::assertInstanceOf(AbstractPayoutDestinationData::class, $paymentData); foreach ($options as $property => $value) { self::assertEquals($paymentData->{$property}, $value); } $type = $options['type']; unset($options['type']); $paymentData = $instance->factoryFromArray($options, $type); self::assertNotNull($paymentData); self::assertInstanceOf(AbstractPayoutDestinationData::class, $paymentData); self::assertEquals($type, $paymentData->getType()); foreach ($options as $property => $value) { self::assertEquals($paymentData->{$property}, $value); } } /** * @dataProvider invalidDataArrayDataProvider * * @param mixed $options */ public function testInvalidFactoryFromArray($options): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } /** * @return array */ public static function validTypeDataProvider(): array { $result = []; foreach (PayoutDestinationType::getEnabledValues() as $value) { $result[] = [$value]; } return $result; } /** * @return array * @throws \Exception */ public static function invalidTypeDataProvider(): array { return [ [''], [0], [1], [-1], ['5'], [Random::str(10)], ]; } /** * @return \array[][] * @throws \Exception */ public static function validArrayDataProvider(): array { $result = [ [ [ 'type' => PaymentMethodType::BANK_CARD, 'card' => new PayoutDestinationDataBankCardCard(['number' => Random::str(16, '0123456789')]), ], ], [ [ 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => Random::str(11, 33, '1234567890'), ], ], ]; foreach (PayoutDestinationType::getEnabledValues() as $value) { $result[] = [['type' => $value]]; } return $result; } /** * @return array */ public static function invalidDataArrayDataProvider(): array { return [ [[]], [['type' => 'test']], ]; } /** * @return PayoutDestinationDataFactory */ protected function getTestInstance(): PayoutDestinationDataFactory { return new PayoutDestinationDataFactory(); } } yookassa-sdk-php/tests/Request/Payouts/PayoutSelfEmployedInfoTest.php000064400000003377150364342670022202 0ustar00getTestInstance($options); self::assertEquals($options['id'], $instance->getId()); } public static function validDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $deal = [ 'id' => Random::str(36, 50), ]; $result[] = [$deal]; } return $result; } /** * @dataProvider invalidIdDataProvider * * @param mixed $value */ public function testSetInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PayoutSelfEmployedInfo(); $instance->setId($value); } /** * @dataProvider invalidIdDataProvider * * @param mixed $value */ public function testSetterInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PayoutSelfEmployedInfo(); $instance->id = $value; } public static function invalidIdDataProvider(): array { return [ [false], [true], [Random::str(1, 35)], [Random::str(51, 60)], ]; } /** * @param mixed $options */ protected function getTestInstance($options): PayoutSelfEmployedInfo { return new PayoutSelfEmployedInfo($options); } } yookassa-sdk-php/tests/Request/Webhook/WebhookListResponseTest.php000064400000006602150364342670021471 0ustar00getType()); } /** * @dataProvider validDataProvider * * @throws Exception */ public function testGetItems(array $options): void { $instance = new WebhookListResponse($options); self::assertEquals(count($options['items']), count($instance->getItems())); foreach ($instance->getItems() as $index => $item) { self::assertInstanceOf(Webhook::class, $item); self::assertArrayHasKey($index, $options['items']); self::assertEquals($options['items'][$index]['id'], $item->getId()); self::assertEquals($options['items'][$index]['event'], $item->getEvent()); self::assertEquals($options['items'][$index]['url'], $item->getUrl()); } } /** * @dataProvider invalidDataProvider * * @throws Exception */ public function testInvalidData(array $options, string $exception) { $this->expectException($exception); new WebhookListResponse($options); } public function validDataProvider() { return [ [ [ 'type' => 'list', 'items' => $this->generateWebhooks(), ], ], ]; } private function generateWebhooks() { $return = []; $count = Random::int(1, 10); for ($i = 0; $i < $count; $i++) { $return[] = $this->generateWebhook(); } return $return; } private function generateWebhook() { return [ 'id' => Random::str(39), 'event' => Random::value(NotificationEventType::getValidValues()), 'url' => 'https://merchant-site.ru/notification_url', ]; } public function invalidDataProvider() { return [ [ [ 'type' => 'list', 'items' => [new Webhook()], ], EmptyPropertyValueException::class ], [ [ 'type' => 'test', 'items' => [], ], InvalidArgumentException::class ], [ [ 'type' => 'list', 'items' => [new Webhook( [ 'id' => Random::str(20), 'event' => NotificationEventType::REFUND_SUCCEEDED, 'url' => 'https://merchant-site.ru/notification_url', ], )], 'next_cursor' => 123 ], InvalidArgumentException::class ] ]; } } yookassa-sdk-php/tests/Request/Deals/DealsResponseTest.php000064400000031016150364342670017716 0ustar00getItems())); foreach ($instance->getItems() as $index => $item) { self::assertInstanceOf(DealInterface::class, $item); self::assertArrayHasKey($index, $options['items']); self::assertEquals($options['items'][$index]['id'], $item->getId()); self::assertEquals($options['items'][$index]['type'], $item->getType()); self::assertEquals($options['items'][$index]['status'], $item->getStatus()); self::assertEquals($options['items'][$index]['fee_moment'], $item->getFeeMoment()); self::assertEquals($options['items'][$index]['balance']['value'], $item->getBalance()->getValue()); self::assertEquals($options['items'][$index]['balance']['currency'], $item->getBalance()->getCurrency()); self::assertEquals($options['items'][$index]['payout_balance']['value'], $item->getPayoutBalance()->getValue()); self::assertEquals($options['items'][$index]['payout_balance']['currency'], $item->getPayoutBalance()->getCurrency()); self::assertEquals($options['items'][$index]['created_at'], $item->getCreatedAt()->format(YOOKASSA_DATE)); self::assertEquals($options['items'][$index]['expires_at'], $item->getExpiresAt()->format(YOOKASSA_DATE)); self::assertEquals($options['items'][$index]['test'], $item->getTest()); self::assertEquals($options['items'][$index]['description'], $item->getDescription()); } } else { self::assertEmpty($instance->getItems()); } } /** * @dataProvider validDataProvider */ public function testGetNextCursor(array $options): void { $instance = new DealsResponse($options); if (empty($options['next_cursor'])) { self::assertNull($instance->getNextCursor()); } else { self::assertEquals($options['next_cursor'], $instance->getNextCursor()); } } /** * @dataProvider validDataProvider */ public function testHasNext(array $options): void { $instance = new DealsResponse($options); if (empty($options['next_cursor'])) { self::assertFalse($instance->hasNextCursor()); } else { self::assertTrue($instance->hasNextCursor()); } } /** * @dataProvider validDataProvider */ public function testGetType(array $options): void { $instance = new DealsResponse($options); if (empty($options['type'])) { self::assertEquals('list', $instance->getType()); } else { self::assertEquals($options['type'], $instance->getType()); } } /** * @dataProvider invalidDataProvider */ public function testInvalidData(array $options): void { $this->expectException(InvalidArgumentException::class); new DealsResponse($options); } /** * @return array * @throws Exception */ public static function validDataProvider(): array { $statuses = DealStatus::getValidValues(); $types = DealType::getValidValues(); return [ [ [ 'items' => [], ], ], [ [ 'items' => [ [ 'id' => Random::str(36), 'type' => Random::value($types), 'status' => Random::value($statuses), 'description' => Random::str(128), 'balance' => [ 'value' => number_format(Random::float(0.01, 1000000.0), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'payout_balance' => [ 'value' => number_format(Random::float(0.01, 1000000.0), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'fee_moment' => Random::value(FeeMoment::getEnabledValues()), 'test' => Random::bool(), 'metadata' => [], ], ], 'next_cursor' => uniqid('', true), 'type' => 'list' ], ], [ [ 'items' => [ [ 'id' => Random::str(36), 'type' => Random::value($types), 'status' => Random::value($statuses), 'description' => Random::str(128), 'balance' => [ 'value' => number_format(Random::float(0.01, 1000000.0), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'payout_balance' => [ 'value' => number_format(Random::float(0.01, 1000000.0), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'fee_moment' => Random::value(FeeMoment::getEnabledValues()), 'test' => Random::bool(), 'metadata' => [], ], [ 'id' => Random::str(36), 'type' => Random::value($types), 'status' => Random::value($statuses), 'description' => Random::str(128), 'balance' => [ 'value' => number_format(Random::float(0.01, 1000000.0), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'payout_balance' => [ 'value' => number_format(Random::float(0.01, 1000000.0), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'fee_moment' => Random::value(FeeMoment::getEnabledValues()), 'test' => Random::bool(), 'metadata' => [], ], ], 'next_cursor' => uniqid('', true), ], ], [ [ 'items' => [ [ 'id' => Random::str(36), 'type' => Random::value($types), 'status' => Random::value($statuses), 'description' => Random::str(128), 'balance' => [ 'value' => number_format(Random::float(0.01, 1000000.0), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'payout_balance' => [ 'value' => number_format(Random::float(0.01, 1000000.0), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'fee_moment' => Random::value(FeeMoment::getEnabledValues()), 'test' => Random::bool(), 'metadata' => [], ], [ 'id' => Random::str(36), 'type' => Random::value($types), 'status' => Random::value($statuses), 'description' => Random::str(128), 'balance' => [ 'value' => number_format(Random::float(0.01, 1000000.0), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'payout_balance' => [ 'value' => number_format(Random::float(0.01, 1000000.0), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'fee_moment' => Random::value(FeeMoment::getEnabledValues()), 'test' => Random::bool(), 'metadata' => [], ], [ 'id' => Random::str(36), 'type' => Random::value($types), 'status' => Random::value($statuses), 'description' => Random::str(128), 'balance' => [ 'value' => number_format(Random::float(0.01, 1000000.0), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'payout_balance' => [ 'value' => number_format(Random::float(0.01, 1000000.0), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'fee_moment' => Random::value(FeeMoment::getEnabledValues()), 'test' => Random::bool(), 'metadata' => [], ], ], 'next_cursor' => uniqid('', true), ], ], ]; } /** * @return array * @throws Exception */ public static function invalidDataProvider(): array { return [ [ [ 'next_cursor' => uniqid('', true), 'items' => [ [ 'id' => 'null', 'type' => 'null', 'status' => null, 'description' => [], 'balance' => null, 'payout_balance' => null, 'created_at' => [], 'expires_at' => [], 'fee_moment' => Random::bool(), 'test' => null, 'metadata' => 'test', ], ], ], ], ]; } } yookassa-sdk-php/tests/Request/Deals/DealsRequestSerializerTest.php000064400000007124150364342670021605 0ustar00 'created_at.gte', 'createdAtGt' => 'created_at.gt', 'createdAtLte' => 'created_at.lte', 'createdAtLt' => 'created_at.lt', 'expiresAtGte' => 'expires_at.gte', 'expiresAtGt' => 'expires_at.gt', 'expiresAtLte' => 'expires_at.lte', 'expiresAtLt' => 'expires_at.lt', 'status' => 'status', 'fullTextSearch' => 'full_text_search', 'limit' => 'limit', 'cursor' => 'cursor', ]; /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSerialize($options): void { $serializer = new DealsRequestSerializer(); $data = $serializer->serialize(DealsRequest::builder()->build($options)); $expected = []; foreach ($this->fieldMap as $field => $mapped) { if (isset($options[$field])) { $value = $options[$field]; if (!empty($value)) { $expected[$mapped] = $value instanceof DateTime ? $value->format(YOOKASSA_DATE) : $value; } } } self::assertEquals($expected, $data); } public function validDataProvider(): array { $result = [ [ [ 'limit' => Random::int(1, DealsRequest::MAX_LIMIT_VALUE), ], ], [ [ 'fullTextSearch' => '', 'status' => '', 'limit' => 1, 'cursor' => '', ], ], ]; $statuses = DealStatus::getValidValues(); for ($i = 0; $i < 10; $i++) { $request = [ 'createdAtGte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtGt' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLt' => date(YOOKASSA_DATE, Random::int(1, time())), 'expiresAtGte' => date(YOOKASSA_DATE, Random::int(1, time())), 'expiresAtGt' => date(YOOKASSA_DATE, Random::int(1, time())), 'expiresAtLte' => date(YOOKASSA_DATE, Random::int(1, time())), 'expiresAtLt' => date(YOOKASSA_DATE, Random::int(1, time())), 'fullTextSearch' => Random::str(DealsRequest::MIN_LENGTH_DESCRIPTION, SafeDeal::MAX_LENGTH_DESCRIPTION), 'status' => $statuses[Random::int(0, count($statuses) - 1)], 'limit' => Random::int(1, 100), 'cursor' => $this->randomString(Random::int(2, 30)), ]; $result[] = [$request]; } return $result; } private function randomString($length, $any = true): string { static $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-+_.'; $result = ''; for ($i = 0; $i < $length; $i++) { if ($any) { $char = chr(Random::int(32, 126)); } else { $rnd = Random::int(0, strlen($chars) - 1); $char = $chars[$rnd]; } $result .= $char; } return $result; } } yookassa-sdk-php/tests/Request/Deals/DealsRequestBuilderTest.php000064400000024646150364342670021072 0ustar00build(); self::assertNull($instance->getCursor()); $builder->setCursor($options['cursor']); $instance = $builder->build(); if (empty($options['cursor'])) { self::assertNull($instance->getCursor()); } else { self::assertEquals($options['cursor'], $instance->getCursor()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetCreatedAtGte($options): void { $builder = new DealsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCreatedAtGte()); $builder->setCreatedAtGte($options['createdAtGte'] ?? null); $instance = $builder->build(); if (empty($options['createdAtGte'])) { self::assertNull($instance->getCreatedAtGte()); } else { self::assertEquals($options['createdAtGte'], $instance->getCreatedAtGte()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetCreatedGt($options): void { $builder = new DealsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCreatedAtGt()); $builder->setCreatedAtGt($options['createdAtGt'] ?? null); $instance = $builder->build(); if (empty($options['createdAtGt'])) { self::assertNull($instance->getCreatedAtGt()); } else { self::assertEquals($options['createdAtGt'], $instance->getCreatedAtGt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetCreatedLte($options): void { $builder = new DealsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCreatedAtLte()); $builder->setCreatedAtLte($options['createdAtLte'] ?? null); $instance = $builder->build(); if (empty($options['createdAtLte'])) { self::assertNull($instance->getCreatedAtLte()); } else { self::assertEquals($options['createdAtLte'], $instance->getCreatedAtLte()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetCreatedLt($options): void { $builder = new DealsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCreatedAtLt()); $builder->setCreatedAtLt($options['createdAtLt'] ?? null); $instance = $builder->build(); if (empty($options['createdAtLt'])) { self::assertNull($instance->getCreatedAtLt()); } else { self::assertEquals($options['createdAtLt'], $instance->getCreatedAtLt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetExpiresAtGte($options): void { $builder = new DealsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getExpiresAtGte()); $builder->setExpiresAtGte($options['expiresAtGte'] ?? null); $instance = $builder->build(); if (empty($options['expiresAtGte'])) { self::assertNull($instance->getExpiresAtGte()); } else { self::assertEquals($options['expiresAtGte'], $instance->getExpiresAtGte()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetExpiresGt($options): void { $builder = new DealsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getExpiresAtGt()); $builder->setExpiresAtGt($options['expiresAtGt'] ?? null); $instance = $builder->build(); if (empty($options['expiresAtGt'])) { self::assertNull($instance->getExpiresAtGt()); } else { self::assertEquals($options['expiresAtGt'], $instance->getExpiresAtGt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetExpiresLte($options): void { $builder = new DealsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getExpiresAtLte()); $builder->setExpiresAtLte($options['expiresAtLte'] ?? null); $instance = $builder->build(); if (empty($options['expiresAtLte'])) { self::assertNull($instance->getExpiresAtLte()); } else { self::assertEquals($options['expiresAtLte'], $instance->getExpiresAtLte()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetExpiresLt($options): void { $builder = new DealsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getExpiresAtLt()); $builder->setExpiresAtLt($options['expiresAtLt'] ?? null); $instance = $builder->build(); if (empty($options['expiresAtLt'])) { self::assertNull($instance->getExpiresAtLt()); } else { self::assertEquals($options['expiresAtLt'], $instance->getExpiresAtLt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetFullTextSearch($options): void { $builder = new DealsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getFullTextSearch()); $builder->setFullTextSearch($options['fullTextSearch'] ?? null); $instance = $builder->build(); if (empty($options['fullTextSearch'])) { self::assertNull($instance->getFullTextSearch()); } else { self::assertEquals($options['fullTextSearch'], $instance->getFullTextSearch()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetLimit($options): void { $builder = new DealsRequestBuilder(); $instance = $builder->build(); self::assertNotNull($instance->getLimit()); $builder->setLimit($options['limit']); $instance = $builder->build(); if (is_null($options['limit'])) { self::assertNull($instance->getLimit()); } else { self::assertEquals($options['limit'], $instance->getLimit()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetStatus($options): void { $builder = new DealsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getStatus()); $builder->setStatus($options['status']); $instance = $builder->build(); if (empty($options['status'])) { self::assertNull($instance->getStatus()); } else { self::assertEquals($options['status'], $instance->getStatus()); } } public function validDataProvider(): array { $result = [ [ [ 'createdAtGte' => null, 'createdAtGt' => null, 'createdAtLte' => null, 'createdAtLt' => null, 'expiresAtGte' => null, 'expiresAtGt' => null, 'expiresAtLte' => null, 'expiresAtLt' => null, 'fullTextSearch' => null, 'status' => null, 'limit' => Random::int(1, DealsRequest::MAX_LIMIT_VALUE), 'cursor' => null, ], ], [ [ 'fullTextSearch' => '', 'status' => '', 'limit' => 1, 'cursor' => '', ], ], ]; $statuses = DealStatus::getValidValues(); for ($i = 0; $i < 10; $i++) { $request = [ 'createdAtGte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtGt' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLt' => date(YOOKASSA_DATE, Random::int(1, time())), 'expiresAtGte' => date(YOOKASSA_DATE, Random::int(1, time())), 'expiresAtGt' => date(YOOKASSA_DATE, Random::int(1, time())), 'expiresAtLte' => date(YOOKASSA_DATE, Random::int(1, time())), 'expiresAtLt' => date(YOOKASSA_DATE, Random::int(1, time())), 'fullTextSearch' => Random::str(DealsRequest::MIN_LENGTH_DESCRIPTION, SafeDeal::MAX_LENGTH_DESCRIPTION), 'status' => $statuses[Random::int(0, count($statuses) - 1)], 'limit' => Random::int(1, DealsRequest::MAX_LIMIT_VALUE), 'cursor' => $this->randomString(Random::int(2, 30)), ]; $result[] = [$request]; } return $result; } private function randomString($length, $any = true): string { static $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-+_.'; $result = ''; for ($i = 0; $i < $length; $i++) { if ($any) { $char = chr(Random::int(32, 126)); } else { $rnd = Random::int(0, strlen($chars) - 1); $char = $chars[$rnd]; } $result .= $char; } return $result; } } yookassa-sdk-php/tests/Request/Deals/CreateDealResponseTest.php000064400000000471150364342670020660 0ustar00setType($options['type']); $instance = $builder->build($this->getRequiredData('type')); if (null === $options['type'] || '' === $options['type']) { self::assertNull($instance->getType()); } else { self::assertNotNull($instance->getType()); self::assertEquals($options['type'], $instance->getType()); } } /** * @dataProvider invalidDescriptionDataProvider * * @param mixed $options */ public function testSetInvalidType($options): void { $this->expectException(InvalidArgumentException::class); $builder = new CreateDealRequestBuilder(); $builder->setType($options); } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetFeeMoment($options): void { $builder = new CreateDealRequestBuilder(); $builder->setFeeMoment($options['fee_moment']); $instance = $builder->build($this->getRequiredData('fee_moment')); if (null === $options['fee_moment'] || '' === $options['fee_moment']) { self::assertNull($instance->getFeeMoment()); } else { self::assertNotNull($instance->getFeeMoment()); self::assertEquals($options['fee_moment'], $instance->getFeeMoment()); } } /** * @dataProvider invalidDescriptionDataProvider * * @param mixed $options */ public function testSetInvalidFeeMoment($options): void { $this->expectException(InvalidArgumentException::class); $builder = new CreateDealRequestBuilder(); $builder->setFeeMoment($options); } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetMetadata($options): void { $builder = new CreateDealRequestBuilder(); $instance = $builder->build($this->getRequiredData()); self::assertNull($instance->getMetadata()); $builder->setMetadata($options['metadata']); $instance = $builder->build($this->getRequiredData()); if (empty($options['metadata'])) { self::assertNull($instance->getMetadata()); } else { self::assertEquals($options['metadata'], $instance->getMetadata()->toArray()); } } /** * @dataProvider invalidDataProvider * * @param mixed $options */ public function testSetInvalidMetadata($options): void { $this->expectException(InvalidArgumentException::class); $builder = new CreateDealRequestBuilder(); $builder->setMetadata($options); } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetDescription($options): void { $builder = new CreateDealRequestBuilder(); $builder->setDescription($options['description']); $instance = $builder->build($this->getRequiredData()); if (empty($options['description'])) { self::assertNull($instance->getDescription()); } else { self::assertEquals($options['description'], $instance->getDescription()); } } /** * @dataProvider invalidDescriptionDataProvider * * @param mixed $options */ public function testSetInvalidDescription($options): void { $this->expectException(InvalidArgumentException::class); $builder = new CreateDealRequestBuilder(); $builder->setDescription($options); } /** * @return void * @throws Exception */ public function testSetInvalidLengthDescription(): void { $this->expectException(InvalidArgumentException::class); $builder = new CreateDealRequestBuilder(); $description = Random::str(SafeDeal::MAX_LENGTH_DESCRIPTION + 1); $builder->setDescription($description); } /** * @throws Exception */ public static function validDataProvider(): array { $result = [ [ [ 'type' => Random::value(DealType::getValidValues()), 'fee_moment' => Random::value(FeeMoment::getValidValues()), 'description' => null, 'metadata' => null, ], ], [ [ 'type' => Random::value(DealType::getValidValues()), 'fee_moment' => Random::value(FeeMoment::getValidValues()), 'description' => Random::str(1, SafeDeal::MAX_LENGTH_DESCRIPTION), 'metadata' => [new Metadata()], ], ], ]; for ($i = 0; $i < 10; $i++) { $request = [ 'type' => Random::value(DealType::getValidValues()), 'fee_moment' => Random::value(FeeMoment::getValidValues()), 'description' => Random::str(1, SafeDeal::MAX_LENGTH_DESCRIPTION), 'metadata' => [Random::str(1, 30) => Random::str(1, 128)], ]; $result[] = [$request]; } return $result; } /** * @return array */ public static function invalidDataProvider(): array { return [ [false], [true], [new stdClass()], [new SafeDeal()], ]; } /** * @return array[] * @throws Exception */ public static function invalidDescriptionDataProvider(): array { return [ [Random::str(SafeDeal::MAX_LENGTH_DESCRIPTION + 1)], ]; } /** * @param null $testingProperty * * @throws Exception */ protected function getRequiredData($testingProperty = null): array { $result = []; if ('type' !== $testingProperty) { $result['type'] = Random::value(DealType::getValidValues()); } if ('fee_moment' !== $testingProperty) { $result['fee_moment'] = Random::value(FeeMoment::getValidValues()); } return $result; } } yookassa-sdk-php/tests/Request/Deals/DealResponseTest.php000064400000000441150364342670017531 0ustar00getterAndSetterTest($value, 'cursor', null === $value ? '' : (string) $value); } /** * @dataProvider validFullTextSearchDataProvider * * @param mixed $value */ public function testFullTextSearch($value): void { $this->getterAndSetterTest($value, 'fullTextSearch', $value); } /** * @dataProvider invalidFullTextSearchDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidFullTextSearch(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->setFullTextSearch($value); } /** * @dataProvider invalidFullTextSearchDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidFullTextSearch(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->full_text_search = $value; } /** * @dataProvider validDateDataProvider * * @param mixed $value */ public function testDateMethods($value): void { $properties = [ 'createdAtGte', 'createdAtGt', 'createdAtLte', 'createdAtLt', 'expiresAtGte', 'expiresAtGt', 'expiresAtLte', 'expiresAtLt', ]; $expected = null; if ($value instanceof DateTime) { $expected = $value->format(YOOKASSA_DATE); } elseif (is_numeric($value)) { $expected = date(YOOKASSA_DATE, $value); } else { $expected = $value; } foreach ($properties as $property) { $this->getterAndSetterTest($value, $property, empty($expected) ? null : new DateTime($expected)); } } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidCreatedAtGte(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->setCreatedAtGte($value); } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidCreatedAtGte(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->createdAtGte = $value; } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidCreatedAtGt(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->setCreatedAtGt($value); } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidCreatedAtGt(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->createdAtGt = $value; } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidCreatedAtLte(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->setCreatedAtLte($value); } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidCreatedAtLte(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->createdAtLte = $value; } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidCreatedAtLt(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->setCreatedAtLt($value); } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidCreatedAtLt(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->createdAtLt = $value; } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidExpiresAtGte(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->setExpiresAtGte($value); } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidExpiresAtGte(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->expiresAtGte = $value; } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidExpiresAtGt(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->setExpiresAtGt($value); } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidExpiresAtGt(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->expiresAtGt = $value; } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidExpiresAtLte(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->setCreatedAtLte($value); } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidExpiresAtLte(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->expiresAtLte = $value; } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidExpiresAtLt(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->setExpiresAtLt($value); } /** * @dataProvider invalidDataTimeDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidExpiresAtLt(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->expiresAtLt = $value; } /** * @dataProvider validLimitDataProvider * * @param mixed $value */ public function testLimit($value): void { $this->getterAndSetterTest($value, 'limit', $value); } /** * @dataProvider invalidLimitDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidLimit(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->setLimit($value); } /** * @dataProvider invalidLimitDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidLimit(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->limit = $value; } /** * @dataProvider validStatusDataProvider * * @param mixed $value */ public function testStatus($value): void { $this->getterAndSetterTest($value, 'status', (string) $value); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setStatus($value); } /** * @return void */ public function testValidate(): void { $instance = new DealsRequest(); self::assertTrue($instance->validate()); } /** * @return void */ public function testBuilder(): void { $builder = DealsRequest::builder(); self::assertInstanceOf(DealsRequestBuilder::class, $builder); } /** * @return array * @throws Exception */ public static function validCursorDataProvider(): array { return [ [Random::str(1)], [Random::str(2, 64)], [new StringObject(Random::str(1))], [new StringObject(Random::str(2, 64))], ]; } /** * @return array * @throws Exception */ public static function validFullTextSearchDataProvider(): array { return [ [null], ['1234'], [Random::str(DealsRequest::MIN_LENGTH_DESCRIPTION, SafeDeal::MAX_LENGTH_DESCRIPTION)], [new StringObject(Random::str(DealsRequest::MIN_LENGTH_DESCRIPTION, SafeDeal::MAX_LENGTH_DESCRIPTION))], ]; } /** * @return array * @throws Exception */ public function validIdDataProvider(): array { return [ [null], [''], ['123'], [Random::str(1, 64)], [new StringObject(Random::str(1, 64))], ]; } /** * @return array * @throws Exception */ public static function validDateDataProvider(): array { return [ [date(YOOKASSA_DATE, Random::int(0, time()))], [new DateTime()], ]; } /** * @return array */ public static function validStatusDataProvider(): array { $result = []; foreach (DealStatus::getValidValues() as $value) { $result[] = [$value]; } return $result; } /** * @return array * @throws Exception */ public static function validLimitDataProvider(): array { return [ [10], [Random::int(1, DealsRequest::MAX_LIMIT_VALUE)], ]; } /** * @return array */ public function invalidIdDataProvider(): array { return [ [[]], [new stdClass()], [true], [false], ]; } /** * @return array * @throws Exception */ public static function invalidDataProvider(): array { return [ [Random::str(10)], [Random::bytes(10)], [-1], [DealsRequest::MAX_LIMIT_VALUE + 1], ]; } /** * @return array[] * @throws Exception */ public static function invalidFullTextSearchDataProvider(): array { return [ [true, InvalidPropertyValueException::class], [Random::str(DealsRequest::MIN_LENGTH_DESCRIPTION - 1), InvalidPropertyValueException::class], [new StringObject(Random::str(SafeDeal::MAX_LENGTH_DESCRIPTION + 1)), InvalidPropertyValueException::class], [[], TypeError::class], [new \stdClass(), TypeError::class], ]; } /** * @return array * @throws Exception */ public static function invalidDateDataProvider(): array { return [ [true], [false], [[]], [new stdClass()], [Random::str(35)], [Random::str(37)], [new StringObject(Random::str(10))], [-123], ]; } /** * @return array * @throws Exception */ public static function invalidDataTimeDataProvider(): array { return [ [[], TypeError::class], [new \stdClass(), TypeError::class], [Random::int(), InvalidPropertyValueException::class], [Random::str(100), InvalidPropertyValueException::class], ]; } /** * @return array * @throws Exception */ public static function invalidLimitDataProvider(): array { return [ [null, EmptyPropertyValueException::class], ['', TypeError::class], [[], TypeError::class], [new \stdClass(), TypeError::class], [Random::int(DealsRequest::MAX_LIMIT_VALUE + 1), InvalidPropertyValueException::class], [Random::str(100), TypeError::class], ]; } /** * @return DealsRequest */ protected function getTestInstance(): DealsRequest { return new DealsRequest(); } /** * @param $value * @param string $property * @param $expected * @param bool $testHas * @return void */ private function getterAndSetterTest(mixed $value, string $property, mixed $expected, bool $testHas = true): void { $getter = 'get' . ucfirst($property); $setter = 'set' . ucfirst($property); $has = 'has' . ucfirst($property); $instance = $this->getTestInstance(); if ($testHas && !$instance->{$has}()) { self::assertFalse($instance->{$has}()); self::assertNull($instance->{$getter}()); self::assertNull($instance->{$property}); } $instance->{$setter}($value); if (null === $value || '' === $value) { if ($testHas) { self::assertFalse($instance->{$has}()); } self::assertNull($instance->{$getter}()); self::assertNull($instance->{$property}); } else { if ($testHas) { self::assertTrue($instance->{$has}()); } if ($expected instanceof DateTime) { self::assertEquals($expected->getTimestamp(), $instance->{$getter}()->getTimestamp()); self::assertEquals($expected->getTimestamp(), $instance->{$property}->getTimestamp()); } else { self::assertEquals($expected, $instance->{$getter}()); self::assertEquals($expected, $instance->{$property}); } } $instance->{$property} = $value; if (null === $value || '' === $value) { if ($testHas) { self::assertFalse($instance->{$has}()); } self::assertNull($instance->{$getter}()); self::assertNull($instance->{$property}); } else { if ($testHas) { self::assertTrue($instance->{$has}()); } if ($expected instanceof DateTime) { self::assertEquals($expected->getTimestamp(), $instance->{$getter}()->getTimestamp()); self::assertEquals($expected->getTimestamp(), $instance->{$property}->getTimestamp()); } else { self::assertEquals($expected, $instance->{$getter}()); self::assertEquals($expected, $instance->{$property}); } } } } yookassa-sdk-php/tests/Request/Deals/AbstractTestDealResponse.php000064400000014622150364342670021223 0ustar00getTestInstance($options); self::assertEquals($options['id'], $instance->getId()); } /** * @dataProvider validDataProvider */ public function testGetType(array $options): void { $instance = $this->getTestInstance($options); self::assertEquals($options['type'], $instance->getType()); } /** * @dataProvider validDataProvider */ public function testGetStatus(array $options): void { $instance = $this->getTestInstance($options); self::assertEquals($options['status'], $instance->getStatus()); } /** * @dataProvider validDataProvider */ public function testGetDescription(array $options): void { $instance = $this->getTestInstance($options); self::assertEquals($options['description'], $instance->getDescription()); } /** * @dataProvider validDataProvider */ public function testGetBalance(array $options): void { $instance = $this->getTestInstance($options); self::assertEquals(number_format($options['balance']['value'], 2, '.', ''), $instance->getBalance()->getValue()); self::assertEquals($options['balance']['currency'], $instance->getBalance()->getCurrency()); } /** * @dataProvider validDataProvider */ public function testGetPayoutBalance(array $options): void { $instance = $this->getTestInstance($options); if (empty($options['payout_balance'])) { self::assertNull($instance->getPayoutBalance()); } else { self::assertEquals(number_format($options['payout_balance']['value'], 2, '.', ''), $instance->getPayoutBalance()->getValue()); self::assertEquals((string) $options['payout_balance']['currency'], $instance->getPayoutBalance()->getCurrency()); } } /** * @dataProvider validDataProvider */ public function testGetCreatedAt(array $options): void { $instance = $this->getTestInstance($options); if (empty($options['created_at'])) { self::assertNull($instance->getCreatedAt()); } else { self::assertEquals($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider */ public function testGetExpiresAt(array $options): void { $instance = $this->getTestInstance($options); if (empty($options['expires_at'])) { self::assertNull($instance->getExpiresAt()); } else { self::assertEquals($options['expires_at'], $instance->getExpiresAt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider */ public function testGetFeeMoment(array $options): void { $instance = $this->getTestInstance($options); self::assertEquals($options['fee_moment'], $instance->getFeeMoment()); } /** * @dataProvider validDataProvider */ public function testGetTest(array $options): void { $instance = $this->getTestInstance($options); self::assertEquals($options['test'], $instance->getTest()); } /** * @dataProvider validDataProvider */ public function testGetMetadata(array $options): void { $instance = $this->getTestInstance($options); if (!empty($options['metadata'])) { self::assertEquals($options['metadata'], $instance->getMetadata()->toArray()); } else { self::assertNull($instance->getMetadata()); } } public static function validDataProvider(): array { $result = []; $statuses = DealStatus::getValidValues(); $types = DealType::getValidValues(); for ($i = 0; $i < 10; $i++) { $deal = [ 'id' => Random::str(36), 'type' => Random::value($types), 'status' => Random::value($statuses), 'description' => Random::str(128), 'balance' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getEnabledValues()), ], 'payout_balance' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'fee_moment' => Random::value(FeeMoment::getEnabledValues()), 'test' => (bool) ($i % 2), 'metadata' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::str(1, 256), ], ]; $result[] = [$deal]; } $trueFalse = Random::bool(); $result[] = [ [ 'id' => Random::str(36), 'type' => Random::value($types), 'status' => Random::value($statuses), 'description' => Random::str(128), 'balance' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'payout_balance' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'fee_moment' => Random::value(FeeMoment::getEnabledValues()), 'test' => $trueFalse, 'metadata' => [], ], ]; return $result; } /** * @param mixed $options */ abstract protected function getTestInstance($options): DealInterface; } yookassa-sdk-php/tests/Request/Deals/CreateDealRequestSerializerTest.php000064400000004523150364342670022546 0ustar00build($options); $data = $serializer->serialize($instance); $expected = [ 'type' => $options['type'], 'fee_moment' => $options['fee_moment'], ]; if (!empty($options['metadata'])) { $expected['metadata'] = []; foreach ($options['metadata'] as $key => $value) { $expected['metadata'][$key] = $value; } } if (!empty($options['description'])) { $expected['description'] = $options['description']; } self::assertEquals($expected, $data); } /** * @throws Exception */ public static function validDataProvider(): array { $result = [ [ [ 'type' => Random::value(DealType::getValidValues()), 'fee_moment' => Random::value(FeeMoment::getValidValues()), 'description' => null, 'metadata' => null, ], ], [ [ 'type' => Random::value(DealType::getValidValues()), 'fee_moment' => Random::value(FeeMoment::getValidValues()), 'description' => '', 'metadata' => [], ], ], ]; for ($i = 0; $i < 10; $i++) { $request = [ 'type' => Random::value(DealType::getValidValues()), 'fee_moment' => Random::value(FeeMoment::getValidValues()), 'description' => Random::str(2, 128), 'metadata' => [Random::str(1, 30) => Random::str(1, 128)], ]; $result[] = [$request]; } return $result; } } yookassa-sdk-php/tests/Request/Deals/CreateDealRequestTest.php000064400000016532150364342670020517 0ustar00hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); $expected = $options['metadata']; if ($expected instanceof Metadata) { $expected = $expected->toArray(); } $instance->setMetadata($options['metadata']); if (empty($options['metadata'])) { self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); } else { self::assertTrue($instance->hasMetadata()); self::assertSame($expected, $instance->getMetadata()->toArray()); self::assertSame($expected, $instance->metadata->toArray()); } $instance->setMetadata(null); self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); $instance->metadata = $options['metadata']; if (empty($options['metadata'])) { self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); } else { self::assertTrue($instance->hasMetadata()); self::assertSame($expected, $instance->getMetadata()->toArray()); self::assertSame($expected, $instance->metadata->toArray()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testType($options): void { $instance = new CreateDealRequest(); self::assertTrue($instance->hasType()); self::assertNotNull($instance->getType()); self::assertNotNull($instance->type); $instance->setType($options['type']); if (empty($options['type'])) { self::assertFalse($instance->hasType()); self::assertNull($instance->getType()); self::assertNull($instance->type); } else { self::assertTrue($instance->hasType()); self::assertSame($options['type'], $instance->getType()); self::assertSame($options['type'], $instance->type); } $instance->type = $options['type']; if (empty($options['type'])) { self::assertFalse($instance->hasType()); self::assertNull($instance->getType()); self::assertNull($instance->type); } else { self::assertTrue($instance->hasType()); self::assertSame($options['type'], $instance->getType()); self::assertSame($options['type'], $instance->type); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testFeeMoment($options): void { $instance = new CreateDealRequest(); self::assertTrue($instance->hasFeeMoment()); self::assertNotNull($instance->getFeeMoment()); self::assertNotNull($instance->fee_moment); self::assertNotNull($instance->feeMoment); $instance->setFeeMoment($options['fee_moment']); if (empty($options['fee_moment'])) { self::assertFalse($instance->hasFeeMoment()); self::assertNull($instance->getFeeMoment()); self::assertNull($instance->fee_moment); self::assertNull($instance->feeMoment); } else { self::assertTrue($instance->hasFeeMoment()); self::assertSame($options['fee_moment'], $instance->getFeeMoment()); self::assertSame($options['fee_moment'], $instance->fee_moment); self::assertSame($options['fee_moment'], $instance->feeMoment); } $instance->fee_moment = $options['fee_moment']; if (empty($options['fee_moment'])) { self::assertFalse($instance->hasFeeMoment()); self::assertNull($instance->getFeeMoment()); self::assertNull($instance->fee_moment); self::assertNull($instance->feeMoment); } else { self::assertTrue($instance->hasFeeMoment()); self::assertSame($options['fee_moment'], $instance->getFeeMoment()); self::assertSame($options['fee_moment'], $instance->fee_moment); self::assertSame($options['fee_moment'], $instance->feeMoment); } } public function testValidate(): void { $instance = new CreateDealRequest(); self::assertTrue($instance->validate()); $instance->setType(Random::value(DealType::getValidValues())); self::assertTrue($instance->validate()); $instance->setFeeMoment(Random::value(FeeMoment::getValidValues())); self::assertTrue($instance->validate()); } public function testBuilder(): void { $builder = CreateDealRequest::builder(); self::assertInstanceOf(CreateDealRequestBuilder::class, $builder); } /** * @dataProvider invalidFeeMomentDataProvider * * @param mixed $value */ public function testSetInvalidFeeMoment($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreateDealRequest(); $instance->setFeeMoment($value); } /** * @dataProvider invalidMetadataDataProvider * * @param mixed $value */ public function testSetInvalidMetadata($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreateDealRequest(); $instance->setMetadata($value); } /** * @dataProvider invalidMetadataDataProvider * * @param mixed $value */ public function testSetInvalidType($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreateDealRequest(); $instance->setType($value); } public static function validDataProvider(): array { $result = []; $metadata = new Metadata(); $metadata->test = 'test'; for ($i = 0; $i < 10; $i++) { $request = [ 'type' => Random::value(DealType::getValidValues()), 'fee_moment' => Random::value(FeeMoment::getValidValues()), 'description' => Random::str(1, 128), 'metadata' => 0 === $i ? $metadata : ['test' => 'test'], ]; $result[] = [$request]; } return $result; } public static function invalidFeeMomentDataProvider(): array { return [ [false], [true], [1], [Random::str(10)], ]; } public static function invalidMetadataDataProvider(): array { return [ [false], [true], [1], [Random::str(10)], ]; } } yookassa-sdk-php/tests/Request/PersonalData/CreatePersonalDataRequestTest.php000064400000026755150364342670023564 0ustar00hasLastName()); self::assertNull($instance->getLastName()); self::assertNull($instance->last_name); $expected = $options['last_name']; $instance->setLastName($options['last_name']); if (empty($options['last_name'])) { self::assertFalse($instance->hasLastName()); self::assertNull($instance->getLastName()); self::assertNull($instance->last_name); } else { self::assertTrue($instance->hasLastName()); self::assertSame($expected, $instance->getLastName()); self::assertSame($expected, $instance->last_name); } $instance = new CreatePersonalDataRequest(); self::assertFalse($instance->hasLastName()); self::assertNull($instance->getLastName()); self::assertNull($instance->last_name); $instance->last_name = $options['last_name']; if (empty($options['last_name'])) { self::assertFalse($instance->hasLastName()); self::assertNull($instance->getLastName()); self::assertNull($instance->last_name); } else { self::assertTrue($instance->hasLastName()); self::assertSame($expected, $instance->getLastName()); self::assertSame($expected, $instance->last_name); } } /** * @dataProvider invalidLastNameDataProvider * * @param mixed $value */ public function testSetInvalidLastName($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePersonalDataRequest(); $instance->setLastName($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testFirstName($options): void { $instance = new CreatePersonalDataRequest(); self::assertFalse($instance->hasFirstName()); self::assertNull($instance->getFirstName()); self::assertNull($instance->first_name); $expected = $options['first_name']; $instance->setFirstName($options['first_name']); if (empty($options['first_name'])) { self::assertFalse($instance->hasFirstName()); self::assertNull($instance->getFirstName()); self::assertNull($instance->first_name); } else { self::assertTrue($instance->hasFirstName()); self::assertSame($expected, $instance->getFirstName()); self::assertSame($expected, $instance->first_name); } $instance = new CreatePersonalDataRequest(); self::assertFalse($instance->hasFirstName()); self::assertNull($instance->getFirstName()); self::assertNull($instance->first_name); $instance->first_name = $options['first_name']; if (empty($options['first_name'])) { self::assertFalse($instance->hasFirstName()); self::assertNull($instance->getFirstName()); self::assertNull($instance->first_name); } else { self::assertTrue($instance->hasFirstName()); self::assertSame($expected, $instance->getFirstName()); self::assertSame($expected, $instance->first_name); } } /** * @dataProvider invalidFirstNameDataProvider * * @param mixed $value */ public function testSetInvalidFirstName($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePersonalDataRequest(); $instance->setFirstName($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testMiddleName($options): void { $instance = new CreatePersonalDataRequest(); self::assertFalse($instance->hasMiddleName()); self::assertNull($instance->getMiddleName()); self::assertNull($instance->middle_name); $expected = $options['middle_name']; $instance->setMiddleName($options['middle_name']); if (empty($options['middle_name'])) { self::assertFalse($instance->hasMiddleName()); self::assertNull($instance->getMiddleName()); self::assertNull($instance->middle_name); } else { self::assertTrue($instance->hasMiddleName()); self::assertSame($expected, $instance->getMiddleName()); self::assertSame($expected, $instance->middle_name); } $instance->setMiddleName(null); self::assertFalse($instance->hasMiddleName()); self::assertNull($instance->getMiddleName()); self::assertNull($instance->middle_name); $instance->middle_name = $options['middle_name']; if (empty($options['middle_name'])) { self::assertFalse($instance->hasMiddleName()); self::assertNull($instance->getMiddleName()); self::assertNull($instance->middle_name); } else { self::assertTrue($instance->hasMiddleName()); self::assertSame($expected, $instance->getMiddleName()); self::assertSame($expected, $instance->middle_name); } } /** * @dataProvider invalidMiddleNameDataProvider * * @param mixed $value */ public function testSetInvalidMiddleName($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePersonalDataRequest(); $instance->setMiddleName($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testMetadata($options): void { $instance = new CreatePersonalDataRequest(); self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); $expected = $options['metadata']; if ($expected instanceof Metadata) { $expected = $expected->toArray(); } $instance->setMetadata($options['metadata']); if (empty($options['metadata'])) { self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); } else { self::assertTrue($instance->hasMetadata()); self::assertSame($expected, $instance->getMetadata()->toArray()); self::assertSame($expected, $instance->metadata->toArray()); } $instance->setMetadata(null); self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); $instance->metadata = $options['metadata']; if (empty($options['metadata'])) { self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); } else { self::assertTrue($instance->hasMetadata()); self::assertSame($expected, $instance->getMetadata()->toArray()); self::assertSame($expected, $instance->metadata->toArray()); } } /** * @dataProvider invalidMetadataDataProvider * * @param mixed $value */ public function testSetInvalidMetadata($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePersonalDataRequest(); $instance->setMetadata($value); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testSetInvalidType($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePersonalDataRequest(); $instance->setType($value); } public function testValidate(): void { $instance = new CreatePersonalDataRequest(); self::assertFalse($instance->validate()); $instance->setType(Random::value(PersonalDataType::getEnabledValues())); self::assertFalse($instance->validate()); $instance->setMiddleName('test'); self::assertFalse($instance->validate()); $instance->setLastName('test'); self::assertFalse($instance->validate()); $instance->setFirstName('test'); self::assertTrue($instance->validate()); } public function testBuilder(): void { $builder = CreatePersonalDataRequest::builder(); self::assertInstanceOf(CreatePersonalDataRequestBuilder::class, $builder); } public static function validDataProvider() { $metadata = new Metadata(); $metadata->test = 'test'; $result = [ [ [ 'type' => Random::value(PersonalDataType::getEnabledValues()), 'last_name' => 'null', 'first_name' => 'null', 'middle_name' => null, 'metadata' => null, ], ], [ [ 'type' => Random::value(PersonalDataType::getEnabledValues()), 'last_name' => 'null', 'first_name' => 'null', 'middle_name' => '', 'metadata' => [], ], ], ]; for ($i = 0; $i < 10; $i++) { $request = [ 'type' => Random::value(PersonalDataType::getEnabledValues()), 'last_name' => Random::str(5, CreatePersonalDataRequest::MAX_LENGTH_LAST_NAME, 'abcdefghijklmnopqrstuvwxyz'), 'first_name' => Random::str(5, CreatePersonalDataRequest::MAX_LENGTH_FIRST_NAME, 'abcdefghijklmnopqrstuvwxyz'), 'middle_name' => Random::str(5, CreatePersonalDataRequest::MAX_LENGTH_LAST_NAME, 'abcdefghijklmnopqrstuvwxyz'), 'metadata' => ($i % 2) ? $metadata : ['test' => 'test'], ]; $result[] = [$request]; } return $result; } public static function invalidTypeDataProvider() { return [ [false], [true], [Random::str(10)], ]; } public static function invalidMetadataDataProvider() { return [ [false], [true], [1], [Random::str(10)], ]; } public static function invalidLastNameDataProvider() { return [ [null], [''], [false], [Random::str(CreatePersonalDataRequest::MAX_LENGTH_LAST_NAME + 1)], ]; } public static function invalidMiddleNameDataProvider() { return [ [Random::str(CreatePersonalDataRequest::MAX_LENGTH_LAST_NAME + 1)], ]; } public static function invalidFirstNameDataProvider() { return [ [null], [''], [false], [Random::str(CreatePersonalDataRequest::MAX_LENGTH_FIRST_NAME + 1)], ]; } } yookassa-sdk-php/tests/Request/PersonalData/PersonalDataResponseTest.php000064400000013626150364342670022577 0ustar00getTypeInstance($options); self::assertEquals($options['id'], $instance->getId()); } /** * @dataProvider validDataProvider */ public function testGetStatus(array $options): void { $instance = $this->getTypeInstance($options); self::assertEquals($options['status'], $instance->getStatus()); } /** * @dataProvider validDataProvider */ public function testGetType(array $options): void { $instance = $this->getTypeInstance($options); self::assertEquals($options['type'], $instance->getType()); } /** * @dataProvider validDataProvider */ public function testGetCreatedAt(array $options): void { $instance = $this->getTypeInstance($options); if (empty($options['created_at'])) { self::assertNull($instance->getCreatedAt()); self::assertNull($instance->created_at); self::assertNull($instance->createdAt); } else { self::assertEquals($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider */ public function testGetExpiresAt(array $options): void { $instance = $this->getTypeInstance($options); if (empty($options['expires_at'])) { self::assertNull($instance->getExpiresAt()); self::assertNull($instance->expires_at); self::assertNull($instance->expiresAt); } else { self::assertEquals($options['expires_at'], $instance->getExpiresAt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider */ public function testGetCancellationDetails(array $options): void { $instance = $this->getTypeInstance($options); if (empty($options['cancellation_details'])) { self::assertNull($instance->getCancellationDetails()); } else { self::assertEquals( $options['cancellation_details']['party'], $instance->getCancellationDetails()->getParty() ); self::assertEquals( $options['cancellation_details']['reason'], $instance->getCancellationDetails()->getReason() ); } } /** * @dataProvider validDataProvider */ public function testGetMetadata(array $options): void { $instance = $this->getTypeInstance($options); if (empty($options['metadata'])) { self::assertNull($instance->getMetadata()); } else { self::assertEquals($options['metadata'], $instance->getMetadata()->toArray()); } } public static function validDataProvider() { $result = []; $cancellationDetailsParties = PersonalDataCancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); $cancellationDetailsReasons = PersonalDataCancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); $result[] = [ [ 'id' => Random::str(36, 50), 'status' => Random::value(PersonalDataStatus::getValidValues()), 'type' => Random::value(PersonalDataType::getValidValues()), 'created_at' => date(YOOKASSA_DATE, Random::int(111111111, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(111111111, time())), 'metadata' => ['order_id' => '37'], 'cancellation_details' => [ 'party' => Random::value($cancellationDetailsParties), 'reason' => Random::value($cancellationDetailsReasons), ], ], ]; $result[] = [ [ 'id' => Random::str(36, 50), 'status' => Random::value(PersonalDataStatus::getValidValues()), 'type' => Random::value(PersonalDataType::getValidValues()), 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'metadata' => null, 'cancellation_details' => null, ], ]; for ($i = 0; $i < 20; $i++) { $data = [ 'id' => Random::str(36, 50), 'status' => Random::value(PersonalDataStatus::getValidValues()), 'type' => Random::value(PersonalDataType::getValidValues()), 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'metadata' => [Random::str(3, 128, 'abcdefghijklmnopqrstuvwxyz') => Random::str(1, 512)], 'cancellation_details' => [ 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons], ], ]; $result[] = [$data]; } return $result; } /** * @param mixed $options */ private function getTypeInstance($options): PersonalDataResponse { return new PersonalDataResponse($options); } } yookassa-sdk-php/tests/Request/Receipts/RefundReceiptResponseTest.php000064400000002516150364342670022156 0ustar00getTestInstance($options); self::assertEquals($options['refund_id'], $instance->getRefundId()); } /** * @dataProvider invalidDataProvider */ public function testInvalidSpecificProperties(array $options): void { $this->expectException(InvalidPropertyValueException::class); $this->getTestInstance($options); } protected function getTestInstance($options): RefundReceiptResponse { return new RefundReceiptResponse($options); } protected function addSpecificProperties($options, $i): array { $array = [ Random::str(30), Random::str(40), ]; $options['refund_id'] = !$this->valid ? (Random::value($array)) : Random::value([null, '', Random::str(RefundReceiptResponse::LENGTH_REFUND_ID)]); return $options; } } yookassa-sdk-php/tests/Request/Receipts/ReceiptsRequestBuilderTest.php000064400000017165150364342670022344 0ustar00setRefundId($value['refundId']); $instance = $builder->build(); if (empty($value)) { self::assertFalse($instance->hasRefundId()); } else { self::assertTrue($instance->hasRefundId()); self::assertInstanceOf(ReceiptsRequest::class, $instance); self::assertEquals($value['refundId'], $instance->getRefundId()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testSetPaymentId($value): void { $builder = new ReceiptsRequestBuilder(); $builder->setPaymentId($value['paymentId']); $instance = $builder->build(); if (empty($value)) { self::assertFalse($instance->hasPaymentId()); } else { self::assertTrue($instance->hasPaymentId()); self::assertInstanceOf(ReceiptsRequest::class, $instance); self::assertEquals($value['paymentId'], $instance->getPaymentId()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testSetStatus($value): void { $builder = new ReceiptsRequestBuilder(); $builder->setStatus($value['status']); $instance = $builder->build(); if (empty($value)) { self::assertFalse($instance->hasStatus()); } else { self::assertTrue($instance->hasStatus()); self::assertInstanceOf(ReceiptsRequest::class, $instance); self::assertEquals($value['status'], $instance->getStatus()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testSetLimit($value): void { $builder = new ReceiptsRequestBuilder(); $builder->setLimit($value['limit']); $instance = $builder->build(); if (empty($value)) { self::assertFalse($instance->hasLimit()); } else { self::assertTrue($instance->hasLimit()); self::assertInstanceOf(ReceiptsRequest::class, $instance); self::assertEquals($value['limit'], $instance->getLimit()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testSetCursor($value): void { $builder = new ReceiptsRequestBuilder(); $builder->setCursor($value['cursor']); $instance = $builder->build(); if (empty($value)) { self::assertFalse($instance->hasCursor()); } else { self::assertTrue($instance->hasCursor()); self::assertInstanceOf(ReceiptsRequest::class, $instance); self::assertEquals($value['cursor'], $instance->getCursor()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testSetCreatedAtGt($value): void { $builder = new ReceiptsRequestBuilder(); $builder->setCreatedAtGt($value['createdAtGt']); $instance = $builder->build(); if (empty($value['createdAtGt'])) { self::assertFalse($instance->hasCreatedAtGt()); } else { self::assertTrue($instance->hasCreatedAtGt()); self::assertInstanceOf(ReceiptsRequest::class, $instance); self::assertEquals($value['createdAtGt'], $instance->getCreatedAtGt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testSetCreatedAtGte($value): void { $builder = new ReceiptsRequestBuilder(); $builder->setCreatedAtGte($value['createdAtGte']); $instance = $builder->build(); if (empty($value['createdAtGte'])) { self::assertFalse($instance->hasCreatedAtGte()); } else { self::assertTrue($instance->hasCreatedAtGte()); self::assertInstanceOf(ReceiptsRequest::class, $instance); self::assertEquals($value['createdAtGte'], $instance->getCreatedAtGte()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testSetCreatedAtLt($value): void { $builder = new ReceiptsRequestBuilder(); $builder->setCreatedAtLt($value['createdAtLt']); $instance = $builder->build(); if (empty($value['createdAtLt'])) { self::assertFalse($instance->hasCreatedAtLt()); } else { self::assertTrue($instance->hasCreatedAtLt()); self::assertInstanceOf(ReceiptsRequest::class, $instance); self::assertEquals($value['createdAtLt'], $instance->getCreatedAtLt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testSetCreatedAtLte($value): void { $builder = new ReceiptsRequestBuilder(); $builder->setCreatedAtLte($value['createdAtLte']); $instance = $builder->build(); if (empty($value['createdAtLte'])) { self::assertFalse($instance->hasCreatedAtLte()); } else { self::assertTrue($instance->hasCreatedAtLte()); self::assertInstanceOf(ReceiptsRequest::class, $instance); self::assertEquals($value['createdAtLte'], $instance->getCreatedAtLte()->format(YOOKASSA_DATE)); } } public static function validDataProvider() { $result = [ [ [ 'paymentId' => '216749da-000f-50be-b000-096747fad91e', 'refundId' => '216749f7-0016-50be-b000-078d43a63ae4', 'status' => RefundStatus::SUCCEEDED, 'limit' => 100, 'cursor' => '37a5c87d-3984-51e8-a7f3-8de646d39ec15', 'createdAtGte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtGt' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLt' => date(YOOKASSA_DATE, Random::int(1, time())), ], ], ]; for ($i = 0; $i < 8; $i++) { $receipts = [ 'paymentId' => Random::str(36), 'refundId' => Random::str(36), 'createdAtGte' => (0 === $i ? null : (1 === $i ? '' : date(YOOKASSA_DATE, Random::int(1, time())))), 'createdAtGt' => (0 === $i ? null : (1 === $i ? '' : date(YOOKASSA_DATE, Random::int(1, time())))), 'createdAtLte' => (0 === $i ? null : (1 === $i ? '' : date(YOOKASSA_DATE, Random::int(1, time())))), 'createdAtLt' => (0 === $i ? null : (1 === $i ? '' : date(YOOKASSA_DATE, Random::int(1, time())))), 'status' => Random::value(ReceiptRegistrationStatus::getValidValues()), 'cursor' => uniqid('', true), 'limit' => Random::int(1, ReceiptsRequest::MAX_LIMIT_VALUE), ]; $result[] = [$receipts]; } return $result; } } yookassa-sdk-php/tests/Request/Receipts/ReceiptResponseItemTest.php000064400000055600150364342670021633 0ustar00getDescription()); } /** * @dataProvider validDataProvider */ public function testGetAmount(array $options): void { $instance = new ReceiptResponseItem($options); self::assertNotNull($instance->getAmount()); } /** * @dataProvider validDataProvider */ public function testGetSetVatCode(array $options): void { $instance = new ReceiptResponseItem($options); $instance->setVatCode($options['vat_code']); self::assertNotNull($instance->getVatCode()); self::assertEquals($options['vat_code'], $instance->getVatCode()); } /** * @dataProvider validDataProvider */ public function testGetSetExcise(array $options): void { $instance = new ReceiptResponseItem($options); $instance->setExcise(null); self::assertNull($instance->getExcise()); if (empty($options['excise'])) { self::assertNull($instance->getExcise()); } else { $instance->setExcise($options['excise']); self::assertNotNull($instance->getExcise()); self::assertEquals($options['excise'], $instance->getExcise()); } } /** * @dataProvider validDataProvider */ public function testGetSupplier(array $options): void { $instance = new ReceiptResponseItem($options); if (empty($options['supplier'])) { self::assertNull($instance->getSupplier()); } else { self::assertNotNull($instance->getSupplier()); if (!is_object($instance->getSupplier())) { self::assertEquals($options['supplier'], $instance->getSupplier()->jsonSerialize()); } else { self::assertTrue($instance->getSupplier() instanceof SupplierInterface); } self::assertEquals($options['supplier']['name'], $instance->getSupplier()->getName()); self::assertEquals($options['supplier']['phone'], $instance->getSupplier()->getPhone()); self::assertEquals($options['supplier']['inn'], $instance->getSupplier()->getInn()); } } /** * @dataProvider validDataProvider */ public function testGetSetMarkCodeInfo(array $options): void { $instance = new ReceiptResponseItem($options); if (empty($options['mark_code_info'])) { self::assertNull($instance->getMarkCodeInfo()); } else { self::assertNotNull($instance->getMarkCodeInfo()); if (!is_object($instance->getMarkCodeInfo())) { self::assertEquals($options['mark_code_info'], $instance->getMarkCodeInfo()->toArray()); } else { self::assertTrue($instance->getMarkCodeInfo() instanceof MarkCodeInfo); } } } /** * @dataProvider validDataProvider */ public function testGetSetMarkMode(array $options): void { $instance = new ReceiptResponseItem($options); $instance->setMarkMode(null); self::assertNull($instance->getMarkMode()); $instance->setMarkMode($options['mark_mode']); if (is_null($options['mark_mode'])) { self::assertNull($instance->getMarkMode()); } else { self::assertNotNull($instance->getMarkMode()); self::assertEquals($options['mark_mode'], $instance->getMarkMode()); } } /** * @dataProvider validDataProvider */ public function testGetSetMarkQuantity(array $options): void { $instance = new ReceiptResponseItem($options); $instance->setMarkQuantity(null); self::assertNull($instance->getMarkQuantity()); if (isset($options['mark_quantity'])) { $instance->setMarkQuantity($options['mark_quantity']); if (is_array($options['mark_quantity'])) { self::assertSame($options['mark_quantity'], $instance->getMarkQuantity()->toArray()); self::assertSame($options['mark_quantity'], $instance->mark_quantity->toArray()); self::assertSame($options['mark_quantity'], $instance->markQuantity->toArray()); } else { self::assertNotNull($instance->getMarkQuantity()); self::assertEquals($options['mark_quantity'], $instance->getMarkQuantity()); } } } /** * @dataProvider validDataProvider */ public function testGetPrice(array $options): void { $instance = new ReceiptResponseItem($options); if (empty($options['amount'])) { self::assertNull($instance->getPrice()); } else { self::assertNotNull($instance->getPrice()); if (!is_object($instance->getPrice())) { self::assertEquals($options['amount'], $instance->getPrice()->jsonSerialize()); } else { self::assertTrue($instance->getPrice() instanceof AmountInterface); } self::assertEquals($options['amount']['value'], $instance->getPrice()->getValue()); self::assertEquals($options['amount']['currency'], $instance->getPrice()->getCurrency()); } } /** * @dataProvider validDataProvider */ public function testGetQuantity(array $options): void { $instance = new ReceiptResponseItem($options); self::assertNotNull($instance->getQuantity()); self::assertEquals($options['quantity'], $instance->getQuantity()); } /** * @dataProvider validDataProvider */ public function testGetPaymentMode(array $options): void { $instance = new ReceiptResponseItem($options); self::assertEquals($options['payment_mode'], $instance->getPaymentMode()); } public function testSetPaymentSubjectData(): void { $instance = new ReceiptResponseItem(); $instance->setPaymentSubject(null); self::assertNull($instance->getPaymentSubject()); } /** * @dataProvider validDataProvider */ public function testGetPaymentSubject(array $options): void { $instance = new ReceiptResponseItem($options); self::assertEquals($options['payment_subject'], $instance->getPaymentSubject()); } public function testSetPaymentModeData(): void { $instance = new ReceiptResponseItem(); $instance->setPaymentMode(null); self::assertNull($instance->getPaymentMode()); } /** * @dataProvider validDataProvider */ public function testGetSetMeasure(array $options): void { $instance = new ReceiptResponseItem($options); self::assertEquals($options['measure'], $instance->getMeasure()); } public function testSetMeasureData(): void { $instance = new ReceiptResponseItem(); $instance->setMeasure(null); self::assertNull($instance->getMeasure()); } /** * @dataProvider validDataProvider */ public function testGetCountryOfOriginCode(array $options): void { $instance = new ReceiptResponseItem($options); if (!empty($options['country_of_origin_code'])) { self::assertEquals($options['country_of_origin_code'], $instance->getCountryOfOriginCode()); } else { self::assertNull($instance->getCountryOfOriginCode()); } } public function testSetCountryOfOriginCodeData(): void { $instance = new ReceiptResponseItem(); $instance->setCountryOfOriginCode(null); self::assertNull($instance->getCountryOfOriginCode()); } /** * @dataProvider validDataProvider */ public function testGetCustomsDeclarationNumber(array $options): void { $instance = new ReceiptResponseItem($options); if (!empty($options['customs_declaration_number'])) { self::assertEquals($options['customs_declaration_number'], $instance->getCustomsDeclarationNumber()); } else { self::assertNull($instance->getCustomsDeclarationNumber()); } } public function testSetCustomsDeclarationNumberData(): void { $instance = new ReceiptResponseItem(); $instance->setCustomsDeclarationNumber(null); self::assertNull($instance->getCustomsDeclarationNumber()); } /** * @dataProvider invalidCountryOfOriginCodeDataProvider */ public function testSetCountryOfOriginCodeInvalidData(mixed $options): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptResponseItem(); $instance->setCountryOfOriginCode($options); } /** * @dataProvider validDataProvider */ public function testGetExcise(array $options): void { $instance = new ReceiptResponseItem($options); if (!empty($options['excise'])) { self::assertEquals($options['excise'], $instance->getExcise()); } else { self::assertNull($instance->getExcise()); } } public function testSetExciseData(): void { $instance = new ReceiptResponseItem(); $instance->setExcise(null); self::assertNull($instance->getExcise()); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testGetSetProductCode($options): void { $instance = new ReceiptResponseItem($options); if (empty($options['product_code'])) { self::assertNull($instance->getProductCode()); self::assertNull($instance->productCode); self::assertNull($instance->product_code); } elseif ($options['product_code'] instanceof ProductCode) { self::assertEquals((string) $options['product_code'], $instance->getProductCode()); self::assertEquals((string) $options['product_code'], $instance->productCode); self::assertEquals((string) $options['product_code'], $instance->product_code); } else { self::assertEquals($options['product_code'], (string) $instance->getProductCode()); self::assertEquals($options['product_code'], (string) $instance->productCode); self::assertEquals($options['product_code'], (string) $instance->product_code); } } /** * @dataProvider validDataProvider */ public function testGetSetPaymentSubjectIndustryDetails(array $options): void { $instance = new ReceiptResponseItem($options); $instance->setPaymentSubjectIndustryDetails($options['payment_subject_industry_details']); if (is_array($options['payment_subject_industry_details'])) { self::assertEquals($options['payment_subject_industry_details'], $instance->getPaymentSubjectIndustryDetails()->toArray()); self::assertEquals($options['payment_subject_industry_details'], $instance->payment_subject_industry_details->toArray()); self::assertEquals($options['payment_subject_industry_details'], $instance->paymentSubjectIndustryDetails->toArray()); } else { self::assertTrue($instance->getPaymentSubjectIndustryDetails()->isEmpty()); self::assertTrue($instance->payment_subject_industry_details->isEmpty()); self::assertTrue($instance->paymentSubjectIndustryDetails->isEmpty()); } } public function testSetAgentTypeData(): void { $instance = new ReceiptResponseItem(); $instance->setAgentType(null); self::assertNull($instance->getAgentType()); } /** * @dataProvider validDataProvider */ public function testGetAgentType(array $options): void { $instance = new ReceiptResponseItem($options); self::assertEquals($options['agent_type'], $instance->getAgentType()); } /** * @dataProvider invalidDescriptionDataProvider * * @param mixed $options */ public function testSetDescriptionInvalidData($options): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptResponseItem(); $instance->setDescription($options); } /** * @dataProvider invalidQuantityDataProvider * * @param mixed $options */ public function testSetQuantityInvalidData($options): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptResponseItem(); $instance->setQuantity($options); } /** * @dataProvider invalidMeasureDataProvider * * @param mixed $options */ public function testSetMeasureInvalidData($options): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptResponseItem(); $instance->setMeasure($options); } /** * @dataProvider invalidVatCodeDataProvider * * @param mixed $options */ public function testSetVatCodeInvalidData($options): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptResponseItem(); $instance->setVatCode($options); } /** * @dataProvider invalidExciseDataProvider * * @param mixed $options */ public function testSetExciseInvalidData($options): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptResponseItem(); $instance->setExcise($options); } /** * @dataProvider invalidProductCodeDataProvider * * @param mixed $options */ public function testSetProductCodeInvalidData($options): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptResponseItem(); $instance->setProductCode($options); } /** * @dataProvider invalidSupplierDataProvider * * @param mixed $options */ public function testSetSupplierInvalidData($options): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptResponseItem(); $instance->setSupplier($options); } /** * @dataProvider invalidAgentTypeDataProvider * * @param mixed $options */ public function testSetAgentTypeInvalidData($options): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptResponseItem(); $instance->setAgentType($options); } /** * @dataProvider invalidMarkCodeInfoDataProvider * * @param mixed $options */ public function testSetMarkCodeInfoInvalidData($options): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptResponseItem(); $instance->setMarkCodeInfo($options); } /** * @dataProvider invalidMarkQuantityDataProvider * * @param mixed $options */ public function testSetMarkQuantityInvalidData($options): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptResponseItem(); $instance->setMarkQuantity($options); } /** * @dataProvider invalidCustomsDeclarationNumberDataProvider * * @param mixed $value */ public function testSetInvalidCustomsDeclarationNumber($value): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptResponseItem(); $instance->customsDeclarationNumber = $value; } /** * @dataProvider invalidCustomsDeclarationNumberDataProvider * * @param mixed $value */ public function testSetterInvalidCustomsDeclarationNumber($value): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptResponseItem(); $instance->setCustomsDeclarationNumber($value); } public static function validDataProvider() { $result = [ [ [ 'description' => Random::str(128), 'quantity' => Random::float(0.0001, 99.99), 'amount' => new MonetaryAmount(Random::int(1, 1000)), 'vat_code' => Random::int(1, 6), 'measure' => null, 'excise' => null, 'payment_mode' => null, 'payment_subject' => null, 'product_code' => null, 'mark_code_info' => null, 'mark_mode' => null, 'mark_quantity' => null, 'supplier' => new Supplier([ 'name' => Random::str(128), 'phone' => Random::str(4, 12, '1234567890'), 'inn' => '1000000000', ]), 'agent_type' => null, 'payment_subject_industry_details' => null, ], ], ]; for ($i = 0; $i < 9; $i++) { $test = [ [ 'description' => Random::str(128), 'quantity' => Random::float(0.0001, 99.99), 'measure' => Random::value(ReceiptItemMeasure::getValidValues()), 'amount' => [ 'value' => round(Random::float(0.1, 99.99), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'vat_code' => Random::int(1, 6), 'excise' => round(Random::float(1.0, 10.0), 2), 'payment_mode' => Random::value(PaymentMode::getValidValues()), 'payment_subject' => Random::value(PaymentSubject::getValidValues()), 'product_code' => Random::value([ null, Random::str(2, 96, '0123456789ABCDEF '), new ProductCode('010463003407001221SxMGorvNuq6Wk91fgr92sdfsdfghfgjh'), ]), 'country_of_origin_code' => Random::value(['RU', 'US', 'CN']), 'customs_declaration_number' => Random::value([ null, '', Random::str(2), Random::str(2, 31), Random::str(32), ]), 'mark_code_info' => [ 'mark_code_raw' => '010460406000590021N4N57RTCBUZTQ\u001d2403054002410161218\u001d1424010191ffd0\u001g92tIAF/YVpU4roQS3M/m4z78yFq0nc/WsSmLeX6QkF/YVWwy5IMYAeiQ91Xa2m/fFSJcOkb2N+uUUtfr4n0mOX0Q==', ], 'mark_mode' => Random::value([null, 0, '0']), 'payment_subject_industry_details' => [ [ 'federal_id' => '001', 'document_date' => date('Y-m-d', Random::int(100000000, 200000000)), 'document_number' => Random::str(1, IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH), 'value' => Random::str(1, IndustryDetails::VALUE_MAX_LENGTH), ], ], 'supplier' => [ 'name' => Random::str(128), 'phone' => Random::str(4, 12, '1234567890'), 'inn' => '1000000000', ], 'agent_type' => Random::value(AgentType::getValidValues()), ], ]; if (ReceiptItemMeasure::PIECE === $test[0]['measure']) { $test[0]['mark_quantity'] = [ 'numerator' => Random::int(1, 100), 'denominator' => 100, ]; } $result[] = $test; } return $result; } public static function invalidDescriptionDataProvider() { return [ [''], ]; } public static function invalidQuantityDataProvider() { return [ [null], [0.0], ]; } public static function invalidMeasureDataProvider() { return [ [true], [Random::str(10)], ]; } public static function invalidVatCodeDataProvider() { return [ [0.0], ]; } public static function invalidExciseDataProvider() { return [ [-Random::float(10)], ]; } public static function invalidProductCodeDataProvider() { return [ [new StringObject('')], [true], [false], [new stdClass()], [Random::str(2, 96, 'GHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+-=`~?><:"\'')], [Random::str(97, 100, '0123456789ABCDEF ')], ]; } public static function invalidPaymentDataProvider() { return [ [new Airline()], ]; } public static function invalidSupplierDataProvider() { return [ [Random::int()], [Random::str(5)], [new Airline()], ]; } public static function invalidCountryOfOriginCodeDataProvider() { return [ [Random::str(2, 2, '0123456789!@#$%^&*()_+-=')], [Random::str(3, 10)], ]; } public static function invalidAgentTypeDataProvider() { return [ [Random::str(1, 10)], ]; } public static function invalidMarkQuantityDataProvider() { return [ [1.0], [1], [true], [new stdClass()], ]; } public static function invalidMarkCodeInfoDataProvider() { return [ [1.0], [1], [true], [new stdClass()], [Random::str(1, 10)], ]; } public static function invalidCustomsDeclarationNumberDataProvider() { return [ [Random::str(33, 64)], ]; } public function invalidPaymentSubjectIndustryDetailsDataProvider() { return [ [1.0], [1], [true], [new stdClass()], [[new stdClass()]], ]; } } yookassa-sdk-php/tests/Request/Receipts/ReceiptsRequestSerializerTest.php000064400000006520150364342670023060 0ustar00build($value); $data = $serializer->serialize($instance); $expected = []; if (!empty($value)) { $expected = [ 'payment_id' => $value['paymentId'], 'refund_id' => $value['refundId'], 'status' => $value['status'], 'limit' => $value['limit'], 'cursor' => $value['cursor'], ]; if (!empty($value['createdAtLt'])) { $expected['created_at.lt'] = $value['createdAtLt']; } if (!empty($value['createdAtGt'])) { $expected['created_at.gt'] = $value['createdAtGt']; } if (!empty($value['createdAtLte'])) { $expected['created_at.lte'] = $value['createdAtLte']; } if (!empty($value['createdAtGte'])) { $expected['created_at.gte'] = $value['createdAtGte']; } } self::assertEquals($expected, $data); } public static function validDataProvider() { $result = [ [ [ 'paymentId' => '216749da-000f-50be-b000-096747fad91e', 'refundId' => '216749f7-0016-50be-b000-078d43a63ae4', 'status' => RefundStatus::SUCCEEDED, 'limit' => 100, 'cursor' => '37a5c87d-3984-51e8-a7f3-8de646d39ec15', 'createdAtGte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtGt' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLt' => date(YOOKASSA_DATE, Random::int(1, time())), ], ], [ [], ], ]; for ($i = 0; $i < 8; $i++) { $receipts = [ 'paymentId' => Random::str(36), 'refundId' => Random::str(36), 'createdAtGte' => (0 === $i ? null : (1 === $i ? '' : date(YOOKASSA_DATE, Random::int(1, time())))), 'createdAtGt' => (0 === $i ? null : (1 === $i ? '' : date(YOOKASSA_DATE, Random::int(1, time())))), 'createdAtLte' => (0 === $i ? null : (1 === $i ? '' : date(YOOKASSA_DATE, Random::int(1, time())))), 'createdAtLt' => (0 === $i ? null : (1 === $i ? '' : date(YOOKASSA_DATE, Random::int(1, time())))), 'status' => Random::value(ReceiptRegistrationStatus::getValidValues()), 'cursor' => uniqid('', true), 'limit' => Random::int(1, ReceiptsRequest::MAX_LIMIT_VALUE), ]; $result[] = [$receipts]; } return $result; } } yookassa-sdk-php/tests/Request/Receipts/PaymentReceiptResponseTest.php000064400000013010150364342670022337 0ustar00getTestInstance($options); self::assertEquals($options['payment_id'], $instance->getPaymentId()); } /** * @dataProvider invalidDataProvider */ public function testInvalidSpecificProperties(array $options): void { $this->expectException(InvalidPropertyValueException::class); $instance = $this->getTestInstance($options); $instance->setPaymentId($options['payment_id']); } /** * @dataProvider validDataProvider */ public function testGetsValidData(array $options): void { $instance = $this->getTestInstance($options); if (!is_null($options['fiscal_document_number'])) { self::assertNotNull($instance->getFiscalDocumentNumber()); } self::assertEquals($options['fiscal_document_number'], $instance->getFiscalDocumentNumber()); self::assertNotNull($instance->getFiscalStorageNumber()); self::assertEquals($options['fiscal_storage_number'], $instance->getFiscalStorageNumber()); self::assertNotNull($instance->getFiscalAttribute()); self::assertEquals($options['fiscal_attribute'], $instance->getFiscalAttribute()); self::assertNotNull($instance->getFiscalProviderId()); self::assertEquals($options['fiscal_provider_id'], $instance->getFiscalProviderId()); self::assertNotNull($instance->getRegisteredAt()); self::assertEquals($options['registered_at'], $instance->getRegisteredAt()->format(YOOKASSA_DATE)); self::assertNotNull($instance->getItems()); foreach ($instance->getItems() as $item) { self::assertInstanceOf(ReceiptResponseItemInterface::class, $item); } self::assertNotNull($instance->getSettlements()); foreach ($instance->getSettlements() as $settlements) { self::assertInstanceOf(SettlementInterface::class, $settlements); } self::assertNotNull($instance->getOnBehalfOf()); self::assertEquals($options['on_behalf_of'], $instance->getOnBehalfOf()); self::assertTrue($instance->notEmpty()); } public function testSetFiscalDocumentNumber(): void { $instance = $this->getTestInstance([]); $instance->setFiscalDocumentNumber(null); self::assertNull($instance->getFiscalStorageNumber()); } public function testSetTaxSystemCode(): void { $instance = $this->getTestInstance([]); $instance->setTaxSystemCode(null); self::assertNull($instance->getTaxSystemCode()); } public function testInvalidIdData(): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance([]); $instance->setId(Random::str(AbstractReceiptResponse::LENGTH_RECEIPT_ID + 1)); } public function testInvalidTypeData(): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance([]); $instance->setType(Random::str(10)); } public function testInvalidStatusIdData(): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance([]); $instance->setStatus(Random::str(10)); } /** * @dataProvider invalidItemsDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testInvalidItemsData(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance([]); $this->expectException($exceptionClassName); $instance->setItems($value); } /** * @dataProvider invalidSettlementsDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testInvalidSettlementsData(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance([]); $this->expectException($exceptionClassName); $instance->setSettlements($value); } /** * @dataProvider invalidBoolNullDataProvider */ public function testInvalidOnBehalfOfData(mixed $options): void { $this->expectException(TypeError::class); $instance = $this->getTestInstance([]); $instance->setOnBehalfOf($options); } protected function getTestInstance($options): PaymentReceiptResponse { return new PaymentReceiptResponse($options); } protected function addSpecificProperties($options, $i): array { $array = [ Random::str(30), Random::str(40), ]; $options['payment_id'] = !$this->valid ? (Random::value($array)) : Random::value([null, '', Random::str(PaymentReceiptResponse::LENGTH_PAYMENT_ID)]); return $options; } } yookassa-sdk-php/tests/Request/Receipts/ReceiptsRequestTest.php000064400000023657150364342670021040 0ustar00hasRefundId()); $instance->setRefundId($value['refundId']); self::assertEquals($value['refundId'], $instance->getRefundId()); if (null != $value['refundId']) { self::assertTrue($instance->hasRefundId()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testGetSetPaymentId($value): void { $instance = new ReceiptsRequest(); self::assertFalse($instance->hasPaymentId()); $instance->setPaymentId($value['paymentId']); self::assertSame($value['paymentId'], $instance->getPaymentId()); if (!is_null($value['paymentId'])) { self::assertTrue($instance->hasPaymentId()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testGetSetCreatedAtGte($value): void { $instance = new ReceiptsRequest(); self::assertFalse($instance->hasCreatedAtGte()); $instance->setCreatedAtGte($value['createdAtLte']); if (!is_null($value['createdAtLte'])) { self::assertEquals($value['createdAtLte'], $instance->getCreatedAtGte()->format(YOOKASSA_DATE)); self::assertTrue($instance->hasCreatedAtGte()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testGetSetCreatedAtGt($value): void { $instance = new ReceiptsRequest(); self::assertFalse($instance->hasCreatedAtGt()); $instance->setCreatedAtGt($value['createdAtGt']); if (!is_null($value['createdAtGt'])) { self::assertEquals($value['createdAtGt'], $instance->getCreatedAtGt()->format(YOOKASSA_DATE)); self::assertTrue($instance->hasCreatedAtGt()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testGetSetCreatedAtLte($value): void { $instance = new ReceiptsRequest(); self::assertFalse($instance->hasCreatedAtGte()); $instance->setCreatedAtLte($value['createdAtLte']); if (!is_null($value['createdAtLte'])) { self::assertEquals($value['createdAtLte'], $instance->getCreatedAtLte()->format(YOOKASSA_DATE)); self::assertTrue($instance->hasCreatedAtLte()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testGetSetCreatedAtLt($value): void { $instance = new ReceiptsRequest(); self::assertFalse($instance->hasCreatedAtLt()); $instance->setCreatedAtLt($value['createdAtLt']); if (!is_null($value['createdAtLt'])) { self::assertEquals($value['createdAtLt'], $instance->getCreatedAtLt()->format(YOOKASSA_DATE)); self::assertTrue($instance->hasCreatedAtLt()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testGetSetStatus($value): void { $instance = new ReceiptsRequest(); self::assertFalse($instance->hasStatus()); $instance->setStatus($value['status']); if (!is_null($value['status'])) { self::assertEquals($value['status'], $instance->getStatus()); self::assertTrue($instance->hasStatus()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testGetSetCursor($value): void { $instance = new ReceiptsRequest(); self::assertFalse($instance->hasCursor()); $instance->setCursor($value['cursor']); if (!is_null($value['cursor'])) { self::assertEquals($value['cursor'], $instance->getCursor()); self::assertTrue($instance->hasCursor()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testGetSetLimit($value): void { $instance = new ReceiptsRequest(); self::assertFalse($instance->hasLimit()); $instance->setLimit($value['limit']); if (!is_null($value['limit'])) { self::assertEquals($value['limit'], $instance->getLimit()); self::assertTrue($instance->hasLimit()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testValidate($value): void { $instance = new ReceiptsRequest(); $instance->fromArray($value); self::assertTrue($instance->validate()); } public function testBuilder(): void { $instance = new ReceiptsRequest(); self::assertTrue($instance::builder() instanceof ReceiptsRequestBuilder); } /** * @dataProvider invalidLimitDataProvider * * @param mixed $value */ public function testInvalidLimitData($value): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptsRequest(); $instance->setLimit($value); } /** * @dataProvider invalidStatusDataProvider * * @param mixed $value */ public function testInvalidStatusData($value): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptsRequest(); $instance->setStatus($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testInvalidCreatedAtLtData($value): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptsRequest(); $instance->setCreatedAtLt($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testInvalidCreatedAtLteData($value): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptsRequest(); $instance->setCreatedAtLte($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testInvalidCreatedAtGtData($value): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptsRequest(); $instance->setCreatedAtGt($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testInvalidCreatedAtGteData($value): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptsRequest(); $instance->setCreatedAtGte($value); } /** * @dataProvider invalidIdDataProvider * * @param mixed $value */ public function testInvalidPaymentIdData($value): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptsRequest(); $instance->setPaymentId($value); } /** * @dataProvider invalidIdDataProvider * * @param mixed $value */ public function testInvalidRefundIdData($value): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptsRequest(); $instance->setRefundId($value); } public static function validDataProvider() { $result = [ [ [ 'paymentId' => '216749da-000f-50be-b000-096747fad91e', 'refundId' => '216749f7-0016-50be-b000-078d43a63ae4', 'status' => RefundStatus::SUCCEEDED, 'limit' => 100, 'cursor' => '37a5c87d-3984-51e8-a7f3-8de646d39ec15', 'createdAtGte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtGt' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLt' => date(YOOKASSA_DATE, Random::int(1, time())), ], ], ]; for ($i = 0; $i < 10; $i++) { $receipts = [ 'paymentId' => Random::str(36), 'refundId' => Random::str(36), 'createdAtGte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtGt' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLt' => date(YOOKASSA_DATE, Random::int(1, time())), 'status' => Random::value(ReceiptRegistrationStatus::getValidValues()), 'cursor' => uniqid('', true), 'limit' => Random::int(1, ReceiptsRequest::MAX_LIMIT_VALUE), ]; $result[] = [$receipts]; } return $result; } public static function invalidLimitDataProvider() { return [ [150], ]; } public static function invalidStatusDataProvider() { return [ [SettlementType::POSTPAYMENT], ]; } public static function invalidDateDataProvider() { return [ [SettlementType::POSTPAYMENT], [true], ]; } public static function invalidIdDataProvider() { return [ ['216749f7-0016-50be-b000-078d43a63ae4-sdgb252346'], [true], ]; } } yookassa-sdk-php/tests/Request/Receipts/CreatePostReceiptRequestTest.php000064400000046435150364342670022646 0ustar00hasCustomer()); self::assertNull($instance->getCustomer()); self::assertNull($instance->customer); $instance->setCustomer($options['customer']); if (empty($options['customer'])) { self::assertFalse($instance->hasCustomer()); self::assertNull($instance->getCustomer()); self::assertNull($instance->customer); } else { self::assertTrue($instance->hasCustomer()); self::assertSame($options['customer'], $instance->getCustomer()->jsonSerialize()); self::assertSame($options['customer'], $instance->customer->jsonSerialize()); } $instance->customer = $options['customer']; if (empty($options['customer'])) { self::assertFalse($instance->hasCustomer()); self::assertNull($instance->getCustomer()); self::assertNull($instance->customer); } else { self::assertTrue($instance->hasCustomer()); self::assertSame($options['customer'], $instance->getCustomer()->jsonSerialize()); self::assertSame($options['customer'], $instance->customer->jsonSerialize()); } } /** * @dataProvider invalidCustomerDataProvider * * @param mixed $value */ public function testSetInvalidCustomer($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePostReceiptRequest(); $instance->setCustomer($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testType($options): void { $instance = new CreatePostReceiptRequest(); $instance->setType($options['type']); self::assertSame($options['type'], $instance->getType()); self::assertSame($options['type'], $instance->type); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testSetInvalidType($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePostReceiptRequest(); $instance->setType($value); } public function testValidate(): void { $instance = new CreatePostReceiptRequest(); self::assertFalse($instance->validate()); $instance->setCustomer(new ReceiptCustomer()); self::assertFalse($instance->validate()); $instance->setCustomer(new ReceiptCustomer(['email' => 'johndoe@email.com'])); self::assertFalse($instance->validate()); $instance->setType(ReceiptType::REFUND); self::assertFalse($instance->validate()); $instance->setType(ReceiptType::PAYMENT); self::assertFalse($instance->validate()); $instance->setSend(true); self::assertFalse($instance->validate()); $instance->setObjectId(uniqid('', true)); self::assertFalse($instance->validate()); $instance->setSettlements([ new Settlement([ 'type' => SettlementType::PREPAYMENT, 'amount' => new ReceiptItemAmount(10, 'RUB')]), ]); self::assertFalse($instance->validate()); $instance->setItems([ new ReceiptItem([ 'description' => 'description', 'amount' => [ 'value' => 10, 'currency' => 'RUB', ], 'quantity' => 1, 'vat_code' => 1, ]), ]); self::assertTrue($instance->validate()); } public function testBuilder(): void { $builder = CreatePaymentRequest::builder(); self::assertInstanceOf(CreatePaymentRequestBuilder::class, $builder); } /** * @dataProvider fromArrayCustomerDataProvider */ public function testCustomerFromArray(array $source, array $expected): void { $receiptPost = new CreatePostReceiptRequest(); $receiptPost->fromArray($source); if (!empty($expected)) { foreach ($expected as $property => $value) { self::assertEquals($value, $receiptPost->offsetGet($property)); } } else { self::assertEmpty($receiptPost->getCustomer()); } } /** * @dataProvider fromArraySettlementDataProvider * * @throws Exception */ public function testSettlementFromArray(array $options): void { $receiptPost = new CreatePostReceiptRequest(); $receiptPost->fromArray($options); self::assertEquals(count($options['settlements']), count($receiptPost->getSettlements())); self::assertFalse($receiptPost->notEmpty()); foreach ($receiptPost->getSettlements() as $index => $item) { self::assertInstanceOf(Settlement::class, $item); self::assertArrayHasKey($index, $options['settlements']); self::assertEquals($options['settlements'][$index]['type'], $item->getType()); self::assertEquals($options['settlements'][$index]['amount'], $item->getAmount()); } } /** * @dataProvider invalidSetsDataProvider * * @param mixed $value */ public function testSetInvalidItems($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePostReceiptRequest(); $instance->setItems($value); } public function testGetObjectId(): void { $instance = new CreatePostReceiptRequest(); $instance->setObjectId('test'); self::assertSame('test', $instance->getObjectId()); } /** * @dataProvider invalidTaxSystemCodeDataProvider * * @param mixed $value */ public function testSetInvalidTaxSystemCode($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePostReceiptRequest(); $instance->setTaxSystemCode($value); } public function testSetTaxSystemCode(): void { $instance = new CreatePostReceiptRequest(); $instance->setTaxSystemCode(3); self::assertSame(3, $instance->getTaxSystemCode()); } /** * @dataProvider invalidSetsDataProvider * * @param mixed $value */ public function testSetInvalidSettlements($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePostReceiptRequest(); $instance->setSettlements($value); } public function testSetItems(): void { $instance = new CreatePostReceiptRequest(); $instance->setItems( [ [ 'description' => 'description', 'amount' => [ 'value' => 10, 'currency' => 'RUB', ], 'quantity' => 1, 'vat_code' => 1, ], ] ); self::assertSame([ 'description' => 'description', 'quantity' => 1.0, 'amount' => [ 'value' => '10.00', 'currency' => 'RUB', ], 'vat_code' => 1, ], $instance->getItems()[0]->toArray()); } /** * @dataProvider invalidSetOnBehalfOfDataProvider * * @param mixed $value */ public function testSetInvalidOnBehalfOf($value): void { $this->expectException(TypeError::class); $instance = new CreatePostReceiptRequest(); $instance->setOnBehalfOf($value); } public function testsetOnBehalfOf(): void { $instance = new CreatePostReceiptRequest(); $instance->setOnBehalfOf('test'); self::assertSame('test', $instance->getOnBehalfOf()); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSend($options): void { $instance = new CreatePostReceiptRequest(); self::assertTrue($instance->getSend()); self::assertTrue($instance->send); $instance->setSend($options['send']); self::assertSame($options['send'], $instance->getSend()); self::assertSame($options['send'], $instance->send); } public static function fromArrayCustomerDataProvider(): array { $customer = new ReceiptCustomer(); $customer->setFullName('John Doe'); $customer->setEmail('johndoe@yoomoney.ru'); $customer->setPhone('79000000000'); $customer->setInn('6321341814'); return [ [ [], [], ], [ [ 'customer' => [ 'fullName' => 'John Doe', 'email' => 'johndoe@yoomoney.ru', 'phone' => '79000000000', 'inn' => '6321341814', ], ], [ 'customer' => $customer, ], ], [ [ 'customer' => [ 'full_name' => 'John Doe', 'inn' => '6321341814', 'email' => 'johndoe@yoomoney.ru', 'phone' => '79000000000', ], ], [ 'customer' => $customer, ], ], ]; } /** * @return array[][][] * * @throws Exception */ public function fromArraySettlementDataProvider(): array { return [ [ [ 'settlements' => $this->generateSettlements(), ], ], ]; } /** * @return array[][] */ public static function fromArrayDataProvider(): array { $receiptItem = new ReceiptItem(); $receiptItem->setDescription('test'); $receiptItem->setQuantity(322); $receiptItem->setVatCode(4); $receiptItem->setPrice(new ReceiptItemAmount(5, 'USD')); return [ [ [], [], ], [ [ 'taxSystemCode' => 2, 'customer' => [ 'phone' => '1234567890', 'email' => 'test@tset', ], 'items' => [ new ReceiptItem(), ], ], [ 'tax_system_code' => 2, 'customer' => new ReceiptCustomer([ 'phone' => '1234567890', 'email' => 'test@tset', ]), 'items' => [ new ReceiptItem(), ], ], ], [ [ 'tax_system_code' => 3, 'customer' => [ 'phone' => '1234567890', 'email' => 'test@tset', ], 'items' => [ [ 'description' => 'test', 'quantity' => 322, 'amount' => [ 'value' => 5, 'currency' => 'USD', ], 'vat_code' => 4, ], new ReceiptItem(), [ 'description' => 'test', 'quantity' => 322, 'amount' => new ReceiptItemAmount(5, 'USD'), 'vat_code' => 4, ], [ 'description' => 'test', 'quantity' => 322, 'amount' => new ReceiptItemAmount([ 'value' => 5, 'currency' => 'USD', ]), 'vat_code' => 4, ], ], ], [ 'taxSystemCode' => 3, 'customer' => new ReceiptCustomer([ 'phone' => '1234567890', 'email' => 'test@tset', ]), 'items' => [ $receiptItem, new ReceiptItem(), $receiptItem, $receiptItem, ], ], ], ]; } /** * @throws Exception */ public static function validDataProvider(): array { $type = Random::value(ReceiptType::getEnabledValues()); $result = [ [ [ 'customer' => [ 'full_name' => Random::str(128), 'email' => 'johndoe@yoomoney.ru', 'phone' => Random::str(4, 12, '1234567890'), 'inn' => '1234567890', ], 'items' => [ [ 'description' => Random::str(128), 'quantity' => Random::int(1, 10), 'amount' => [ 'value' => Random::float(0.1, 99.99), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'vat_code' => Random::int(1, 6), 'payment_subject' => Random::value(PaymentSubject::getValidValues()), 'payment_mode' => Random::value(PaymentMode::getValidValues()), 'product_code' => Random::str(128), 'country_of_origin_code' => 'RU', 'customs_declaration_number' => Random::str(128), 'excise' => Random::float(0.0, 99.99), ], ], 'tax_system_code' => Random::int(1, 6), 'type' => $type, 'send' => true, 'settlements' => [ [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => [ 'value' => Random::float(0.1, 99.99), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ], $type . '_id' => uniqid('', true), ], ], ]; for ($i = 0; $i < 10; $i++) { $type = Random::value(ReceiptType::getEnabledValues()); $request = [ 'customer' => [ 'full_name' => Random::str(128), 'email' => 'johndoe@yoomoney.ru', 'phone' => Random::str(4, 12, '1234567890'), 'inn' => '1234567890', ], 'items' => [ [ 'description' => Random::str(128), 'quantity' => Random::int(1, 10), 'amount' => [ 'value' => Random::float(0.1, 99.99), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'vat_code' => Random::int(1, 6), 'payment_subject' => Random::value(PaymentSubject::getValidValues()), 'payment_mode' => Random::value(PaymentMode::getValidValues()), 'product_code' => Random::str(128), 'country_of_origin_code' => 'RU', 'customs_declaration_number' => Random::str(128), 'excise' => Random::float(0.0, 99.99), ], ], 'tax_system_code' => Random::int(1, 6), 'type' => $type, 'send' => true, 'settlements' => [ [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => [ 'value' => Random::float(0.1, 99.99), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ], $type . '_id' => uniqid('', true), ]; $result[] = [$request]; } return $result; } public static function invalidCustomerDataProvider() { return [ [false], [true], [1], [Random::str(10)], [new stdClass()], ]; } public static function invalidTypeDataProvider() { return [ [false], [true], [1], [Random::str(10)], ]; } public static function invalidSetsDataProvider() { return [ [[]], [null], ]; } public static function invalidTaxSystemCodeDataProvider() { return [ [false], [0], ]; } public static function invalidSetOnBehalfOfDataProvider() { return [ [new stdClass()], ]; } /** * @throws Exception */ private function generateSettlements(): array { $return = []; $count = Random::int(1, 10); for ($i = 0; $i < $count; $i++) { $return[] = $this->generateSettlement(0 === $i % 2); } return $return; } /** * @param mixed $true * * @return array|Settlement * * @throws Exception */ private function generateSettlement($true) { $params = [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => new MonetaryAmount(Random::int(1, 1000)), ]; return $true ? $params : new Settlement($params); } } yookassa-sdk-php/tests/Request/Receipts/ReceiptResponseFactoryTest.php000064400000002475150364342670022346 0ustar00expectException(InvalidArgumentException::class); $instance = new ReceiptResponseFactory(); $instance->factory($value); } public static function invalidFactoryDataProvider() { return [ [[]], [ ['type' => new stdClass()]], [ ['type' => SettlementType::POSTPAYMENT]], [ [ 'type' => ReceiptType::PAYMENT, 'refund_id' => 1, ], ], [ [ 'type' => ReceiptType::PAYMENT, 'payment_id' => 1, ], ], [ [ 'type' => ReceiptType::REFUND, 'payment_id' => 1, ], ], ]; } } yookassa-sdk-php/tests/Request/Receipts/AbstractTestReceiptResponse.php000064400000027407150364342670022504 0ustar00getTestInstance($options); self::assertEquals($options['id'], $instance->getId()); } /** * @dataProvider validDataProvider */ public function testGetType(array $options): void { $instance = $this->getTestInstance($options); self::assertEquals($options['type'], $instance->getType()); } /** * @dataProvider validDataProvider */ public function testGetStatus(array $options): void { $instance = $this->getTestInstance($options); if (empty($options['status'])) { self::assertNull($instance->getStatus()); } else { self::assertEquals($options['status'], $instance->getStatus()); } } /** * @dataProvider validDataProvider */ public function testGetTaxSystemCode(array $options): void { $instance = $this->getTestInstance($options); if (empty($options['tax_system_code'])) { self::assertNull($instance->getTaxSystemCode()); } else { self::assertEquals($options['tax_system_code'], $instance->getTaxSystemCode()); } } /** * @dataProvider validDataProvider */ public function testGetReceiptOperationalDetails(array $options): void { $instance = $this->getTestInstance($options); if (empty($options['receipt_operational_details'])) { self::assertNull($instance->getReceiptOperationalDetails()); } else { self::assertEquals($options['receipt_operational_details'], $instance->getReceiptOperationalDetails()->toArray()); } } /** * @dataProvider validDataProvider */ public function testReceiptIndustryDetails(array $options): void { $instance = $this->getTestInstance($options); self::assertCount(count($options['receipt_industry_details']), $instance->getReceiptIndustryDetails()); foreach ($instance->getReceiptIndustryDetails() as $index => $item) { self::assertInstanceOf(IndustryDetails::class, $item); self::assertArrayHasKey($index, $options['receipt_industry_details']); self::assertEquals($options['receipt_industry_details'][$index]['federal_id'], $item->getFederalId()); self::assertEquals($options['receipt_industry_details'][$index]['document_date'], $item->getDocumentDate()->format(IndustryDetails::DOCUMENT_DATE_FORMAT)); self::assertEquals($options['receipt_industry_details'][$index]['document_number'], $item->getDocumentNumber()); self::assertEquals($options['receipt_industry_details'][$index]['value'], $item->getValue()); } } /** * @dataProvider validDataProvider */ public function testGetItems(array $options): void { $instance = $this->getTestInstance($options); self::assertEquals(count($options['items']), count($instance->getItems())); foreach ($instance->getItems() as $index => $item) { self::assertInstanceOf(ReceiptResponseItemInterface::class, $item); self::assertArrayHasKey($index, $options['items']); self::assertEquals($options['items'][$index]['description'], $item->getDescription()); self::assertEquals($options['items'][$index]['amount']['value'], $item->getPrice()->getValue()); self::assertEquals($options['items'][$index]['amount']['currency'], $item->getPrice()->getCurrency()); self::assertEquals($options['items'][$index]['quantity'], $item->getQuantity()); self::assertEquals($options['items'][$index]['vat_code'], $item->getVatCode()); } } public function validDataProvider() { date_default_timezone_set('UTC'); $this->valid = true; $receipts = []; for ($i = 0; $i < 10; $i++) { $receipts[] = $this->generateReceipts($this->type, true); } return $receipts; } public function invalidDataProvider() { $this->valid = false; $receipts = []; for ($i = 0; $i < 10; $i++) { $receipts[] = $this->generateReceipts($this->type, false); } return $receipts; } public function invalidAllDataProvider() { return [ [[new ProductCode()]], [[new Airline()]], [SettlementType::PREPAYMENT], [0], ['test'], [10], ]; } public function invalidBoolDataProvider() { return [ [true], [false], ]; } public function invalidBoolNullDataProvider() { return [ [new \stdClass()], ]; } public function invalidSettlementsDataProvider() { return [ [[[]], EmptyPropertyValueException::class], [Random::str(10), TypeError::class], ]; } public function invalidItemsDataProvider() { return [ [[[]], EmptyPropertyValueException::class], [Random::str(10), TypeError::class], ]; } public function invalidFromArray() { return [ [ [ 'id' => Random::str(39), 'type' => Random::value(ReceiptType::getEnabledValues()), 'status' => null, 'items' => false, ], ], [ [ 'id' => Random::str(39), 'type' => Random::value(ReceiptType::getEnabledValues()), 'status' => null, 'items' => 1, ], ], [ [ 'id' => Random::str(39), 'type' => Random::value(ReceiptType::getValidValues()), 'status' => null, 'items' => [new ReceiptResponseItem()], 'settlements' => 1, ], ], ]; } /** * @param mixed $options */ abstract protected function getTestInstance($options): ReceiptResponseInterface; /** * @param mixed $i * @param mixed $options */ abstract protected function addSpecificProperties($options, $i): array; private function generateReceipts($type, $valid) { $this->valid = $valid; $return = []; $count = Random::int(1, 10); for ($i = 0; $i < $count; $i++) { $return[] = $this->generateReceipt($type, $i); } return $return; } private function generateReceipt($type, $index) { $receipt = [ 'id' => Random::str(39), 'type' => $type, 'status' => Random::value(['pending', 'succeeded', 'canceled']), 'fiscal_document_number' => Random::int(4), 'fiscal_storage_number' => Random::int(16), 'fiscal_attribute' => Random::int(10), 'registered_at' => date(YOOKASSA_DATE, Random::int(1000000000, time())), 'fiscal_provider_id' => Random::str(36), 'items' => $this->generateItems(), 'settlements' => $this->generateSettlements(), 'tax_system_code' => Random::int(1, 6), 'receipt_industry_details' => [ [ 'federal_id' => Random::value([ '00' . Random::int(1, 9), '0' . Random::int(1, 6) . Random::int(0, 9), '07' . Random::int(0, 3) ]), 'document_date' => date(IndustryDetails::DOCUMENT_DATE_FORMAT), 'document_number' => Random::str(1, IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH), 'value' => Random::str(1, IndustryDetails::VALUE_MAX_LENGTH), ], ], 'receipt_operational_details' => [ 'operation_id' => Random::int(1, OperationalDetails::OPERATION_ID_MAX_VALUE), 'value' => Random::str(1, OperationalDetails::VALUE_MAX_LENGTH), 'created_at' => date(YOOKASSA_DATE, Random::int(1000000000, time())), ], 'on_behalf_of' => Random::int(6), ]; return $this->addSpecificProperties($receipt, $index); } private function generateItems() { $return = []; $count = Random::int(1, 10); for ($i = 0; $i < $count; $i++) { $return[] = $this->generateItem(); } return $return; } private function generateItem() { $item = [ 'description' => Random::str(1, 128), 'amount' => [ 'value' => round(Random::float(1.00, 100.00), 2), 'currency' => 'RUB', ], 'quantity' => round(Random::float(0.001, 99.999), 3), 'measure' => Random::value(ReceiptItemMeasure::getValidValues()), 'vat_code' => Random::int(1, 6), 'country_of_origin_code' => Random::value(['RU', 'US', 'CN']), 'customs_declaration_number' => Random::str(1, 32), 'mark_code_info' => [ 'mark_code_raw' => '010460406000590021N4N57RTCBUZTQ\u001d2403054002410161218\u001d1424010191ffd0\u001g92tIAF/YVpU4roQS3M/m4z78yFq0nc/WsSmLeX6QkF/YVWwy5IMYAeiQ91Xa2m/fFSJcOkb2N+uUUtfr4n0mOX0Q==', ], 'mark_mode' => 0, 'payment_subject_industry_details' => [ [ 'federal_id' => '001', 'document_date' => date('Y-m-d', Random::int(100000000, 200000000)), 'document_number' => Random::str(1, IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH), 'value' => Random::str(1, IndustryDetails::VALUE_MAX_LENGTH), ], ], ]; if (ReceiptItemMeasure::PIECE === $item['measure']) { $item['mark_quantity'] = [ 'numerator' => Random::int(1, 100), 'denominator' => 100, ]; } return $item; } private function generateSettlements() { $return = []; $count = Random::int(1, 10); for ($i = 0; $i < $count; $i++) { $return[] = $this->generateSettlement(); } return $return; } private function generateSettlement() { return [ 'type' => Random::value(SettlementType::getValidValues()), 'description' => Random::str(1, 128), 'amount' => [ 'value' => round(Random::float(1.00, 100.00), 2), 'currency' => 'RUB', ], 'quantity' => round(Random::float(0.001, 99.999), 3), 'vat_code' => Random::int(1, 6), ]; } } yookassa-sdk-php/tests/Request/Receipts/CreatePostReceiptRequestSerializerTest.php000064400000014552150364342670024673 0ustar00build($options); $data = $serializer->serialize($instance); $expected = [ 'type' => $options['type'], 'send' => $options['send'], ]; if (!empty($options['customer'])) { $expected['customer'] = $options['customer']; } if (!empty($options['tax_system_code'])) { $expected['tax_system_code'] = $options['tax_system_code']; } if (!empty($options['items'])) { foreach ($options['items'] as $item) { $itemArray = $item; if (!empty($item['payment_subject'])) { $itemArray['payment_subject'] = $item['payment_subject']; } if (!empty($item['payment_mode'])) { $itemArray['payment_mode'] = $item['payment_mode']; } if (!empty($item['vat_code'])) { $itemArray['vat_code'] = $item['vat_code']; } if (!empty($item['product_code'])) { $itemArray['product_code'] = $item['product_code']; } $expected['items'][] = $itemArray; } } if (!empty($options['settlements'])) { foreach ($options['settlements'] as $item) { $itemArray = $item; $expected['settlements'][] = $itemArray; } } if (!empty($options['payment_id'])) { $expected['payment_id'] = $options['payment_id']; } if (!empty($options['refund_id'])) { $expected['refund_id'] = $options['refund_id']; } if (!empty($options['receipt_industry_details'])) { $expected['receipt_industry_details'] = $options['receipt_industry_details']; } self::assertEquals($expected, $data); } public function validDataProvider(): array { $result = [ [ [ 'type' => 'payment', 'send' => true, 'customer' => [ 'email' => 'johndoe@yoomoney.ru', ], 'items' => [ [ 'description' => Random::str(10), 'quantity' => (float) Random::int(1, 10), 'amount' => [ 'value' => round(Random::float(1, 100), 2), 'currency' => CurrencyCode::RUB, ], 'vat_code' => Random::int(1, 6), 'payment_subject' => PaymentSubject::COMMODITY, 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, ], ], 'settlements' => [ [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => [ 'value' => round(Random::float(0.1, 99.99), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ], 'payment_id' => uniqid('', true), 'tax_system_code' => Random::int(1, 6), ], ], ]; for ($i = 0; $i < 10; $i++) { $type = Random::value([ReceiptType::PAYMENT, ReceiptType::REFUND]); $request = [ 'items' => $this->getReceiptItems($i + 1), 'customer' => [ 'email' => 'johndoe@yoomoney.ru', 'phone' => Random::str(12, '0123456789'), ], 'tax_system_code' => Random::int(1, 6), 'type' => $type, 'send' => true, 'settlements' => $this->getSettlements($i + 1), 'receipt_industry_details' => [], $type . '_id' => uniqid('', true), ]; $result[] = [$request]; } return $result; } /** * @throws Exception */ private function getReceiptItems(int $count): array { $result = []; for ($i = 0; $i < $count; $i++) { $result[] = [ 'description' => Random::str(10), 'quantity' => (float) Random::float(1, 100), 'amount' => [ 'value' => (float) Random::int(1, 100), 'currency' => CurrencyCode::RUB, ], 'vat_code' => Random::int(1, 6), 'payment_subject' => Random::value(PaymentSubject::getValidValues()), 'payment_mode' => Random::value(PaymentMode::getValidValues()), 'product_code' => Random::str(96, 96, '0123456789ABCDEF '), 'country_of_origin_code' => 'RU', 'customs_declaration_number' => Random::str(32), 'excise' => Random::float(0.0, 99.99), ]; } return $result; } /** * @throws Exception */ private function getSettlements(int $count): array { $result = []; for ($i = 0; $i < $count; $i++) { $result[] = [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => [ 'value' => round(Random::float(0.1, 99.99), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ]; } return $result; } } yookassa-sdk-php/tests/Request/Receipts/CreatePostReceiptRequestBuilderTest.php000064400000045607150364342670024155 0ustar00build($options); if (empty($options['items'])) { self::assertNull($instance->getItems()); } else { self::assertNotNull($instance->getItems()); self::assertEquals(count($options['items']), count($instance->getItems())); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetSettlements($options): void { $builder = new CreatePostReceiptRequestBuilder(); $instance = $builder->build($options); if (empty($options['settlements'])) { self::assertNull($instance->getSettlements()); } else { self::assertNotNull($instance->getSettlements()); self::assertEquals(count($options['settlements']), count($instance->getSettlements())); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetCustomer($options): void { $builder = new CreatePostReceiptRequestBuilder(); $instance = $builder->build($options); if (empty($options['customer'])) { self::assertNull($instance->getCustomer()); } else { self::assertNotNull($instance->getCustomer()); if (!is_object($instance->getCustomer())) { self::assertEquals($options['customer'], $instance->getCustomer()->jsonSerialize()); } else { self::assertTrue($instance->getCustomer() instanceof ReceiptCustomerInterface); } } } /** * @dataProvider invalidCustomerDataProvider * * @param mixed $value */ public function testSetInvalidCustomer($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePostReceiptRequestBuilder(); $builder->setCustomer($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetType($options): void { $builder = new CreatePostReceiptRequestBuilder(); $instance = $builder->build($options); if (empty($options['type'])) { self::assertNull($instance->getType()); } else { self::assertNotNull($instance->getType()); self::assertEquals($options['type'], $instance->getType()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetObjectId($options): void { $builder = new CreatePostReceiptRequestBuilder(); $instance = $builder->build($options); if (empty($options['payment_id']) && empty($options['refund_id'])) { self::assertNull($instance->getObjectId()); } else { self::assertNotNull($instance->getObjectId()); if (!empty($options['payment_id'])) { self::assertEquals($options['payment_id'], $instance->getObjectId()); self::assertEquals(ReceiptType::PAYMENT, $instance->getObjectType()); } if (!empty($options['refund_id'])) { self::assertEquals($options['refund_id'], $instance->getObjectId()); self::assertEquals(ReceiptType::REFUND, $instance->getObjectType()); } } } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testSetInvalidType($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePostReceiptRequestBuilder(); $builder->setType($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetSend($options): void { $builder = new CreatePostReceiptRequestBuilder(); $instance = $builder->build($options); if (empty($options['send'])) { self::assertNull($instance->getSend()); } else { self::assertNotNull($instance->getSend()); self::assertEquals($options['send'], $instance->getSend()); } } /** * @dataProvider invalidBooleanDataProvider * * @param mixed $value */ public function testSetInvalidSend($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePostReceiptRequestBuilder(); $builder->setType($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetTaxSystemCode($options): void { $builder = new CreatePostReceiptRequestBuilder(); $instance = $builder->build($options); if (empty($options['tax_system_code'])) { self::assertNull($instance->getTaxSystemCode()); } else { self::assertNotNull($instance->getTaxSystemCode()); self::assertEquals($options['tax_system_code'], $instance->getTaxSystemCode()); } } /** * @dataProvider invalidVatIdDataProvider * * @param mixed $value */ public function testSetInvalidTaxSystemId($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePostReceiptRequestBuilder(); $builder->setTaxSystemCode($value); } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetAdditionalUserProps($options): void { $builder = new CreatePostReceiptRequestBuilder(); $instance = $builder->build($options); if (empty($options['additional_user_props'])) { self::assertNull($instance->getAdditionalUserProps()); } else { self::assertNotNull($instance->getAdditionalUserProps()); if (!is_object($instance->getAdditionalUserProps())) { self::assertEquals($options['additional_user_props'], $instance->getAdditionalUserProps()->toArray()); } else { self::assertTrue($instance->getAdditionalUserProps() instanceof AdditionalUserProps); } } } /** * @dataProvider invalidAdditionalUserPropsDataProvider * * @param mixed $value */ public function testSetInvalidAdditionalProps($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePostReceiptRequestBuilder(); $builder->setAdditionalUserProps($value); } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetReceiptIndustryDetails($options): void { $builder = new CreatePostReceiptRequestBuilder(); $instance = $builder->build($options); if (empty($options['receipt_industry_details'])) { self::assertEmpty($instance->getReceiptIndustryDetails()); } else { self::assertNotNull($instance->getReceiptIndustryDetails()); self::assertCount(count($options['receipt_industry_details']), $instance->getReceiptIndustryDetails()); } } /** * @dataProvider invalidReceiptIndustryDetailsDataProvider * * @param mixed $value */ public function testSetInvalidReceiptIndustryDetails($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePostReceiptRequestBuilder(); $builder->setReceiptIndustryDetails($value); } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetReceiptOperationalDetails($options): void { $builder = new CreatePostReceiptRequestBuilder(); $instance = $builder->build($options); if (empty($options['receipt_operational_details'])) { self::assertNull($instance->getReceiptOperationalDetails()); } else { self::assertNotNull($instance->getReceiptOperationalDetails()); if (!is_object($instance->getReceiptOperationalDetails())) { self::assertEquals($options['receipt_operational_details'], $instance->getReceiptOperationalDetails()->toArray()); } else { self::assertTrue($instance->getReceiptOperationalDetails() instanceof OperationalDetails); } } } /** * @dataProvider invalidReceiptOperationalDetailsDataProvider * * @param mixed $value */ public function testSetInvalidReceiptOperationalDetails($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePostReceiptRequestBuilder(); $builder->setReceiptOperationalDetails($value); } /** * @dataProvider validDataProvider * * @param $value * @param mixed $options */ public function testSetOnBehalfOf($options): void { $builder = new CreatePostReceiptRequestBuilder(); $instance = $builder->build($options); if (empty($options['on_behalf_of'])) { self::assertNull($instance->getOnBehalfOf()); } else { self::assertNotNull($instance->getOnBehalfOf()); self::assertEquals($options['on_behalf_of'], $instance->getOnBehalfOf()); } } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testSetCurrency($value): void { $builder = new CreatePostReceiptRequestBuilder(); $builder->setItems($value['items']); $result = $builder->setCurrency(Random::value(CurrencyCode::getValidValues())); self::assertNotNull($result); self::assertInstanceOf(CreatePostReceiptRequestBuilder::class, $result); } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testAddItem($value): void { $builder = new CreatePostReceiptRequestBuilder(); foreach ($value['items'] as $item) { $result = $builder->addItem(new ReceiptItem($item)); self::assertNotNull($result); self::assertInstanceOf(CreatePostReceiptRequestBuilder::class, $result); } } public static function setAmountDataProvider() { return [ [ new MonetaryAmount( round(Random::float(0.1, 99.99), 2), Random::value(CurrencyCode::getValidValues()) ), ], [ [ 'value' => round(Random::float(0.1, 99.99), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ['100'], ]; } public static function validDataProvider() { $type = Random::value(ReceiptType::getEnabledValues()); $result = [ [ [ 'customer' => new ReceiptCustomer(), 'items' => [ [ 'description' => Random::str(128), 'quantity' => Random::int(1, 10), 'amount' => [ 'value' => round(Random::float(0.1, 99.99), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'vat_code' => Random::int(1, 6), 'payment_subject' => Random::value(PaymentSubject::getValidValues()), 'payment_mode' => Random::value(PaymentMode::getValidValues()), 'product_code' => Random::str(2, 96, '1234567890ABCDEF '), 'country_of_origin_code' => 'RU', 'customs_declaration_number' => Random::str(32), 'excise' => Random::float(0.0, 99.99), ], ], 'tax_system_code' => Random::int(1, 6), 'additional_user_props' => null, 'receipt_industry_details' => null, 'receipt_operational_details' => null, 'type' => 'payment', 'send' => true, 'settlements' => [ [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => [ 'value' => round(Random::float(0.1, 99.99), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ], $type . '_id' => uniqid('', true), ], ], ]; for ($i = 0; $i < 10; $i++) { $type = Random::value(ReceiptType::getEnabledValues()); $request = [ 'customer' => [ 'full_name' => Random::str(128), 'email' => 'johndoe@yoomoney.ru', 'phone' => Random::str(4, 12, '1234567890'), 'inn' => '1234567890', ], 'items' => [ [ 'description' => Random::str(128), 'quantity' => Random::int(1, 10), 'amount' => [ 'value' => round(Random::float(0.1, 99.99), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'vat_code' => Random::int(1, 6), 'payment_subject' => Random::value(PaymentSubject::getValidValues()), 'payment_mode' => Random::value(PaymentMode::getValidValues()), 'product_code' => Random::str(2, 96, '0123456789ABCDEF '), 'country_of_origin_code' => 'RU', 'customs_declaration_number' => Random::str(32), 'excise' => round(Random::float(0.0, 99.99), 2), ], ], 'tax_system_code' => Random::int(1, 6), 'additional_user_props' => [ 'name' => Random::str(1, AdditionalUserProps::NAME_MAX_LENGTH), 'value' => Random::str(1, AdditionalUserProps::VALUE_MAX_LENGTH), ], 'receipt_industry_details' => [ [ 'federal_id' => Random::value([ '00' . Random::int(1, 9), '0' . Random::int(1, 6) . Random::int(0, 9), '07' . Random::int(0, 3) ]), 'document_date' => date(IndustryDetails::DOCUMENT_DATE_FORMAT), 'document_number' => Random::str(1, IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH), 'value' => Random::str(1, IndustryDetails::VALUE_MAX_LENGTH), ], ], 'receipt_operational_details' => [ 'operation_id' => Random::int(0, OperationalDetails::OPERATION_ID_MAX_VALUE), 'value' => Random::str(1, OperationalDetails::VALUE_MAX_LENGTH), 'created_at' => date(YOOKASSA_DATE), ], 'type' => $type, 'send' => true, 'on_behalf_of' => Random::int(99999, 999999), 'settlements' => [ [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => [ 'value' => round(Random::float(0.1, 99.99), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ], $type . '_id' => uniqid('', true), ]; $result[] = [$request]; } return $result; } public function invalidAmountDataProvider() { return [ [-1], [true], [false], [new stdClass()], [0], ]; } public static function invalidCustomerDataProvider() { return [ [true], [false], [Random::str(1, 100)], ]; } public static function invalidVatIdDataProvider() { return [ [false], [0], [7], [Random::int(-100, -1)], [Random::int(7, 100)], ]; } public static function invalidTypeDataProvider() { return [ [true], [false], [0], [7], [Random::int(-100, -1)], [Random::int(7, 100)], ]; } public static function invalidBooleanDataProvider() { return [ ['test'], ]; } public static function invalidAdditionalUserPropsDataProvider() { return [ [new stdClass()], ['test'], [[ 'name' => Random::str(AdditionalUserProps::NAME_MAX_LENGTH + 1), 'value' => Random::str(1, AdditionalUserProps::VALUE_MAX_LENGTH), ]], [[ 'name' => Random::str(1, AdditionalUserProps::NAME_MAX_LENGTH), 'value' => Random::str(AdditionalUserProps::VALUE_MAX_LENGTH + 1), ]], ]; } public static function invalidReceiptOperationalDetailsDataProvider() { return [ [new stdClass()], [true], [Random::str(1, 100)], ]; } public static function invalidReceiptIndustryDetailsDataProvider() { return [ [new stdClass()], [true], [Random::str(1, 100)], ]; } } yookassa-sdk-php/tests/Request/Receipts/ReceiptsResponseTest.php000064400000007663150364342670021205 0ustar00getType()); self::assertEquals($options['next_cursor'], $instance->getNextCursor()); } /** * @dataProvider validDataProvider * * @throws Exception */ public function testGetItems(array $options): void { $instance = new ReceiptsResponse($options); self::assertEquals(count($options['items']), count($instance->getItems())); self::assertTrue($instance->hasNextCursor()); foreach ($instance->getItems() as $index => $item) { self::assertInstanceOf(ReceiptResponseInterface::class, $item); self::assertArrayHasKey($index, $options['items']); self::assertEquals($options['items'][$index]['id'], $item->getId()); self::assertEquals($options['items'][$index]['type'], $item->getType()); self::assertEquals($options['items'][$index]['tax_system_code'], $item->getTaxSystemCode()); self::assertEquals($options['items'][$index]['status'], $item->getStatus()); self::assertEquals(count($options['items'][$index]['items']), count($item->getItems())); } } public function validDataProvider(): array { return [ [ [ 'type' => 'list', 'items' => $this->generateReceipts(), 'next_cursor' => Random::str(36), ], ], ]; } private function generateReceipts(): array { $return = []; $count = Random::int(1, 10); for ($i = 0; $i < $count; $i++) { $return[] = $this->generateReceipt(); } return $return; } private function generateReceipt(): array { $type = Random::value(ReceiptType::getEnabledValues()); return [ 'id' => Random::str(39), 'type' => $type, 'status' => Random::value(['pending', 'succeeded', 'canceled']), 'items' => $this->generateItems(), 'settlements' => $this->generateSettlements(), 'tax_system_code' => Random::int(1, 6), $type . '_id' => UUID::v4(), ]; } private function generateItems(): array { $return = []; $count = Random::int(1, 10); for ($i = 0; $i < $count; $i++) { $return[] = $this->generateItem(); } return $return; } private function generateItem(): array { return [ 'description' => Random::str(1, 128), 'amount' => [ 'value' => round(Random::float(1.00, 100.00), 2), 'currency' => 'RUB', ], 'quantity' => round(Random::float(0.001, 99.999), 3), 'vat_code' => Random::int(1, 6), ]; } private function generateSettlements(): array { $return = []; $count = Random::int(1, 10); for ($i = 0; $i < $count; $i++) { $return[] = $this->generateSettlement(); } return $return; } private function generateSettlement(): array { return [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => [ 'value' => round(Random::float(1.00, 100.00), 2), 'currency' => 'RUB', ], ]; } } yookassa-sdk-php/tests/Request/Receipts/SimpleReceiptResponseTest.php000064400000001331150364342670022156 0ustar00getTestInstance($options); self::assertEquals($options['id'], $instance->getId()); } protected function getTestInstance($options): SimpleReceiptResponse { return new SimpleReceiptResponse($options); } protected function addSpecificProperties($options, $i): array { return $options; } } yookassa-sdk-php/tests/Request/Refunds/CreateRefundRequestSerializerTest.php000064400000023347150364342670023507 0ustar00serialize(CreateRefundRequest::builder()->build($options)); $expected = [ 'payment_id' => $options['paymentId'], 'amount' => $options['amount'], ]; if (!empty($options['description'])) { $expected['description'] = $options['description']; } if (!empty($options['deal'])) { $expected['deal'] = $options['deal']; } if (!empty($options['receiptItems'])) { foreach ($options['receiptItems'] as $item) { $itemData = [ 'description' => $item['description'], 'quantity' => empty($item['quantity']) ? 1 : $item['quantity'], 'amount' => $options['amount'], 'vat_code' => $item['vatCode'], ]; if (!empty($item['payment_mode'])) { $itemData['payment_mode'] = $item['payment_mode']; } if (!empty($item['payment_subject'])) { $itemData['payment_subject'] = $item['payment_subject']; } $expected['receipt']['items'][] = $itemData; } } if (!empty($options['sources'])) { foreach ($options['sources'] as $item) { $expected['sources'][] = [ 'account_id' => $item['account_id'], 'amount' => [ 'value' => $item['amount']['value'], 'currency' => $item['amount']['currency'] ?? CurrencyCode::RUB, ], ]; } } if (!empty($options['receipt'])) { $expected['receipt'] = $options['receipt']; } self::assertEquals($expected, $data); } public function validDataProvider() { $result = [ [ [ 'paymentId' => $this->randomString(36), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'description' => null, 'deal' => null, 'receipt' => [ 'items' => [ [ 'description' => 'test', 'quantity' => Random::int(1, 100), 'amount' => [ 'value' => Random::int(1, 1000000), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'vat_code' => Random::int(1, 6), ], ], 'customer' => [ 'phone' => Random::str(10, '0123456789'), ], 'tax_system_code' => Random::int(1, 6), ], 'sources' => [ new Source([ 'account_id' => Random::str(36), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ]), ], ], ], [ [ 'paymentId' => $this->randomString(36), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'description' => '', 'deal' => [ 'refund_settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ] ], ], 'receipt' => [ 'items' => [ [ 'description' => 'test', 'quantity' => Random::int(1, 100), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'vat_code' => Random::int(1, 6), ], ], 'customer' => [ 'email' => 'johndoe@yoomoney.ru', ], 'tax_system_code' => Random::int(1, 6), ], 'sources' => [ new Source([ 'account_id' => Random::str(36), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ]), ], ], ], ]; for ($i = 0; $i < 10; $i++) { $request = [ 'paymentId' => $this->randomString(36), 'amount' => [ 'value' => Random::int(1, 1000000), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'description' => uniqid('', true), 'deal' => [ 'refund_settlements' => [ [ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => 123.00, 'currency' => 'RUB', ], ], ], ], 'receipt' => [ 'items' => [ [ 'description' => 'test', 'quantity' => Random::int(1, 100), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'vat_code' => Random::int(1, 6), 'payment_mode' => Random::value(PaymentMode::getValidValues()), 'payment_subject' => Random::value(PaymentSubject::getValidValues()), ], ], 'customer' => [ 'phone' => Random::str(10, '0123456789'), ], 'tax_system_code' => Random::int(1, 6), ], 'sources' => [ new Source([ 'account_id' => Random::str(36), 'amount' => new MonetaryAmount(Random::int(1, 1000), 'RUB'), ]), ], ]; $result[] = [$request]; } return $result; } private function randomString($length, $any = true): string { static $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-+_.'; $result = ''; for ($i = 0; $i < $length; $i++) { if ($any) { $char = chr(Random::int(32, 126)); } else { $rnd = Random::int(0, strlen($chars) - 1); $char = $chars[$rnd]; } $result .= $char; } return $result; } private function getReceipt($count): array { $result = []; for ($i = 0; $i < $count; $i++) { $result[] = [ 'description' => Random::str(10), 'quantity' => Random::float(1, 100), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'vatCode' => Random::int(1, 6), 'paymentMode' => Random::value(PaymentMode::getValidValues()), 'paymentSubject' => Random::value(PaymentSubject::getValidValues()), ]; } return $result; } } yookassa-sdk-php/tests/Request/Refunds/RefundsRequestBuilderTest.php000064400000016246150364342670022023 0ustar00build(); self::assertNull($instance->getPaymentId()); $builder->setPaymentId($options['paymentId']); $instance = $builder->build(); if (empty($options['paymentId'])) { self::assertNull($instance->getPaymentId()); } else { self::assertEquals($options['paymentId'], $instance->getPaymentId()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetCreateAtGte($options): void { $builder = new RefundsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCreatedAtGte()); $builder->setCreatedAtGte($options['createAtGte']); $instance = $builder->build(); if (empty($options['createAtGte'])) { self::assertNull($instance->getCreatedAtGte()); } else { self::assertEquals($options['createAtGte'], $instance->getCreatedAtGte()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetCreateAtGt($options): void { $builder = new RefundsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCreatedAtGt()); $builder->setCreatedAtGt($options['createAtGt']); $instance = $builder->build(); if (empty($options['createAtGt'])) { self::assertNull($instance->getCreatedAtGt()); } else { self::assertEquals($options['createAtGt'], $instance->getCreatedAtGt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetCreateAtLte($options): void { $builder = new RefundsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCreatedAtLte()); $builder->setCreatedAtLte($options['createAtLte']); $instance = $builder->build(); if (empty($options['createAtLte'])) { self::assertNull($instance->getCreatedAtLte()); } else { self::assertEquals($options['createAtLte'], $instance->getCreatedAtLte()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetCreateAtLt($options): void { $builder = new RefundsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCreatedAtLt()); $builder->setCreatedAtLt($options['createAtLt']); $instance = $builder->build(); if (empty($options['createAtLt'])) { self::assertNull($instance->getCreatedAtLt()); } else { self::assertEquals($options['createAtLt'], $instance->getCreatedAtLt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetStatus($options): void { $builder = new RefundsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getStatus()); $builder->setStatus($options['status']); $instance = $builder->build(); if (empty($options['status'])) { self::assertNull($instance->getStatus()); } else { self::assertEquals($options['status'], $instance->getStatus()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetCursor($options): void { $builder = new RefundsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCursor()); $builder->setCursor($options['cursor']); $instance = $builder->build(); if (empty($options['cursor'])) { self::assertNull($instance->getCursor()); } else { self::assertEquals($options['cursor'], $instance->getCursor()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetLimit($options): void { $builder = new RefundsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getLimit()); $builder->setLimit($options['limit']); $instance = $builder->build(); if (empty($options['limit'])) { self::assertNull($instance->getLimit()); } else { self::assertEquals($options['limit'], $instance->getLimit()); } } public function validDataProvider() { $result = [ [ [ 'paymentId' => null, 'createAtGte' => null, 'createAtGt' => null, 'createAtLte' => null, 'createAtLt' => null, 'status' => '', 'cursor' => null, 'limit' => 1, ], ], [ [ 'paymentId' => '', 'createAtGte' => '', 'createAtGt' => '', 'createAtLte' => '', 'createAtLt' => '', 'status' => '', 'cursor' => '', 'limit' => null, ], ], ]; $statuses = RefundStatus::getValidValues(); for ($i = 0; $i < 10; $i++) { $request = [ 'paymentId' => $this->randomString(36), 'createAtGte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createAtGt' => date(YOOKASSA_DATE, Random::int(1, time())), 'createAtLte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createAtLt' => date(YOOKASSA_DATE, Random::int(1, time())), 'status' => $statuses[Random::int(0, count($statuses) - 1)], 'cursor' => uniqid('', true), 'limit' => Random::int(1, RefundsRequest::MAX_LIMIT_VALUE), ]; $result[] = [$request]; } return $result; } private function randomString($length, $any = true) { static $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-+_.'; $result = ''; for ($i = 0; $i < $length; $i++) { if ($any) { $char = chr(Random::int(32, 126)); } else { $rnd = Random::int(0, strlen($chars) - 1); $char = $chars[$rnd]; } $result .= $char; } return $result; } } yookassa-sdk-php/tests/Request/Refunds/CreateRefundRequestBuilderTest.php000064400000054417150364342670022766 0ustar00build(['amountValue' => Random::int(1, 100)]); } catch (RuntimeException $e) { $builder->setPaymentId($options['paymentId']); $instance = $builder->build(['amount' => Random::int(1, 100)]); self::assertEquals($options['paymentId'], $instance->getPaymentId()); return; } self::fail('Exception not thrown'); } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetAmountValue($options): void { $builder = new CreateRefundRequestBuilder(); try { $builder->build(['paymentId' => Random::str(36)]); } catch (RuntimeException $e) { $builder->setAmount($options['amount']); $instance = $builder->build(['paymentId' => Random::str(36)]); if ($options['amount'] instanceof AmountInterface) { self::assertEquals($options['amount']->getValue(), $instance->getAmount()->getValue()); } else { self::assertEquals($options['amount']['value'], $instance->getAmount()->getValue()); } if ($options['amount'] instanceof AmountInterface) { $builder->setAmount([ 'value' => $options['amount']->getValue(), 'currency' => 'USD', ]); $instance = $builder->build(['paymentId' => Random::str(36)]); self::assertEquals($options['amount']->getValue(), $instance->getAmount()->getValue()); } else { $builder->setAmount($options['amount']); $instance = $builder->build(['paymentId' => Random::str(36)]); self::assertEquals($options['amount']['value'], $instance->getAmount()->getValue()); } return; } self::fail('Exception not thrown'); } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetAmountCurrency($options): void { $builder = new CreateRefundRequestBuilder(); $builder->setCurrency($options['amount']['currency']); $instance = $builder->build($options); self::assertEquals($options['amount']['currency'], $instance->getAmount()->getCurrency()); } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetComment($options): void { $builder = new CreateRefundRequestBuilder(); $instance = $builder->build([ 'paymentId' => Random::str(36), 'amount' => Random::int(1, 100), ]); self::assertNull($instance->getDescription()); $builder->setDescription($options['description']); $instance = $builder->build([ 'paymentId' => Random::str(36), 'amount' => Random::int(1, 100), ]); if (empty($options['description'])) { self::assertNull($instance->getDescription()); } else { self::assertEquals($options['description'], $instance->getDescription()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testBuild($options): void { $builder = new CreateRefundRequestBuilder(); $instance = $builder->build($options); self::assertEquals($options['paymentId'], $instance->getPaymentId()); if ($options['amount'] instanceof AmountInterface) { self::assertEquals($options['amount']->getValue(), $instance->getAmount()->getValue()); } else { self::assertEquals($options['amount']['value'], $instance->getAmount()->getValue()); } self::assertEquals($options['amount']['currency'], $instance->getAmount()->getCurrency()); if (empty($options['description'])) { self::assertNull($instance->getDescription()); } else { self::assertEquals($options['description'], $instance->getDescription()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetReceiptItems($options): void { $builder = new CreateRefundRequestBuilder(); $builder->setReceiptItems($options['receiptItems']); $builder->setReceiptEmail($options['receiptEmail']); $instance = $builder->build($this->getRequiredData()); if (empty($options['receiptItems'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals(count($options['receiptItems']), count($instance->getReceipt()->getItems())); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testAddReceiptItems($options): void { $builder = new CreateRefundRequestBuilder(); foreach ($options['receiptItems'] as $item) { if ($item instanceof ReceiptItem) { $builder->addReceiptItem( $item->getDescription(), $item->getPrice()->getValue(), $item->getQuantity(), $item->getVatCode() ); } else { $builder->addReceiptItem($item['description'], $item['price']['value'], $item['quantity'], $item['vatCode']); } } $builder->setReceiptEmail($options['receiptEmail']); $instance = $builder->build($this->getRequiredData()); if (empty($options['receiptItems'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals(count($options['receiptItems']), count($instance->getReceipt()->getItems())); foreach ($instance->getReceipt()->getItems() as $item) { self::assertFalse($item->isShipping()); } } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testAddReceiptShipping($options): void { $builder = new CreateRefundRequestBuilder(); foreach ($options['receiptItems'] as $item) { if ($item instanceof ReceiptItem) { $builder->addReceiptShipping( $item->getDescription(), $item->getPrice()->getValue(), $item->getVatCode() ); } else { $builder->addReceiptShipping($item['description'], $item['price']['value'], $item['vatCode']); } } $builder->setReceiptEmail($options['receiptEmail']); $instance = $builder->build($this->getRequiredData()); if (empty($options['receiptItems'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals(count($options['receiptItems']), count($instance->getReceipt()->getItems())); foreach ($instance->getReceipt()->getItems() as $item) { self::assertTrue($item->isShipping()); } } } /** * @dataProvider invalidItemsDataProvider * * @param mixed $items */ public function testSetInvalidReceiptItems($items): void { $this->expectException(InvalidArgumentException::class); $builder = new CreateRefundRequestBuilder(); $builder->setReceiptItems($items); } /** * @throws Exception */ public function testSetReceipt(): void { $receipt = [ 'tax_system_code' => Random::int(1, 6), 'customer' => [ 'email' => 'johndoe@yoomoney.ru', 'phone' => Random::str(4, 15, '0123456789'), ], 'items' => [ [ 'description' => 'test', 'quantity' => 123, 'amount' => [ 'value' => 321, 'currency' => 'USD', ], 'vat_code' => Random::int(1, 6), 'payment_subject' => PaymentSubject::COMMODITY, 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, ], ], ]; $builder = new CreateRefundRequestBuilder(); $builder->setReceipt($receipt); $instance = $builder->build($this->getRequiredData()); self::assertEquals($receipt['tax_system_code'], $instance->getReceipt()->getTaxSystemCode()); self::assertEquals($receipt['customer']['email'], $instance->getReceipt()->getCustomer()->getEmail()); self::assertEquals($receipt['customer']['phone'], $instance->getReceipt()->getCustomer()->getPhone()); self::assertCount(1, $instance->getReceipt()->getItems()); $receipt = $instance->getReceipt(); $builder = new CreateRefundRequestBuilder(); $builder->setReceipt($instance->getReceipt()); $instance = $builder->build($this->getRequiredData()); self::assertEquals($receipt['tax_system_code'], $instance->getReceipt()->getTaxSystemCode()); self::assertEquals($receipt['customer']['email'], $instance->getReceipt()->getCustomer()->getEmail()); self::assertEquals($receipt['customer']['phone'], $instance->getReceipt()->getCustomer()->getPhone()); self::assertCount(1, $instance->getReceipt()->getItems()); } /** * @dataProvider invalidReceiptDataProvider * * @param mixed $value */ public function testSetInvalidReceipt($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreateRefundRequestBuilder(); $builder->setReceipt($value); } public static function invalidReceiptDataProvider(): array { return [ [null], [true], [false], [1], [1.1], ['test'], [new stdClass()], ]; } public static function invalidItemsDataProvider(): array { return [ [ [ [ 'price' => [1], 'quantity' => -1.4, 'vatCode' => 10, ], ], ], [ [ [ 'title' => 'test', 'quantity' => -1.4, 'vatCode' => 3, ], ], ], [ [ [ 'description' => 'test', 'quantity' => 1.4, 'vatCode' => -3, ], ], ], [ [ [ 'title' => 'test', 'price' => [123], 'quantity' => 1.4, 'vatCode' => 7, ], ], ], [ [ [ 'description' => 'test', 'price' => [123], 'quantity' => -1.4, ], ], ], [ [ [ 'title' => 'test', 'price' => [1], 'vatCode' => 7, ], ], ], ]; } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetReceiptEmail($options): void { $builder = new CreateRefundRequestBuilder(); $builder->setReceiptItems($options['receiptItems']); $builder->setReceiptEmail($options['receiptEmail']); $instance = $builder->build($this->getRequiredData()); if (empty($options['receiptItems'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals($options['receiptEmail'], $instance->getReceipt()->getCustomer()->getEmail()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetReceiptPhone($options): void { $builder = new CreateRefundRequestBuilder(); $builder->setReceiptItems($options['receiptItems']); $builder->setReceiptEmail($options['receiptEmail']); $builder->setReceiptPhone($options['receiptPhone']); $instance = $builder->build($this->getRequiredData()); if (empty($options['receiptItems'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals($options['receiptPhone'], $instance->getReceipt()->getCustomer()->getPhone()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetReceiptTaxSystemCode($options): void { $builder = new CreateRefundRequestBuilder(); $builder->setReceiptItems($options['receiptItems']); $builder->setReceiptEmail($options['receiptEmail']); $builder->setTaxSystemCode($options['taxSystemCode']); $instance = $builder->build($this->getRequiredData()); if (empty($options['receiptItems'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals($options['taxSystemCode'], $instance->getReceipt()->getTaxSystemCode()); } } /** * @dataProvider invalidVatIdDataProvider * * @param mixed $value */ public function testSetInvalidTaxSystemId($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreateRefundRequestBuilder(); $builder->setTaxSystemCode($value); } /** * @throws Exception */ public static function validDataProvider(): array { $result = [ [ [ 'paymentId' => Random::str(36), 'amount' => [ 'value' => Random::int(1, 999999), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'description' => null, 'receiptItems' => [], 'receiptEmail' => null, 'receiptPhone' => null, 'taxSystemCode' => Random::int(1, 6), 'sources' => [ new Source([ 'account_id' => Random::str(36), 'amount' => new MonetaryAmount(Random::int(1, 1000), 'RUB'), 'platform_fee_amount' => new MonetaryAmount(Random::int(1, 1000), 'RUB'), ]), ], 'deal' => [ 'id' => Random::str(36, 50), 'refund_settlements' => [ [ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => round(Random::float(10.00, 100.00), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ], ], ], ], [ [ 'paymentId' => Random::str(36), 'amount' => new MonetaryAmount( Random::int(1, 999999), Random::value(CurrencyCode::getValidValues()) ), 'description' => '', 'receiptItems' => [], 'receiptEmail' => '', 'receiptPhone' => '', 'taxSystemCode' => Random::int(1, 6), 'sources' => [ new Source([ 'account_id' => Random::str(36), 'amount' => new MonetaryAmount(Random::int(1, 1000), 'RUB'), 'platform_fee_amount' => new MonetaryAmount(Random::int(1, 1000), 'RUB'), ]), ], 'deal' => [ 'id' => Random::str(36, 50), 'refund_settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ] ], ], ], ], ]; $items = [ new ReceiptItem(), [ 'description' => 'test', 'price' => [ 'value' => Random::int(1, 999999), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'quantity' => Random::int(1, 9999), 'vatCode' => Random::int(1, 6), ], ]; $items[0]->setDescription('test1'); $items[0]->setQuantity(Random::int(1, 9999)); $items[0]->setPrice(new ReceiptItemAmount(Random::int(1, 999999))); $items[0]->setVatCode(Random::int(1, 6)); for ($i = 0; $i < 10; $i++) { $request = [ 'paymentId' => Random::str(36), 'amount' => [ 'value' => Random::int(1, 999999), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'description' => uniqid('', true), 'receiptItems' => $items, 'receiptEmail' => 'johndoe@yoomoney.ru', 'receiptPhone' => Random::str(4, 15, '0123456789'), 'taxSystemCode' => Random::int(1, 6), 'sources' => [ new Source([ 'account_id' => Random::str(36), 'amount' => new MonetaryAmount(Random::int(1, 1000), 'RUB'), 'platform_fee_amount' => new MonetaryAmount(Random::int(1, 1000), 'RUB'), ]), ], 'deal' => [ 'id' => Random::str(36, 50), 'refund_settlements' => [ [ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => round(Random::float(10.00, 100.00), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ], ], ]; $result[] = [$request]; } return $result; } /** * @throws Exception */ public static function invalidVatIdDataProvider(): array { return [ [false], [0], [7], [Random::int(-100, -1)], [Random::int(7, 100)], ]; } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetDeal($options): void { $builder = new CreateRefundRequestBuilder(); $builder->setPaymentId($options['paymentId']); $builder->setAmount($options['amount']); $builder->setDeal($options['deal']); $instance = $builder->build(); if (empty($options['deal'])) { self::assertNull($instance->getDeal()); } else { self::assertNotNull($instance->getDeal()); self::assertEquals($options['deal'], $instance->getDeal()->toArray()); } } /** * @throws Exception */ public static function invalidDealDataProvider(): array { return [ [true], [false], [new stdClass()], [0], [7], [Random::int(-100, -1)], [Random::int(7, 100)], ]; } /** * @dataProvider invalidDealDataProvider * * @param mixed $value */ public function testSetInvalidDeal($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePaymentRequestBuilder(); $builder->setDeal($value); } /** * @throws Exception */ private function getRequiredData(): array { return [ 'paymentId' => Random::str(36), 'amount' => Random::int(1, 100), ]; } } yookassa-sdk-php/tests/Request/Refunds/AbstractTestRefundResponse.php000064400000013231150364342670022152 0ustar00getTestInstance($options); self::assertEquals($options['id'], $instance->getId()); } /** * @dataProvider validDataProvider */ public function testGetPaymentId(array $options): void { $instance = $this->getTestInstance($options); self::assertEquals($options['payment_id'], $instance->getPaymentId()); } /** * @dataProvider validDataProvider */ public function testGetStatus(array $options): void { $instance = $this->getTestInstance($options); self::assertEquals($options['status'], $instance->getStatus()); } /** * @dataProvider validDataProvider */ public function testGetCreatedAt(array $options): void { $instance = $this->getTestInstance($options); self::assertInstanceOf(DateTime::class, $instance->getCreatedAt()); self::assertEquals($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); } /** * @dataProvider validDataProvider */ public function testGetAmount(array $options): void { $instance = $this->getTestInstance($options); self::assertInstanceOf(AmountInterface::class, $instance->getAmount()); self::assertEquals($options['amount']['value'], $instance->getAmount()->getValue()); self::assertEquals($options['amount']['currency'], $instance->getAmount()->getCurrency()); } /** * @dataProvider validDataProvider */ public function testGetReceiptRegistered(array $options): void { $instance = $this->getTestInstance($options); if (empty($options['receipt_registration'])) { self::assertNull($instance->getReceiptRegistration()); } else { self::assertEquals($options['receipt_registration'], $instance->getReceiptRegistration()); } } /** * @dataProvider validDataProvider */ public function testGetDescription(array $options): void { $instance = $this->getTestInstance($options); if (empty($options['description'])) { self::assertNull($instance->getDescription()); } else { self::assertEquals($options['description'], $instance->getDescription()); } } /** * @dataProvider validDataProvider */ public function testGetSources(array $options): void { $instance = $this->getTestInstance($options); if (empty($options['sources'])) { self::assertEmpty($instance->getSources()); } else { foreach ($instance->getSources() as $sources) { self::assertInstanceOf(Source::class, $sources); } } } /** * @dataProvider validDataProvider */ public function testGetDeal(array $options): void { $instance = $this->getTestInstance($options); self::assertInstanceOf(RefundDealInfo::class, $instance->getDeal()); self::assertEquals($options['deal']['id'], $instance->getDeal()->getId()); $settlements = $instance->getDeal()->getRefundSettlements(); if (!empty($settlements)) { self::assertEquals($options['deal']['refund_settlements'][0], $settlements[0]->toArray()); } } public static function validDataProvider() { $result = []; for ($i = 0; $i < 10; $i++) { $payment = [ 'id' => Random::str(36), 'payment_id' => Random::str(36), 'status' => Random::value(RefundStatus::getValidValues()), 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'authorized_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'amount' => [ 'value' => Random::int(100, 100000), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'receipt_registration' => Random::value(ReceiptRegistrationStatus::getValidValues()), 'description' => uniqid('', true), 'sources' => [ new Source([ 'account_id' => Random::str(36), 'amount' => new MonetaryAmount(Random::int(1, 1000), 'RUB'), 'platform_fee_amount' => new MonetaryAmount(Random::int(1, 1000), 'RUB'), ]), ], 'deal' => [ 'id' => 'dl-285e5ee7-0022-5000-8000-01516a44b147', 'refund_settlements' => [ [ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => 123.00, 'currency' => 'RUB', ], ], ], ], ]; $result[] = [$payment]; } return $result; } abstract protected function getTestInstance(array $options): AbstractRefundResponse; } yookassa-sdk-php/tests/Request/Refunds/RefundsRequestTest.php000064400000047654150364342670020523 0ustar00hasPaymentId()); self::assertNull($instance->getPaymentId()); self::assertNull($instance->paymentId); $instance->setPaymentId($options['payment_id']); if (empty($options['payment_id'])) { self::assertFalse($instance->hasPaymentId()); self::assertNull($instance->getPaymentId()); self::assertNull($instance->paymentId); } else { self::assertTrue($instance->hasPaymentId()); self::assertEquals($options['payment_id'], $instance->getPaymentId()); self::assertEquals($options['payment_id'], $instance->paymentId); } $instance->setPaymentId(''); self::assertFalse($instance->hasPaymentId()); self::assertNull($instance->getPaymentId()); self::assertNull($instance->paymentId); $instance->paymentId = $options['payment_id']; if (empty($options['payment_id'])) { self::assertFalse($instance->hasPaymentId()); self::assertNull($instance->getPaymentId()); self::assertNull($instance->paymentId); } else { self::assertTrue($instance->hasPaymentId()); self::assertEquals($options['payment_id'], $instance->getPaymentId()); self::assertEquals($options['payment_id'], $instance->paymentId); } } /** * @dataProvider invalidPaymentIdDataProvider * * @param mixed $value */ public function testSetInvalidPaymentId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new RefundsRequest(); $instance->setPaymentId($value); } /** * @dataProvider invalidPaymentIdDataProvider * * @param mixed $value */ public function testSetterInvalidPaymentId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new RefundsRequest(); $instance->paymentId = $value; } public function validStringDataProvider(): array { return [ [[]], [true], [false], [new stdClass()], ]; } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testCreateGte($options): void { $instance = new RefundsRequest(); self::assertFalse($instance->hasCreatedAtGte()); self::assertNull($instance->getCreatedAtGte()); self::assertNull($instance->createdAtGte); $instance->setCreatedAtGte($options['created_at_gte']); if (empty($options['created_at_gte'])) { self::assertFalse($instance->hasCreatedAtGte()); self::assertNull($instance->getCreatedAtGte()); self::assertNull($instance->createdAtGte); } else { self::assertTrue($instance->hasCreatedAtGte()); self::assertEquals($options['created_at_gte'], $instance->getCreatedAtGte()->format(YOOKASSA_DATE)); self::assertEquals($options['created_at_gte'], $instance->createdAtGte->format(YOOKASSA_DATE)); } $instance->setCreatedAtGte(''); self::assertFalse($instance->hasCreatedAtGte()); self::assertNull($instance->getCreatedAtGte()); self::assertNull($instance->createdAtGte); $instance->createdAtGte = $options['created_at_gte']; if (empty($options['created_at_gte'])) { self::assertFalse($instance->hasCreatedAtGte()); self::assertNull($instance->getCreatedAtGte()); self::assertNull($instance->createdAtGte); } else { self::assertTrue($instance->hasCreatedAtGte()); self::assertEquals($options['created_at_gte'], $instance->getCreatedAtGte()->format(YOOKASSA_DATE)); self::assertEquals($options['created_at_gte'], $instance->createdAtGte->format(YOOKASSA_DATE)); } } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetInvalidCreatedGte($value): void { $this->expectException(InvalidArgumentException::class); $instance = new RefundsRequest(); $instance->setCreatedAtGte($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetterInvalidCreatedGte($value): void { $this->expectException(InvalidArgumentException::class); $instance = new RefundsRequest(); $instance->createdAtGte = $value; } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testCreateGt($options): void { $instance = new RefundsRequest(); self::assertFalse($instance->hasCreatedAtGt()); self::assertNull($instance->getCreatedAtGt()); self::assertNull($instance->createdAtGt); $instance->setCreatedAtGt($options['created_at_gt']); if (empty($options['created_at_gt'])) { self::assertFalse($instance->hasCreatedAtGte()); self::assertNull($instance->getCreatedAtGte()); self::assertNull($instance->createdAtGte); } else { self::assertTrue($instance->hasCreatedAtGt()); self::assertEquals($options['created_at_gt'], $instance->getCreatedAtGt()->format(YOOKASSA_DATE)); self::assertEquals($options['created_at_gt'], $instance->createdAtGt->format(YOOKASSA_DATE)); } $instance->setCreatedAtGt(''); self::assertFalse($instance->hasCreatedAtGt()); self::assertNull($instance->getCreatedAtGt()); self::assertNull($instance->createdAtGt); $instance->createdAtGt = $options['created_at_gt']; if (empty($options['created_at_gt'])) { self::assertFalse($instance->hasCreatedAtGt()); self::assertNull($instance->getCreatedAtGt()); self::assertNull($instance->createdAtGt); } else { self::assertTrue($instance->hasCreatedAtGt()); self::assertEquals($options['created_at_gt'], $instance->getCreatedAtGt()->format(YOOKASSA_DATE)); self::assertEquals($options['created_at_gt'], $instance->createdAtGt->format(YOOKASSA_DATE)); } } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetInvalidCreatedGt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new RefundsRequest(); $instance->setCreatedAtGt($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetterInvalidCreatedGt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new RefundsRequest(); $instance->createdAtGt = $value; } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testCreateLte($options): void { $instance = new RefundsRequest(); self::assertFalse($instance->hasCreatedAtLte()); self::assertNull($instance->getCreatedAtLte()); self::assertNull($instance->createdAtLte); $instance->setCreatedAtLte($options['created_at_lte']); if (empty($options['created_at_lte'])) { self::assertFalse($instance->hasCreatedAtLte()); self::assertNull($instance->getCreatedAtLte()); self::assertNull($instance->createdAtLte); } else { self::assertTrue($instance->hasCreatedAtLte()); self::assertEquals($options['created_at_lte'], $instance->getCreatedAtLte()->format(YOOKASSA_DATE)); self::assertEquals($options['created_at_lte'], $instance->createdAtLte->format(YOOKASSA_DATE)); } $instance->setCreatedAtLte(''); self::assertFalse($instance->hasCreatedAtLte()); self::assertNull($instance->getCreatedAtLte()); self::assertNull($instance->createdAtLte); $instance->createdAtLte = $options['created_at_lte']; if (empty($options['created_at_lte'])) { self::assertFalse($instance->hasCreatedAtLte()); self::assertNull($instance->getCreatedAtLte()); self::assertNull($instance->createdAtLte); } else { self::assertTrue($instance->hasCreatedAtLte()); self::assertEquals($options['created_at_lte'], $instance->getCreatedAtLte()->format(YOOKASSA_DATE)); self::assertEquals($options['created_at_lte'], $instance->createdAtLte->format(YOOKASSA_DATE)); } } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetInvalidCreatedLte($value): void { $this->expectException(InvalidArgumentException::class); $instance = new RefundsRequest(); $instance->setCreatedAtLte($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetterInvalidCreatedLte($value): void { $this->expectException(InvalidArgumentException::class); $instance = new RefundsRequest(); $instance->createdAtLte = $value; } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testCreateLt($options): void { $instance = new RefundsRequest(); self::assertFalse($instance->hasCreatedAtLt()); self::assertNull($instance->getCreatedAtLt()); self::assertNull($instance->createdAtLt); $instance->setCreatedAtLt($options['created_at_lt']); if (empty($options['created_at_lt'])) { self::assertFalse($instance->hasCreatedAtLt()); self::assertNull($instance->getCreatedAtLt()); self::assertNull($instance->createdAtLt); } else { self::assertTrue($instance->hasCreatedAtLt()); self::assertEquals($options['created_at_lt'], $instance->getCreatedAtLt()->format(YOOKASSA_DATE)); self::assertEquals($options['created_at_lt'], $instance->createdAtLt->format(YOOKASSA_DATE)); } $instance->setCreatedAtLt(''); self::assertFalse($instance->hasCreatedAtLt()); self::assertNull($instance->getCreatedAtLt()); self::assertNull($instance->createdAtLt); $instance->createdAtLt = $options['created_at_lt']; if (empty($options['created_at_lt'])) { self::assertFalse($instance->hasCreatedAtLt()); self::assertNull($instance->getCreatedAtLt()); self::assertNull($instance->createdAtLt); } else { self::assertTrue($instance->hasCreatedAtLt()); self::assertEquals($options['created_at_lt'], $instance->getCreatedAtLt()->format(YOOKASSA_DATE)); self::assertEquals($options['created_at_lt'], $instance->createdAtLt->format(YOOKASSA_DATE)); } } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetInvalidCreatedLt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new RefundsRequest(); $instance->setCreatedAtLt($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetterInvalidCreatedLt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new RefundsRequest(); $instance->createdAtLt = $value; } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testStatus($options): void { $instance = new RefundsRequest(); self::assertFalse($instance->hasStatus()); self::assertNull($instance->getStatus()); self::assertNull($instance->status); $instance->setStatus($options['status']); if (empty($options['status'])) { self::assertFalse($instance->hasStatus()); self::assertNull($instance->getStatus()); self::assertNull($instance->status); } else { self::assertTrue($instance->hasStatus()); self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); } $instance->setStatus(''); self::assertFalse($instance->hasStatus()); self::assertNull($instance->getStatus()); self::assertNull($instance->status); $instance->status = $options['status']; if (empty($options['status'])) { self::assertFalse($instance->hasStatus()); self::assertNull($instance->getStatus()); self::assertNull($instance->status); } else { self::assertTrue($instance->hasStatus()); self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); } } /** * @dataProvider invalidStatusDataProvider * * @param mixed $value */ public function testSetInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new RefundsRequest(); $instance->setStatus($value); } /** * @dataProvider invalidStatusDataProvider * * @param mixed $value */ public function testSetterInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new RefundsRequest(); $instance->status = $value; self::assertEquals($value, $instance->status); } /** * @dataProvider validLimitDataProvider * * @param mixed $value */ public function testLimit($value): void { $instance = new RefundsRequest(); $instance->limit = $value; self::assertEquals($value, $instance->limit); } /** * @dataProvider invalidLimitDataProvider * * @param mixed $value */ public function testSetInvalidLimit($value): void { $this->expectException(InvalidArgumentException::class); $instance = new RefundsRequest(); $instance->setLimit($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testCursor($options): void { $instance = new RefundsRequest(); self::assertFalse($instance->hasCursor()); self::assertNull($instance->getCursor()); self::assertNull($instance->cursor); $instance->setCursor($options['cursor']); if (empty($options['cursor'])) { self::assertFalse($instance->hasCursor()); self::assertNull($instance->getCursor()); self::assertNull($instance->cursor); } else { self::assertTrue($instance->hasCursor()); self::assertEquals($options['cursor'], $instance->getCursor()); self::assertEquals($options['cursor'], $instance->cursor); } $instance->setCursor(''); self::assertFalse($instance->hasCursor()); self::assertNull($instance->getCursor()); self::assertNull($instance->cursor); $instance->cursor = $options['cursor']; if (empty($options['cursor'])) { self::assertFalse($instance->hasCursor()); self::assertNull($instance->getCursor()); self::assertNull($instance->cursor); } else { self::assertTrue($instance->hasCursor()); self::assertEquals($options['cursor'], $instance->getCursor()); self::assertEquals($options['cursor'], $instance->cursor); } } public function testValidate(): void { $instance = new RefundsRequest(); self::assertTrue($instance->validate()); } public function testBuilder(): void { $builder = RefundsRequest::builder(); self::assertInstanceOf(RefundsRequestBuilder::class, $builder); } public function validDataProvider() { $result = [ [ [ 'created_at_gte' => null, 'created_at_gt' => null, 'created_at_lte' => null, 'created_at_lt' => null, 'status' => null, 'payment_id' => null, 'limit' => null, 'cursor' => null, ], ], [ [ 'created_at_gte' => '', 'created_at_gt' => '', 'created_at_lte' => '', 'created_at_lt' => '', 'status' => '', 'payment_id' => '', 'limit' => '', 'cursor' => '', ], ], ]; $statuses = RefundStatus::getValidValues(); for ($i = 0; $i < 10; $i++) { $request = [ 'created_at_gte' => date(YOOKASSA_DATE, Random::int(1, time())), 'created_at_gt' => date(YOOKASSA_DATE, Random::int(1, time())), 'created_at_lte' => date(YOOKASSA_DATE, Random::int(1, time())), 'created_at_lt' => date(YOOKASSA_DATE, Random::int(1, time())), 'status' => $statuses[Random::int(0, count($statuses) - 1)], 'payment_id' => $this->randomString(36), 'limit' => Random::int(0, RefundsRequest::MAX_LIMIT_VALUE), 'cursor' => uniqid('', true), ]; $result[] = [$request]; } return $result; } public static function invalidStatusDataProvider() { return [ [true], [Random::str(1, 10)], [new StringObject(Random::str(1, 10))], ]; } public static function validLimitDataProvider() { return [ [null], [Random::int(1, RefundsRequest::MAX_LIMIT_VALUE)], ]; } public static function invalidLimitDataProvider() { return [ [[]], [new stdClass()], [-1], [RefundsRequest::MAX_LIMIT_VALUE + 1], ]; } public function invalidDataProvider() { return [ [[]], [new stdClass()], [Random::str(10)], [Random::bytes(10)], [-1], [RefundsRequest::MAX_LIMIT_VALUE + 1], ]; } public static function invalidPaymentIdDataProvider() { return [ [true], [Random::str(35)], [Random::str(37)], [new StringObject(Random::str(10))], ]; } public static function invalidDateDataProvider() { return [ [true], [false], [[]], [new stdClass()], [Random::str(35)], [Random::str(37)], [new StringObject(Random::str(10))], [-123], ]; } private function randomString($length, $any = true) { static $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-+_.'; $result = ''; for ($i = 0; $i < $length; $i++) { if ($any) { $char = chr(Random::int(32, 126)); } else { $rnd = Random::int(0, strlen($chars) - 1); $char = $chars[$rnd]; } $result .= $char; } return $result; } } yookassa-sdk-php/tests/Request/Refunds/RefundResponseTest.php000064400000000465150364342670020473 0ustar00getItems()); foreach ($instance->getItems() as $index => $item) { self::assertInstanceOf(RefundInterface::class, $item); self::assertArrayHasKey($index, $options['items']); self::assertEquals($options['items'][$index]['id'], $item->getId()); self::assertEquals($options['items'][$index]['payment_id'], $item->getPaymentId()); self::assertEquals($options['items'][$index]['status'], $item->getStatus()); self::assertEquals($options['items'][$index]['amount']['value'], $item->getAmount()->getValue()); self::assertEquals($options['items'][$index]['amount']['currency'], $item->getAmount()->getCurrency()); self::assertEquals($options['items'][$index]['created_at'], $item->getCreatedAt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider */ public function testGetNextCursor(array $options): void { $instance = new RefundsResponse($options); if (empty($options['next_cursor'])) { self::assertNull($instance->getNextCursor()); } else { self::assertEquals($options['next_cursor'], $instance->getNextCursor()); } } /** * @dataProvider validDataProvider */ public function testHasNextCursor(array $options): void { $instance = new RefundsResponse($options); if (empty($options['next_cursor'])) { self::assertFalse($instance->hasNextCursor()); } else { self::assertTrue($instance->hasNextCursor()); } } public static function validDataProvider() { return [ [ [ 'type' => 'list', 'items' => [], ], ], [ [ 'type' => 'list', 'items' => [ [ 'id' => Random::str(36), 'payment_id' => Random::str(36), 'status' => RefundStatus::SUCCEEDED, 'amount' => [ 'value' => Random::int(1, 100), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(0, time())), ], ], 'next_cursor' => Random::str(1, 64), ], ], [ [ 'type' => 'list', 'items' => [ [ 'id' => Random::str(36), 'payment_id' => Random::str(36), 'status' => RefundStatus::SUCCEEDED, 'amount' => [ 'value' => Random::int(1, 100), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE), ], [ 'id' => Random::str(36), 'payment_id' => Random::str(36), 'status' => RefundStatus::SUCCEEDED, 'amount' => [ 'value' => Random::int(1, 100), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(0, time())), 'authorized_at' => date(YOOKASSA_DATE, Random::int(0, time())), 'receipt_registered' => Random::value(ReceiptRegistrationStatus::getValidValues()), 'description' => Random::str(64, 250), ], ], 'next_cursor' => Random::str(1, 64), ], ], ]; } } yookassa-sdk-php/tests/Request/Refunds/CreateRefundRequestTest.php000064400000033132150364342670021446 0ustar00setPaymentId($options['paymentId']); self::assertEquals($options['paymentId'], $instance->getPaymentId()); self::assertEquals($options['paymentId'], $instance->paymentId); $instance = new CreateRefundRequest(); $instance->paymentId = $options['paymentId']; self::assertEquals($options['paymentId'], $instance->getPaymentId()); self::assertEquals($options['paymentId'], $instance->paymentId); } /** * @dataProvider invalidPaymentIdDataProvider * * @param mixed $value */ public function testSetInvalidPaymentId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreateRefundRequest(); $instance->setPaymentId($value); } /** * @dataProvider invalidPaymentIdDataProvider * * @param mixed $value */ public function testSetterInvalidPaymentId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreateRefundRequest(); $instance->paymentId = $value; } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testAmount($options): void { $instance = new CreateRefundRequest(); $instance->setAmount($options['amount']); self::assertEquals($options['amount']->getValue(), $instance->getAmount()->getValue()); self::assertEquals($options['amount']->getValue(), $instance->amount->getValue()); self::assertEquals($options['amount']->getCurrency(), $instance->getAmount()->getCurrency()); self::assertEquals($options['amount']->getCurrency(), $instance->amount->getCurrency()); $instance = new CreateRefundRequest(); $instance->amount = $options['amount']; self::assertEquals($options['amount']->getValue(), $instance->getAmount()->getValue()); self::assertEquals($options['amount']->getValue(), $instance->amount->getValue()); self::assertEquals($options['amount']->getCurrency(), $instance->getAmount()->getCurrency()); self::assertEquals($options['amount']->getCurrency(), $instance->amount->getCurrency()); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testDescription($options): void { $instance = new CreateRefundRequest(); self::assertFalse($instance->hasDescription()); self::assertNull($instance->getDescription()); self::assertNull($instance->description); $instance->setDescription($options['description']); if (empty($options['description'])) { self::assertFalse($instance->hasDescription()); self::assertNull($instance->getDescription()); self::assertNull($instance->description); } else { self::assertTrue($instance->hasDescription()); self::assertEquals($options['description'], $instance->getDescription()); self::assertEquals($options['description'], $instance->description); } $instance->setDescription(''); self::assertFalse($instance->hasDescription()); self::assertNull($instance->getDescription()); self::assertNull($instance->description); $instance->description = $options['description']; if (empty($options['description'])) { self::assertFalse($instance->hasDescription()); self::assertNull($instance->getDescription()); self::assertNull($instance->description); } else { self::assertTrue($instance->hasDescription()); self::assertEquals($options['description'], $instance->getDescription()); self::assertEquals($options['description'], $instance->description); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testDeal($options): void { $instance = new CreateRefundRequest(); self::assertFalse($instance->hasDeal()); self::assertNull($instance->getDeal()); self::assertNull($instance->deal); $instance->setDeal($options['deal']); if (empty($options['deal'])) { self::assertFalse($instance->hasDeal()); self::assertNull($instance->getDeal()); self::assertNull($instance->deal); } else { self::assertTrue($instance->hasDeal()); if (is_array($options['deal'])) { self::assertEquals($options['deal'], $instance->getDeal()->toArray()); self::assertEquals($options['deal'], $instance->deal->toArray()); } else { self::assertEquals($options['deal']->toArray(), $instance->getDeal()->toArray()); self::assertEquals($options['deal']->toArray(), $instance->deal->toArray()); } } $instance->setDeal(null); self::assertFalse($instance->hasDeal()); self::assertNull($instance->getDeal()); self::assertNull($instance->deal); $instance->deal = $options['deal']; if (empty($options['deal'])) { self::assertFalse($instance->hasDeal()); self::assertNull($instance->getDeal()); self::assertNull($instance->deal); } else { self::assertTrue($instance->hasDeal()); if (is_array($options['deal'])) { self::assertEquals($options['deal'], $instance->getDeal()->toArray()); self::assertEquals($options['deal'], $instance->deal->toArray()); } else { self::assertEquals($options['deal']->toArray(), $instance->getDeal()->toArray()); self::assertEquals($options['deal']->toArray(), $instance->deal->toArray()); } } } /** * @dataProvider invalidDealDataProvider * * @param mixed $value */ public function testSetInvalidDeal($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreateRefundRequest(); $instance->setDeal($value); } /** * @dataProvider invalidDealDataProvider * * @param mixed $value */ public function testSetterInvalidDeal($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreateRefundRequest(); $instance->deal = $value; } public function testValidate(): void { $instance = new CreateRefundRequest(); self::assertFalse($instance->validate()); $instance->setAmount(new MonetaryAmount()); self::assertFalse($instance->validate()); $instance->setAmount(new MonetaryAmount(Random::int(1, 100000))); self::assertFalse($instance->validate()); $instance->setDeal([ 'refund_settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => round(Random::float(1.00, 100.00), 2), 'currency' => 'RUB', ], ], ], ]); self::assertFalse($instance->validate()); $instance->setPaymentId(Random::str(36)); self::assertTrue($instance->validate()); $receipt = new Receipt(); $receipt->setItems([ [ 'description' => Random::str(10), 'quantity' => (float) Random::int(1, 10), 'amount' => [ 'value' => round(Random::float(1, 100), 2), 'currency' => CurrencyCode::RUB, ], 'vat_code' => Random::int(1, 6), 'payment_subject' => PaymentSubject::COMMODITY, 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, ], ]); $instance->setReceipt($receipt); $item = new ReceiptItem(); $item->setPrice(new ReceiptItemAmount(10)); $item->setDescription('test'); $receipt->addItem($item); self::assertFalse($instance->validate()); $receipt->getCustomer()->setPhone('123123'); self::assertTrue($instance->validate()); $item->setVatCode(3); self::assertTrue($instance->validate()); $receipt->setTaxSystemCode(4); self::assertTrue($instance->validate()); self::assertTrue($instance->hasReceipt()); $instance->removeReceipt(); self::assertFalse($instance->hasReceipt()); } /** * @dataProvider invalidReceiptDataProvider * * @param mixed $value */ public function testSetInvalidReceipt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreateRefundRequest(); $instance->setReceipt($value); } /** * @dataProvider invalidReceiptDataProvider * * @param mixed $value */ public function testSetterInvalidReceipt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreateRefundRequest(); $instance->receipt = $value; } public function testBuilder(): void { $builder = CreateRefundRequest::builder(); self::assertInstanceOf(CreateRefundRequestBuilder::class, $builder); } /** * @dataProvider invalidSourceDataProvider * * @param mixed $value */ public function testInvalidSetSources($value): void { $this->expectException(ValidatorParameterException::class); $instance = new CreateRefundRequest(); $instance->setSources($value); } public static function validDataProvider(): array { $result = [ [ [ 'paymentId' => Random::str(36), 'amount' => new MonetaryAmount(Random::int(1, 100)), 'description' => null, 'deal' => null, ], ], [ [ 'paymentId' => Random::str(36), 'amount' => new MonetaryAmount(Random::int(1, 100)), 'description' => '', 'deal' => '', ], ], [ [ 'paymentId' => Random::str(36), 'amount' => new MonetaryAmount(Random::int(1, 100)), 'description' => '', 'deal' => new RefundDealData([ 'refund_settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => round(Random::float(1.00, 100.00), 2), 'currency' => 'RUB', ], ], ], ]), ], ], ]; for ($i = 0; $i < 10; $i++) { $request = [ 'paymentId' => Random::str(36), 'amount' => new MonetaryAmount(Random::int(1, 100)), 'description' => uniqid('', true), 'deal' => [ 'refund_settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => round(Random::float(1.00, 100.00), 2), 'currency' => 'RUB', ], ], ], ], ]; $result[] = [$request]; } return $result; } public static function invalidReceiptDataProvider(): array { return [ [1], ['test'], [true], [false], [new stdClass()], ]; } public static function invalidPaymentIdDataProvider(): array { return [ [''], [null], [1], [Random::str(35)], [Random::str(37)], ]; } public static function invalidDescriptionDataProvider(): array { return [ [[]], [new stdClass()], ]; } public static function invalidSourceDataProvider(): array { return [ [Random::str(35)], ]; } public static function invalidDealDataProvider(): array { return [ [Random::str(35)], [new stdClass()], ]; } } yookassa-sdk-php/tests/Request/Refunds/RefundsRequestSerializerTest.php000064400000006455150364342670022547 0ustar00 'payment_id', 'createdAtGte' => 'created_at.gte', 'createdAtGt' => 'created_at.gt', 'createdAtLte' => 'created_at.lte', 'createdAtLt' => 'created_at.lt', 'status' => 'status', 'cursor' => 'cursor', 'limit' => 'limit', ]; /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSerialize($options): void { $serializer = new RefundsRequestSerializer(); $data = $serializer->serialize(RefundsRequest::builder()->build($options)); $expected = []; foreach ($this->fieldMap as $field => $mapped) { if (isset($options[$field])) { $value = $options[$field]; if (!empty($value)) { $expected[$mapped] = $value instanceof DateTime ? $value->format(YOOKASSA_DATE) : $value; } } } self::assertEquals($expected, $data); } public function validDataProvider() { $result = [ [ [ 'accountId' => uniqid('', true), ], ], [ [ 'paymentId' => '', 'createdAtGte' => '', 'createdAtGt' => '', 'createdAtLte' => '', 'createdAtLt' => '', 'status' => '', 'cursor' => '', 'limit' => 10, ], ], ]; $statuses = RefundStatus::getValidValues(); for ($i = 0; $i < 10; $i++) { $request = [ 'paymentId' => $this->randomString(36), 'createdAtGte' => (0 === $i ? null : (1 === $i ? '' : date(YOOKASSA_DATE, Random::int(1, time())))), 'createdAtGt' => (0 === $i ? null : (1 === $i ? '' : date(YOOKASSA_DATE, Random::int(1, time())))), 'createdAtLte' => (0 === $i ? null : (1 === $i ? '' : date(YOOKASSA_DATE, Random::int(1, time())))), 'createdAtLt' => (0 === $i ? null : (1 === $i ? '' : date(YOOKASSA_DATE, Random::int(1, time())))), 'status' => $statuses[Random::int(0, count($statuses) - 1)], 'cursor' => uniqid('', true), 'limit' => Random::int(1, RefundsRequest::MAX_LIMIT_VALUE), ]; $result[] = [$request]; } return $result; } private function randomString($length, $any = true) { static $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-+_.'; $result = ''; for ($i = 0; $i < $length; $i++) { if ($any) { $char = chr(Random::int(32, 126)); } else { $rnd = Random::int(0, strlen($chars) - 1); $char = $chars[$rnd]; } $result .= $char; } return $result; } } yookassa-sdk-php/tests/Request/Payments/CreateCaptureRequestSerializerTest.php000064400000027710150364342670024057 0ustar00serialize(CreateCaptureRequest::builder()->build($options)); $expected = []; if (isset($options['amount'])) { $expected = [ 'amount' => $options['amount'], ]; } if (!empty($options['receiptItems'])) { foreach ($options['receiptItems'] as $item) { $itemArray = [ 'description' => $item['description'], 'quantity' => $item['quantity'], 'amount' => $item['price'], 'vat_code' => $item['vatCode'], ]; if (!empty($item['payment_subject'])) { $itemArray['payment_subject'] = $item['payment_subject']; } if (!empty($item['payment_mode'])) { $itemArray['payment_mode'] = $item['payment_mode']; } if (!empty($item['product_code'])) { $itemArray['product_code'] = $item['product_code']; } if (!empty($item['country_of_origin_code'])) { $itemArray['country_of_origin_code'] = $item['country_of_origin_code']; } if (!empty($item['customs_declaration_number'])) { $itemArray['customs_declaration_number'] = $item['customs_declaration_number']; } if (!empty($item['excise'])) { $itemArray['excise'] = $item['excise']; } if (!empty($item['payment_subject_industry_details'])) { $itemArray['payment_subject_industry_details'] = $item['payment_subject_industry_details']; } $expected['receipt']['items'][] = $itemArray; } if (!empty($options['receiptEmail'])) { $expected['receipt']['customer']['email'] = $options['receiptEmail']; } if (!empty($options['receiptEmail'])) { $expected['receipt']['customer']['email'] = $options['receiptEmail']; } if (!empty($options['taxSystemCode'])) { $expected['receipt']['tax_system_code'] = $options['taxSystemCode']; } } elseif (!empty($options['receipt'])) { $expected['receipt'] = $options['receipt']; if (!empty($expected['receipt']['phone'])) { $expected['receipt']['customer']['phone'] = $expected['receipt']['phone']; unset($expected['receipt']['phone']); } if (!empty($expected['receipt']['email'])) { $expected['receipt']['customer']['email'] = $expected['receipt']['email']; unset($expected['receipt']['email']); } } if (isset($options['deal'])) { $expected['deal'] = $options['deal']; } if (!empty($options['transfers'])) { foreach ($options['transfers'] as $transfer) { $transferData['account_id'] = $transfer['account_id']; if (!empty($transfer['amount'])) { $transferData['amount'] = [ 'value' => $transfer['amount']['value'], 'currency' => $transfer['amount']['currency'] ?? CurrencyCode::RUB, ]; } if (!empty($transfer['platform_fee_amount'])) { $transferData['platform_fee_amount'] = [ 'value' => $transfer['platform_fee_amount']['value'], 'currency' => isset($transfer['platform_fee_amount']['currency']) ? $transfer['amount']['currency'] : CurrencyCode::RUB, ]; } if (!empty($transfer['description'])) { $transferData['description'] = $transfer['description']; } $expected['transfers'][] = $transferData; } } self::assertEquals($expected, $data); } public static function validDataProvider(): array { $result = [ [ [], ], [ [ 'receiptItems' => [ [ 'description' => Random::str(10), 'quantity' => round(Random::float(0.01, 10.00), 2), 'price' => [ 'value' => round(Random::float(10.00, 100.00), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'vatCode' => Random::int(1, 6), 'payment_mode' => Random::value(PaymentMode::getValidValues()), 'payment_subject' => Random::value(PaymentSubject::getValidValues()), 'product_code' => Random::str(96, 96, '0123456789ABCDEF '), 'country_of_origin_code' => 'RU', 'customs_declaration_number' => Random::str(32), 'excise' => Random::float(0.0, 99.99), 'payment_subject_industry_details' => [ [ 'federal_id' => '001', 'document_date' => date('Y-m-d', Random::int(100000000, 200000000)), 'document_number' => Random::str(1, IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH), 'value' => Random::str(1, IndustryDetails::VALUE_MAX_LENGTH), ] ] ], ], 'receiptEmail' => 'johndoe@yoomoney.ru', 'taxSystemCode' => Random::int(1, 6), 'transfers' => [ new TransferData([ 'account_id' => Random::str(36), 'amount' => new MonetaryAmount(Random::int(1, 1000), 'RUB'), 'platform_fee_amount' => new MonetaryAmount(Random::int(1, 1000), 'RUB'), 'description' => Random::str(1, TransferData::MAX_LENGTH_DESCRIPTION), ]), ], 'deal' => [ 'id' => Random::str(36, 50), 'settlements' => [ [ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => round(Random::float(10.00, 100.00), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ], ], ], ], [ [ 'receipt' => [ 'items' => [ [ 'description' => Random::str(10), 'quantity' => round(Random::float(0.01, 10.00), 2), 'amount' => [ 'value' => round(Random::float(10.00, 100.00), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'vat_code' => Random::int(1, 6), 'payment_subject_industry_details' => [ [ 'federal_id' => '001', 'document_date' => date('Y-m-d', Random::int(100000000, 200000000)), 'document_number' => Random::str(1, IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH), 'value' => Random::str(1, IndustryDetails::VALUE_MAX_LENGTH), ] ] ], [ 'description' => Random::str(10), 'amount' => [ 'value' => round(Random::float(10.00, 100.00), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'quantity' => round(Random::float(0.01, 10.00), 2), 'vat_code' => Random::int(1, 6), 'payment_subject_industry_details' => [ [ 'federal_id' => '001', 'document_date' => date('Y-m-d', Random::int(100000000, 200000000)), 'document_number' => Random::str(1, IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH), 'value' => Random::str(1, IndustryDetails::VALUE_MAX_LENGTH), ] ] ], ], 'settlements' => [ [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ] ], 'customer' => [ 'phone' => Random::str(12, '0123456789'), 'email' => 'johndoe@yoomoney.ru', 'full_name' => Random::str(1, 256), 'inn' => Random::str(12, 12, '1234567890'), ], 'tax_system_code' => Random::int(1, 6), ], 'deal' => [ 'id' => Random::str(36, 50), 'settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ] ], ], ], ], ]; for ($i = 0; $i < 10; $i++) { $request = [ 'amount' => [ 'value' => (float) Random::int(1, 1000000), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ]; $result[] = [$request]; } return $result; } } yookassa-sdk-php/tests/Request/Payments/AbstractTestPaymentResponse.php000064400000113117150364342670022542 0ustar00setId($options['id']); self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); $instance = new Payment(); $instance->id = $options['id']; self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setId($value['id']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->id = $value['id']; } /** * @dataProvider validDataProvider */ public function testGetSetStatus(array $options): void { $instance = new Payment(); $instance->setStatus($options['status']); self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); $instance = new Payment(); $instance->status = $options['status']; self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setStatus($value['status']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->status = $value['status']; } /** * @dataProvider validDataProvider */ public function testGetSetRecipient(array $options): void { $instance = new Payment(); $instance->setRecipient($options['recipient']); self::assertSame($options['recipient'], $instance->getRecipient()); self::assertSame($options['recipient'], $instance->recipient); $instance = new Payment(); $instance->recipient = $options['recipient']; self::assertSame($options['recipient'], $instance->getRecipient()); self::assertSame($options['recipient'], $instance->recipient); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidRecipient($value): void { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new Payment(); $instance->setRecipient($value['recipient']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidRecipient($value): void { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new Payment(); $instance->setRecipient($value['recipient']); } /** * @dataProvider validDataProvider */ public function testGetSetAmount(array $options): void { $instance = new Payment(); $instance->setAmount($options['amount']); self::assertSame($options['amount'], $instance->getAmount()); self::assertSame($options['amount'], $instance->amount); $instance = new Payment(); $instance->amount = $options['amount']; self::assertSame($options['amount'], $instance->getAmount()); self::assertSame($options['amount'], $instance->amount); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setAmount($value['amount']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->amount = $value['amount']; } /** * @dataProvider validDataProvider */ public function testGetSetPaymentMethod(array $options): void { $instance = new Payment(); $instance->setPaymentMethod($options['payment_method']); self::assertSame($options['payment_method'], $instance->getPaymentMethod()); self::assertSame($options['payment_method'], $instance->paymentMethod); self::assertSame($options['payment_method'], $instance->payment_method); $instance = new Payment(); $instance->paymentMethod = $options['payment_method']; self::assertSame($options['payment_method'], $instance->getPaymentMethod()); self::assertSame($options['payment_method'], $instance->paymentMethod); self::assertSame($options['payment_method'], $instance->payment_method); $instance = new Payment(); $instance->payment_method = $options['payment_method']; self::assertSame($options['payment_method'], $instance->getPaymentMethod()); self::assertSame($options['payment_method'], $instance->paymentMethod); self::assertSame($options['payment_method'], $instance->payment_method); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidPaymentMethod($value): void { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new Payment(); $instance->setPaymentMethod($value['payment_method']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidPaymentMethod($value): void { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new Payment(); $instance->paymentMethod = $value['payment_method']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakePaymentMethod($value): void { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new Payment(); $instance->payment_method = $value['payment_method']; } /** * @dataProvider validDataProvider */ public function testGetSetCreatedAt(array $options): void { $instance = new Payment(); $instance->setCreatedAt($options['created_at']); self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); $instance = new Payment(); $instance->createdAt = $options['created_at']; self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); $instance = new Payment(); $instance->created_at = $options['created_at']; self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setCreatedAt($value['created_at']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->createdAt = $value['created_at']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->created_at = $value['created_at']; } /** * @dataProvider validDataProvider */ public function testGetSetCapturedAt(array $options): void { $instance = new Payment(); $instance->setCapturedAt($options['captured_at']); if (null === $options['captured_at'] || '' === $options['captured_at']) { self::assertNull($instance->getCapturedAt()); self::assertNull($instance->capturedAt); self::assertNull($instance->captured_at); } else { self::assertSame($options['captured_at'], $instance->getCapturedAt()->format(YOOKASSA_DATE)); self::assertSame($options['captured_at'], $instance->capturedAt->format(YOOKASSA_DATE)); self::assertSame($options['captured_at'], $instance->captured_at->format(YOOKASSA_DATE)); } $instance = new Payment(); $instance->capturedAt = $options['captured_at']; if (null === $options['captured_at'] || '' === $options['captured_at']) { self::assertNull($instance->getCapturedAt()); self::assertNull($instance->capturedAt); self::assertNull($instance->captured_at); } else { self::assertSame($options['captured_at'], $instance->getCapturedAt()->format(YOOKASSA_DATE)); self::assertSame($options['captured_at'], $instance->capturedAt->format(YOOKASSA_DATE)); self::assertSame($options['captured_at'], $instance->captured_at->format(YOOKASSA_DATE)); } $instance = new Payment(); $instance->captured_at = $options['captured_at']; if (null === $options['captured_at'] || '' === $options['captured_at']) { self::assertNull($instance->getCapturedAt()); self::assertNull($instance->capturedAt); self::assertNull($instance->captured_at); } else { self::assertSame($options['captured_at'], $instance->getCapturedAt()->format(YOOKASSA_DATE)); self::assertSame($options['captured_at'], $instance->capturedAt->format(YOOKASSA_DATE)); self::assertSame($options['captured_at'], $instance->captured_at->format(YOOKASSA_DATE)); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidCapturedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setCapturedAt($value['captured_at']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidCapturedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->capturedAt = $value['captured_at']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeCapturedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->captured_at = $value['captured_at']; } /** * @dataProvider validDataProvider */ public function testGetSetConfirmation(array $options): void { $instance = new Payment(); $instance->setConfirmation($options['confirmation']); self::assertSame($options['confirmation'], $instance->getConfirmation()); self::assertSame($options['confirmation'], $instance->confirmation); $instance = new Payment(); $instance->confirmation = $options['confirmation']; self::assertSame($options['confirmation'], $instance->getConfirmation()); self::assertSame($options['confirmation'], $instance->confirmation); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidConfirmation($value): void { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new Payment(); $instance->confirmation = $value['confirmation']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidConfirmation($value): void { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new Payment(); $instance->confirmation = $value['confirmation']; } /** * @dataProvider validDataProvider */ public function testGetSetRefundedAmount(array $options): void { $instance = new Payment(); $instance->setRefundedAmount($options['refunded_amount']); self::assertSame($options['refunded_amount'], $instance->getRefundedAmount()); self::assertSame($options['refunded_amount'], $instance->refundedAmount); self::assertSame($options['refunded_amount'], $instance->refunded_amount); $instance = new Payment(); $instance->refundedAmount = $options['refunded_amount']; self::assertSame($options['refunded_amount'], $instance->getRefundedAmount()); self::assertSame($options['refunded_amount'], $instance->refundedAmount); self::assertSame($options['refunded_amount'], $instance->refunded_amount); $instance = new Payment(); $instance->refunded_amount = $options['refunded_amount']; self::assertSame($options['refunded_amount'], $instance->getRefundedAmount()); self::assertSame($options['refunded_amount'], $instance->refundedAmount); self::assertSame($options['refunded_amount'], $instance->refunded_amount); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidRefundedAmount($value): void { $this->expectException(ValidatorParameterException::class); $instance = new Payment(); $instance->refundedAmount = $value['refunded_amount']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidRefundedAmount($value): void { $this->expectException(ValidatorParameterException::class); $instance = new Payment(); $instance->refundedAmount = $value['refunded_amount']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeRefundedAmount($value): void { $this->expectException(ValidatorParameterException::class); $instance = new Payment(); $instance->refundedAmount = $value['refunded_amount']; } /** * @dataProvider validDataProvider */ public function testGetSetPaid(array $options): void { $instance = new Payment(); $instance->setPaid($options['paid']); self::assertSame($options['paid'], $instance->getPaid()); self::assertSame($options['paid'], $instance->paid); $instance = new Payment(); $instance->paid = $options['paid']; self::assertSame($options['paid'], $instance->getPaid()); self::assertSame($options['paid'], $instance->paid); } /** * @dataProvider validDataProvider */ public function testGetSetTest(array $options): void { $instance = new Payment(); $instance->setTest($options['test']); self::assertSame($options['test'], $instance->getTest()); self::assertSame($options['test'], $instance->test); $instance = new Payment(); $instance->test = $options['test']; self::assertSame($options['test'], $instance->getTest()); self::assertSame($options['test'], $instance->test); } /** * @dataProvider validDataProvider */ public function testGetSetRefundable(array $options): void { $instance = new Payment(); $instance->setRefundable($options['refundable']); self::assertSame($options['refundable'], $instance->getRefundable()); self::assertSame($options['refundable'], $instance->refundable); $instance = new Payment(); $instance->refundable = $options['refundable']; self::assertSame($options['refundable'], $instance->getRefundable()); self::assertSame($options['refundable'], $instance->refundable); } /** * @dataProvider validDataProvider */ public function testGetSetReceiptRegistration(array $options): void { $instance = new Payment(); $instance->setReceiptRegistration($options['receipt_registration']); if (null === $options['receipt_registration'] || '' === $options['receipt_registration']) { self::assertNull($instance->getReceiptRegistration()); self::assertNull($instance->receiptRegistration); self::assertNull($instance->receipt_registration); } else { self::assertSame($options['receipt_registration'], $instance->getReceiptRegistration()); self::assertSame($options['receipt_registration'], $instance->receiptRegistration); self::assertSame($options['receipt_registration'], $instance->receipt_registration); } $instance = new Payment(); $instance->receiptRegistration = $options['receipt_registration']; if (null === $options['receipt_registration'] || '' === $options['receipt_registration']) { self::assertNull($instance->getReceiptRegistration()); self::assertNull($instance->receiptRegistration); self::assertNull($instance->receipt_registration); } else { self::assertSame($options['receipt_registration'], $instance->getReceiptRegistration()); self::assertSame($options['receipt_registration'], $instance->receiptRegistration); self::assertSame($options['receipt_registration'], $instance->receipt_registration); } $instance = new Payment(); $instance->receipt_registration = $options['receipt_registration']; if (null === $options['receipt_registration'] || '' === $options['receipt_registration']) { self::assertNull($instance->getReceiptRegistration()); self::assertNull($instance->receiptRegistration); self::assertNull($instance->receipt_registration); } else { self::assertSame($options['receipt_registration'], $instance->getReceiptRegistration()); self::assertSame($options['receipt_registration'], $instance->receiptRegistration); self::assertSame($options['receipt_registration'], $instance->receipt_registration); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidReceiptRegistration($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setReceiptRegistration($value['receipt_registration']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidReceiptRegistration($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->receiptRegistration = $value['receipt_registration']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeReceiptRegistration($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->receipt_registration = $value['receipt_registration']; } /** * @dataProvider validDataProvider */ public function testGetSetMetadata(array $options): void { $instance = new Payment(); $instance->setMetadata($options['metadata']); self::assertSame($options['metadata'], $instance->getMetadata()); self::assertSame($options['metadata'], $instance->metadata); $instance = new Payment(); $instance->metadata = $options['metadata']; self::assertSame($options['metadata'], $instance->getMetadata()); self::assertSame($options['metadata'], $instance->metadata); } /** * @dataProvider validDataProvider */ public function testGetSetTransfers(array $options): void { $instance = new Payment(); self::assertEmpty($instance->getTransfers()); self::assertEmpty($instance->transfers); $instance->setTransfers($options['transfers']); self::assertSame($options['transfers'], $instance->getTransfers()->getItems()->toArray()); self::assertSame($options['transfers'], $instance->transfers->getItems()->toArray()); $instance = new Payment(); $instance->transfers = $options['transfers']; self::assertSame($options['transfers'], $instance->getTransfers()->getItems()->toArray()); self::assertSame($options['transfers'], $instance->transfers->getItems()->toArray()); } /** * @dataProvider invalidDataProvider */ public function testInvalidTransfers(array $options): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setTransfers($options['transfers']); } /** * @dataProvider validDataProvider */ public function testGetSetIncomeAmount(array $options): void { $instance = new Payment(['recipient' => $options['recipient']]); $instance->setIncomeAmount($options['amount']); self::assertEquals($options['amount'], $instance->getIncomeAmount()); } public static function validDataProvider(): array { $result = []; $cancellationDetailsParties = CancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); $cancellationDetailsReasons = CancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); for ($i = 0; $i < 20; $i++) { $payment = [ 'id' => Random::str(36), 'status' => Random::value(PaymentStatus::getValidValues()), 'recipient' => new Recipient([ 'account_id' => Random::str(3, 15), ]), 'amount' => new MonetaryAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::RUB]), 'description' => match ($i) { 0 => null, 1 => '', 2 => Random::str(Payment::MAX_LENGTH_DESCRIPTION), default => Random::str(2, Payment::MAX_LENGTH_DESCRIPTION) }, 'payment_method' => new PaymentMethodQiwi(), 'reference_id' => match ($i) { 0 => null, 1 => '', default => Random::str(10, 20, 'abcdef0123456789-') }, 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'captured_at' => (0 === $i ? null : date(YOOKASSA_DATE, Random::int(1, time()))), 'expires_at' => (0 === $i ? null : date(YOOKASSA_DATE, Random::int(1, time()))), 'confirmation' => new ConfirmationRedirect([ 'confirmation_url' => 'https://confirmation.url' ]), 'charge' => new MonetaryAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::EUR]), 'income' => new MonetaryAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::EUR]), 'refunded_amount' => new ReceiptItemAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::EUR]), 'paid' => Random::bool(), 'test' => Random::bool(), 'refundable' => Random::bool(), 'receipt_registration' => 0 === $i ? null : Random::value(ReceiptRegistrationStatus::getValidValues()), 'metadata' => new Metadata(), 'cancellation_details' => new CancellationDetails([ 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons], ]), 'authorization_details' => (0 === $i ? null : new AuthorizationDetails([ 'rrn' => Random::str(10), 'auth_code' => Random::str(10), 'three_d_secure' => ['applied' => Random::bool()], ])), 'deal' => (0 === $i ? null : new PaymentDealInfo([ 'id' => Random::str(36, 50), 'settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => round(Random::float(1.00, 100.00), 2), 'currency' => 'RUB', ], ], ], ])), 'transfers' => [ new Transfer([ 'account_id' => Random::str(36), 'amount' => new MonetaryAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::EUR]), 'platform_fee_amount' => new MonetaryAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::EUR]), 'description' => Random::str(1, Transfer::MAX_LENGTH_DESCRIPTION), ]), ], 'merchant_customer_id' => (0 === $i ? null : Random::str(1, Payment::MAX_LENGTH_MERCHANT_CUSTOMER_ID)) ]; $result[] = [$payment]; } return $result; } public static function invalidDataProvider(): array { $result = [ [ [ 'id' => '', 'status' => '', 'recipient' => new stdClass(), 'amount' => ['value' => -1.0, 'currency' => 123], 'payment_method' => 123, 'reference_id' => [], 'confirmation' => new stdClass(), 'charge' => '', 'income' => '', 'refunded_amount' => false, 'paid' => '', 'refundable' => '', 'created_at' => -Random::int(), 'captured_at' => '23423-234-234', 'receipt_registration' => Random::str(5), 'transfers' => Random::str(5), 'test' => '', ], ], ]; for ($i = 0; $i < 10; $i++) { $payment = [ 'id' => Random::str($i < 5 ? Random::int(1, 35) : Random::int(37, 64)), 'status' => Random::str(1, 35), 'recipient' => new stdClass(), 'amount' => 'test', 'payment_method' => 'test', 'reference_id' => Random::str(66, 128), 'confirmation' => new DateTime(), 'charge' => 'test', 'income' => 'test', 'refunded_amount' => 'test', 'paid' => 0 === $i ? [] : new stdClass(), 'refundable' => 0 === $i ? [] : new stdClass(), 'created_at' => 0 === $i ? '23423-234-32' : -Random::int(), 'captured_at' => -Random::int(), 'receipt_registration' => 0 === $i ? true : Random::str(5), 'transfers' => Random::str(5), 'test' => [], ]; $result[] = [$payment]; } return $result; } /** * @dataProvider validDataProvider */ public function testGetSetExpiresAt(array $options): void { $instance = new Payment(); $instance->setExpiresAt($options['expires_at']); if (null === $options['expires_at'] || '' === $options['expires_at']) { self::assertNull($instance->getExpiresAt()); self::assertNull($instance->expiresAt); self::assertNull($instance->expires_at); } else { self::assertSame($options['expires_at'], $instance->getExpiresAt()->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expiresAt->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expires_at->format(YOOKASSA_DATE)); } $instance = new Payment(); $instance->expiresAt = $options['expires_at']; if (null === $options['expires_at'] || '' === $options['expires_at']) { self::assertNull($instance->getExpiresAt()); self::assertNull($instance->expiresAt); self::assertNull($instance->expires_at); } else { self::assertSame($options['expires_at'], $instance->getExpiresAt()->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expiresAt->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expires_at->format(YOOKASSA_DATE)); } $instance = new Payment(); $instance->expires_at = $options['expires_at']; if (null === $options['expires_at'] || '' === $options['expires_at']) { self::assertNull($instance->getExpiresAt()); self::assertNull($instance->expiresAt); self::assertNull($instance->expires_at); } else { self::assertSame($options['expires_at'], $instance->getExpiresAt()->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expiresAt->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expires_at->format(YOOKASSA_DATE)); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidExpiresAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setExpiresAt($value['captured_at']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidExpiresAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->expiresAt = $value['captured_at']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeExpiresAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->expires_at = $value['captured_at']; } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetDescription($options): void { $instance = new Payment(); $instance->setDescription($options['description']); if (empty($options['description']) && ('0' !== $options['description'])) { self::assertEmpty($instance->getDescription()); } else { self::assertEquals($options['description'], $instance->getDescription()); } } public function testSetInvalidLengthDescription(): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $description = Random::str(Payment::MAX_LENGTH_DESCRIPTION + 1); $instance->setDescription($description); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetMerchantCustomerId($options): void { $instance = new Payment(); $instance->setMerchantCustomerId($options['merchant_customer_id']); if (empty($options['merchant_customer_id'])) { self::assertEmpty($instance->getMerchantCustomerId()); } else { self::assertEquals($options['merchant_customer_id'], $instance->getMerchantCustomerId()); } } public function testSetInvalidLengthMerchantCustomerId(): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $merchant_customer_id = Random::str(Payment::MAX_LENGTH_MERCHANT_CUSTOMER_ID + 1); $instance->setMerchantCustomerId($merchant_customer_id); } /** * @dataProvider validDataProvider */ public function testGetSetDeal(array $options): void { $instance = new Payment(); $instance->setDeal($options['deal']); self::assertSame($options['deal'], $instance->getDeal()); self::assertSame($options['deal'], $instance->deal); $instance = new Payment(); $instance->deal = $options['deal']; self::assertSame($options['deal'], $instance->getDeal()); self::assertSame($options['deal'], $instance->deal); } /** * @dataProvider validDataProvider */ public function testGetSetAuthorizationDetails(array $options): void { $instance = new Payment(); $instance->setAuthorizationDetails($options['authorization_details']); self::assertSame($options['authorization_details'], $instance->getAuthorizationDetails()); self::assertSame($options['authorization_details'], $instance->authorizationDetails); self::assertSame($options['authorization_details'], $instance->authorization_details); $instance = new Payment(); $instance->authorizationDetails = $options['authorization_details']; self::assertSame($options['authorization_details'], $instance->getAuthorizationDetails()); self::assertSame($options['authorization_details'], $instance->authorizationDetails); self::assertSame($options['authorization_details'], $instance->authorization_details); $instance = new Payment(); $instance->authorization_details = $options['authorization_details']; self::assertSame($options['authorization_details'], $instance->getAuthorizationDetails()); self::assertSame($options['authorization_details'], $instance->authorizationDetails); self::assertSame($options['authorization_details'], $instance->authorization_details); } /** * @dataProvider validDataProvider */ public function testGetSetCancellationDetails(array $options): void { $instance = new Payment(); $instance->setCancellationDetails($options['cancellation_details']); self::assertSame($options['cancellation_details'], $instance->getCancellationDetails()); self::assertSame($options['cancellation_details'], $instance->cancellationDetails); self::assertSame($options['cancellation_details'], $instance->cancellation_details); $instance = new Payment(); $instance->cancellationDetails = $options['cancellation_details']; self::assertSame($options['cancellation_details'], $instance->getCancellationDetails()); self::assertSame($options['cancellation_details'], $instance->cancellationDetails); self::assertSame($options['cancellation_details'], $instance->cancellation_details); $instance = new Payment(); $instance->cancellation_details = $options['cancellation_details']; self::assertSame($options['cancellation_details'], $instance->getCancellationDetails()); self::assertSame($options['cancellation_details'], $instance->cancellationDetails); self::assertSame($options['cancellation_details'], $instance->cancellation_details); } /** * @param mixed $options */ abstract protected function getTestInstance($options): PaymentInterface; } yookassa-sdk-php/tests/Request/Payments/PaymentsRequestBuilderTest.php000064400000024167150364342670022410 0ustar00build(); self::assertNull($instance->getCursor()); $builder->setCursor($options['cursor']); $instance = $builder->build(); if (empty($options['cursor'])) { self::assertNull($instance->getCursor()); } else { self::assertEquals($options['cursor'], $instance->getCursor()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetCreatedAtGte($options): void { $builder = new PaymentsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCreatedAtGte()); $builder->setCreatedAtGte($options['createdAtGte']); $instance = $builder->build(); if (empty($options['createdAtGte'])) { self::assertNull($instance->getCreatedAtGte()); } else { self::assertEquals($options['createdAtGte'], $instance->getCreatedAtGte()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetCreatedGt($options): void { $builder = new PaymentsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCreatedAtGt()); $builder->setCreatedAtGt($options['createdAtGt']); $instance = $builder->build(); if (empty($options['createdAtGt'])) { self::assertNull($instance->getCreatedAtGt()); } else { self::assertEquals($options['createdAtGt'], $instance->getCreatedAtGt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetCreatedLte($options): void { $builder = new PaymentsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCreatedAtLte()); $builder->setCreatedAtLte($options['createdAtLte']); $instance = $builder->build(); if (empty($options['createdAtLte'])) { self::assertNull($instance->getCreatedAtLte()); } else { self::assertEquals($options['createdAtLte'], $instance->getCreatedAtLte()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetCreatedLt($options): void { $builder = new PaymentsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCreatedAtLt()); $builder->setCreatedAtLt($options['createdAtLt']); $instance = $builder->build(); if (empty($options['createdAtLt'])) { self::assertNull($instance->getCreatedAtLt()); } else { self::assertEquals($options['createdAtLt'], $instance->getCreatedAtLt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetCapturedAtGte($options): void { $builder = new PaymentsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCapturedAtGte()); $builder->setCapturedAtGte($options['capturedAtGte']); $instance = $builder->build(); if (empty($options['capturedAtGte'])) { self::assertNull($instance->getCapturedAtGte()); } else { self::assertEquals($options['capturedAtGte'], $instance->getCapturedAtGte()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetCapturedGt($options): void { $builder = new PaymentsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCapturedAtGt()); $builder->setCapturedAtGt($options['capturedAtGt']); $instance = $builder->build(); if (empty($options['capturedAtGt'])) { self::assertNull($instance->getCapturedAtGt()); } else { self::assertEquals($options['capturedAtGt'], $instance->getCapturedAtGt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetCapturedLte($options): void { $builder = new PaymentsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCapturedAtLte()); $builder->setCapturedAtLte($options['capturedAtLte']); $instance = $builder->build(); if (empty($options['capturedAtLte'])) { self::assertNull($instance->getCapturedAtLte()); } else { self::assertEquals($options['capturedAtLte'], $instance->getCapturedAtLte()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetCapturedLt($options): void { $builder = new PaymentsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getCapturedAtLt()); $builder->setCapturedAtLt($options['capturedAtLt']); $instance = $builder->build(); if (empty($options['capturedAtLt'])) { self::assertNull($instance->getCapturedAtLt()); } else { self::assertEquals($options['capturedAtLt'], $instance->getCapturedAtLt()->format(YOOKASSA_DATE)); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetPaymentMethod($options): void { $builder = new PaymentsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getPaymentMethod()); $builder->setPaymentMethod($options['paymentMethod']); $instance = $builder->build(); if (empty($options['paymentMethod'])) { self::assertNull($instance->getPaymentMethod()); } else { self::assertEquals($options['paymentMethod'], $instance->getPaymentMethod()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetLimit($options): void { $builder = new PaymentsRequestBuilder(); $instance = $builder->build(); self::assertNull($instance->getLimit()); $builder->setLimit($options['limit']); $instance = $builder->build(); if (is_null($options['limit'])) { self::assertNull($instance->getLimit()); } else { self::assertEquals($options['limit'], $instance->getLimit()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetStatus($options): void { $builder = new PaymentsRequestBuilder(); $instance = $builder->build(); $builder->setStatus($options['status']); $instance = $builder->build(); if (empty($options['status'])) { self::assertNull($instance->getStatus()); } else { self::assertEquals($options['status'], $instance->getStatus()); } } /** * @throws Exception */ public function validDataProvider() { $result = [ [ [ 'createdAtGte' => null, 'createdAtGt' => null, 'createdAtLte' => null, 'createdAtLt' => null, 'capturedAtGte' => null, 'capturedAtGt' => null, 'capturedAtLte' => null, 'capturedAtLt' => null, 'paymentMethod' => null, 'status' => null, 'limit' => null, 'cursor' => null, ], ], [ [ 'createdAtGte' => '', 'createdAtGt' => '', 'createdAtLte' => '', 'createdAtLt' => '', 'capturedAtGte' => '', 'capturedAtGt' => '', 'capturedAtLte' => '', 'capturedAtLt' => '', 'paymentMethod' => '', 'status' => '', 'limit' => 1, 'cursor' => '', ], ], ]; $statuses = PaymentStatus::getValidValues(); $methods = PaymentMethodType::getValidValues(); for ($i = 0; $i < 10; $i++) { $request = [ 'createdAtGte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtGt' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLt' => date(YOOKASSA_DATE, Random::int(1, time())), 'capturedAtGte' => date(YOOKASSA_DATE, Random::int(1, time())), 'capturedAtGt' => date(YOOKASSA_DATE, Random::int(1, time())), 'capturedAtLte' => date(YOOKASSA_DATE, Random::int(1, time())), 'capturedAtLt' => date(YOOKASSA_DATE, Random::int(1, time())), 'paymentMethod' => Random::value($methods), 'status' => Random::value($statuses), 'limit' => Random::int(1, 100), 'cursor' => UUID::v4(), ]; $result[] = [$request]; } return $result; } } yookassa-sdk-php/tests/Request/Payments/CreateCaptureRequestBuilderTest.php000064400000051053150364342670023331 0ustar00setAmount($options['amount']); $instance = $builder->build(); if (empty($options['amount'])) { self::assertNull($instance->getAmount()); } else { self::assertNotNull($instance->getAmount()); self::assertEquals($options['amount']['value'], $instance->getAmount()->getValue()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetDeal($options): void { $builder = new CreateCaptureRequestBuilder(); $builder->setDeal($options['deal']); $instance = $builder->build(); if (empty($options['deal'])) { self::assertNull($instance->getDeal()); } else { self::assertNotNull($instance->getDeal()); self::assertEquals($options['deal'], $instance->getDeal()->toArray()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetAirline($options): void { $builder = new CreateCaptureRequestBuilder(); $builder->setAirline($options['airline']); $instance = $builder->build(); if (empty($options['airline'])) { self::assertNull($instance->getAirline()); } else { self::assertNotNull($instance->getAirline()); self::assertEquals($options['airline'], $instance->getAirline()->toArray()); } } /** * @dataProvider validAmountDataProvider */ public function testSetAmount(AmountInterface $amount): void { $builder = new CreateCaptureRequestBuilder(); $builder->setAmount($amount); $instance = $builder->build(); self::assertNotNull($instance->getAmount()); self::assertEquals($amount->getValue(), $instance->getAmount()->getValue()); self::assertEquals($amount->getCurrency(), $instance->getAmount()->getCurrency()); $builder->setAmount([ 'value' => $amount->getValue(), 'currency' => $amount->getCurrency(), ]); $instance = $builder->build(); self::assertNotNull($instance->getAmount()); self::assertEquals($amount->getValue(), $instance->getAmount()->getValue()); self::assertEquals($amount->getCurrency(), $instance->getAmount()->getCurrency()); } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreateCaptureRequestBuilder(); $builder->setAmount($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetAmountCurrency($options): void { $builder = new CreateCaptureRequestBuilder(); $builder->setCurrency($options['amount']['currency']); $instance = $builder->build($options); self::assertNotNull($instance->getAmount()); self::assertEquals($options['amount']['currency'], $instance->getAmount()->getCurrency()); } /** * @dataProvider invalidCurrencyDataProvider * * @param mixed $value */ public function testSetInvalidCurrency($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreateCaptureRequestBuilder(); $builder->setCurrency($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetReceiptItems($options): void { $builder = new CreateCaptureRequestBuilder(); $builder->setReceiptItems($options['receipt']['items']); $builder->setReceiptEmail($options['receipt']['customer']['email']); $builder->setReceiptPhone($options['receipt']['customer']['phone']); $instance = $builder->build(); if (empty($options['receipt']['items'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertSameSize($options['receipt']['items'], $instance->getReceipt()->getItems()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testAddReceiptItems($options): void { $builder = new CreateCaptureRequestBuilder(); foreach ($options['receipt']['items'] as $item) { if ($item instanceof ReceiptItem) { $builder->addReceiptItem( $item->getDescription(), $item->getPrice()->getValue(), $item->getQuantity(), $item->getVatCode() ); } else { $builder->addReceiptItem($item['description'], $item['amount']['value'], $item['quantity'], $item['vatCode']); } } $builder->setReceiptEmail($options['receipt']['customer']['email']); $builder->setReceiptPhone($options['receipt']['customer']['phone']); $instance = $builder->build(); if (empty($options['receipt']['items'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertSameSize($options['receipt']['items'], $instance->getReceipt()->getItems()); foreach ($instance->getReceipt()->getItems() as $item) { self::assertFalse($item->isShipping()); } } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testAddReceiptShipping($options): void { $builder = new CreateCaptureRequestBuilder(); foreach ($options['receipt']['items'] as $item) { if ($item instanceof ReceiptItem) { $builder->addReceiptShipping( $item->getDescription(), $item->getPrice()->getValue(), $item->getVatCode() ); } else { $builder->addReceiptShipping($item['description'], $item['amount']['value'], $item['vatCode']); } } $builder->setReceiptEmail($options['receipt']['customer']['email']); $builder->setReceiptPhone($options['receipt']['customer']['phone']); $instance = $builder->build(); if (empty($options['receipt']['items'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertSameSize($options['receipt']['items'], $instance->getReceipt()->getItems()); foreach ($instance->getReceipt()->getItems() as $item) { self::assertTrue($item->isShipping()); } } } /** * @dataProvider invalidItemsDataProvider */ public function testSetInvalidReceiptItems(array $items): void { $this->expectException(InvalidArgumentException::class); $builder = new CreateCaptureRequestBuilder(); $builder->setReceiptItems($items); } public static function invalidItemsDataProvider() { return [ [ [ [ 'price' => [1], 'quantity' => -1.4, 'vatCode' => 10, ], ], ], [ [ [ 'description' => 'test', 'quantity' => -1.4, 'vatCode' => 3, ], ], ], [ [ [ 'description' => 'test', 'quantity' => 1.4, 'vatCode' => -3, ], ], ], [ [ [ 'description' => 'test', 'price' => [123], 'quantity' => 1.4, 'vatCode' => 7, ], ], ], [ [ [ 'description' => 'test', 'price' => [123], 'quantity' => -1.4, ], ], ], ]; } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetReceiptEmail($options): void { $builder = new CreateCaptureRequestBuilder(); $builder->setReceiptItems($options['receipt']['items']); $builder->setReceiptEmail($options['receipt']['customer']['email']); $builder->setReceiptPhone($options['receipt']['customer']['phone']); $instance = $builder->build(); if (empty($options['receipt']['items'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals($options['receipt']['customer']['email'], $instance->getReceipt()->getCustomer()->getEmail()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetReceiptPhone($options): void { $builder = new CreateCaptureRequestBuilder(); $builder->setReceiptItems($options['receipt']['items']); $builder->setReceiptEmail($options['receipt']['customer']['email']); $builder->setReceiptPhone($options['receipt']['customer']['phone']); $instance = $builder->build(); if (empty($options['receipt']['items'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals($options['receipt']['customer']['phone'], $instance->getReceipt()->getCustomer()->getPhone()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetReceiptTaxSystemCode($options): void { $builder = new CreateCaptureRequestBuilder(); $builder->setReceiptItems($options['receipt']['items']); $builder->setReceiptEmail($options['receipt']['customer']['email']); $builder->setReceiptPhone($options['receipt']['customer']['phone']); $builder->setTaxSystemCode($options['receipt']['taxSystemCode']); $instance = $builder->build(); if (empty($options['receipt']['items'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals($options['receipt']['taxSystemCode'], $instance->getReceipt()->getTaxSystemCode()); } } /** * @dataProvider invalidVatIdDataProvider * * @param mixed $value */ public function testSetInvalidTaxSystemId($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreateCaptureRequestBuilder(); $builder->setTaxSystemCode($value); } public function testSetReceipt(): void { $receipt = [ 'tax_system_code' => Random::int(1, 6), 'customer' => [ 'email' => 'johndoe@yoomoney.ru', 'phone' => Random::str(4, 15, '0123456789'), ], 'items' => [ [ 'description' => 'test', 'quantity' => 123, 'amount' => [ 'value' => 321, 'currency' => 'USD', ], 'vat_code' => Random::int(1, 6), 'payment_subject' => PaymentSubject::COMMODITY, 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, ], ], ]; $builder = new CreateCaptureRequestBuilder(); $builder->setReceipt($receipt); $instance = $builder->build(); self::assertEquals($receipt['tax_system_code'], $instance->getReceipt()->getTaxSystemCode()); self::assertEquals($receipt['customer']['email'], $instance->getReceipt()->getCustomer()->getEmail()); self::assertEquals($receipt['customer']['phone'], $instance->getReceipt()->getCustomer()->getPhone()); self::assertCount(1, $instance->getReceipt()->getItems()); $receipt = $instance->getReceipt(); $builder = new CreateCaptureRequestBuilder(); $builder->setReceipt($instance->getReceipt()); $instance = $builder->build(); self::assertEquals($receipt['tax_system_code'], $instance->getReceipt()->getTaxSystemCode()); self::assertEquals($receipt['customer']['email'], $instance->getReceipt()->getCustomer()->getEmail()); self::assertEquals($receipt['customer']['phone'], $instance->getReceipt()->getCustomer()->getPhone()); self::assertCount(1, $instance->getReceipt()->getItems()); } /** * @dataProvider invalidReceiptDataProvider * * @param mixed $value */ public function testSetInvalidReceipt($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreateCaptureRequestBuilder(); $builder->setReceipt($value); } public static function invalidReceiptDataProvider() { return [ [null], [true], [false], [1], [1.1], ['test'], [new stdClass()], ]; } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testBuild($options): void { $builder = new CreateCaptureRequestBuilder(); $instance = $builder->build($options); if (!empty($options['amount'])) { self::assertNotNull($instance->getAmount()); self::assertEquals($options['amount']['value'], $instance->getAmount()->getValue()); self::assertEquals($options['amount']['currency'], $instance->getAmount()->getCurrency()); } else { self::assertNull($instance->getAmount()); } } public static function validDataProvider() { $receiptItem = new ReceiptItem(); $receiptItem->setPrice(new ReceiptItemAmount(1, CurrencyCode::USD)); $receiptItem->setQuantity(1); $receiptItem->setDescription('test'); $receiptItem->setVatCode(3); $result = [ [ [ 'amount' => [ 'value' => Random::int(1, 1000000), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'receipt' => [ 'items' => [ [ 'description' => 'test', 'quantity' => Random::int(1, 100), 'amount' => [ 'value' => Random::int(1, 1000000), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'vatCode' => Random::int(1, 6), ], $receiptItem, ], 'customer' => [ 'email' => 'johndoe@yoomoney.ru', 'phone' => null, ], 'taxSystemCode' => null, ], 'transfers' => null, 'deal' => null, 'airline' => null, 'merchant_customer_id' => null, ], ], ]; for ($i = 0; $i < 10; $i++) { $request = [ 'amount' => [ 'value' => Random::int(1, 1000000), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'receipt' => [ 'items' => [ $receiptItem, ], 'customer' => [ 'email' => null, 'phone' => Random::str(10, '0123456789'), ], 'taxSystemCode' => Random::int(1, 6), ], 'transfers' => [ new TransferData([ 'account_id' => Random::str(36), 'amount' => new MonetaryAmount(Random::int(1, 1000), 'RUB'), 'platform_fee_amount' => new MonetaryAmount(Random::int(1, 1000), 'RUB'), 'description' => Random::str(1, TransferData::MAX_LENGTH_DESCRIPTION), ]), ], 'deal' => [ 'id' => Random::str(36, 50), 'settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ] ], ], 'airline' => [ 'booking_reference' => 'IIIKRV', 'ticket_number' => '12342123413', 'passengers' => [ [ 'first_name' => 'SERGEI', 'last_name' => 'IVANOV', ], ], 'legs' => [ [ 'departure_airport' => 'LED', 'destination_airport' => 'AMS', 'departure_date' => '2018-06-20', ], ], ], 'merchant_customer_id' => Random::str(5, Payment::MAX_LENGTH_MERCHANT_CUSTOMER_ID), ]; $result[] = [$request]; } return $result; } public static function validAmountDataProvider() { return [ [new MonetaryAmount(Random::int(1, 1000000))], [new MonetaryAmount(Random::int(1, 1000000)), Random::value(CurrencyCode::getValidValues())], ]; } public static function invalidAmountDataProvider() { return [ [-1], [Random::str(10)], [new stdClass()], [true], [false], ]; } public static function invalidCurrencyDataProvider() { return [ [''], [-1], [Random::str(10)], [true], [false], ]; } public static function invalidVatIdDataProvider() { return [ [false], [0], [7], [Random::int(-100, -1)], [Random::int(7, 100)], ]; } public static function invalidDealDataProvider(): array { return [ [true], [false], [new stdClass()], [0], [7], [Random::int(-100, -1)], [Random::int(7, 100)], ]; } /** * @dataProvider invalidDealDataProvider * * @param mixed $value */ public function testSetInvalidDeal($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreateCaptureRequestBuilder(); $builder->setDeal($value); } } yookassa-sdk-php/tests/Request/Payments/CreateCaptureResponseTest.php000064400000000516150364342670022166 0ustar00getterAndSetterTest($value, 'cursor', null === $value ? '' : (string) $value); } /** * @dataProvider validPaymentMethodDataProvider * * @param mixed $value */ public function testPaymentMethod($value): void { $this->getterAndSetterTest($value, 'paymentMethod', $value); } /** * @dataProvider invalidPaymentMethodDataProvider * * @param mixed $value */ public function testSetInvalidPaymentMethod($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setPaymentMethod($value); } /** * @dataProvider validDateDataProvider * * @param mixed $value */ public function testDateMethods($value): void { $properties = [ 'createdAtGte', 'createdAtGt', 'createdAtLte', 'createdAtLt', 'capturedAtGte', 'capturedAtGt', 'capturedAtLte', 'capturedAtLt', ]; $expected = null; if ($value instanceof DateTime) { $expected = $value->format(YOOKASSA_DATE); } elseif (is_numeric($value)) { $expected = date(YOOKASSA_DATE, $value); } else { $expected = $value; } foreach ($properties as $property) { $this->getterAndSetterTest($value, $property, empty($expected) ? null : new DateTime($expected)); } } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetInvalidCreatedAtGte($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCreatedAtGte($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetInvalidCreatedAtGt($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCreatedAtGt($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetInvalidCreatedAtLte($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCreatedAtLte($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetInvalidCreatedAtLt($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCreatedAtLt($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetInvalidCapturedAtGte($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCapturedAtGte($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetInvalidCapturedAtGt($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCapturedAtGt($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetInvalidCapturedAtLte($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCapturedAtLte($value); } /** * @dataProvider invalidDateDataProvider * * @param mixed $value */ public function testSetInvalidCapturedAtLt($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCapturedAtLt($value); } /** * @dataProvider validLimitDataProvider * * @param mixed $value */ public function testLimit($value): void { $this->getterAndSetterTest($value, 'limit', $value); } /** * @dataProvider invalidLimitDataProvider * * @param mixed $value */ public function testSetInvalidLimit($value, $exception): void { $this->expectException($exception); $this->getTestInstance()->setLimit($value); } /** * @dataProvider validStatusDataProvider * * @param mixed $value */ public function testStatus($value): void { $this->getterAndSetterTest($value, 'status', null === $value ? '' : (string) $value); } /** * @dataProvider invalidStatusDataProvider * * @param mixed $value */ public function testSetInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setStatus($value); } public function testValidate(): void { $instance = new PaymentsRequest(); self::assertTrue($instance->validate()); } public function testBuilder(): void { $builder = PaymentsRequest::builder(); self::assertInstanceOf(PaymentsRequestBuilder::class, $builder); } public static function validNetPageDataProvider() { return [ [''], [null], [Random::str(1)], [Random::str(2, 64)], [new StringObject(Random::str(1))], [new StringObject(Random::str(2, 64))], ]; } public static function validPaymentMethodDataProvider() { $result = [ [null], [''], ]; foreach (PaymentMethodType::getValidValues() as $value) { $result[] = [$value]; $result[] = [new StringObject($value)]; } return $result; } public function validIdDataProvider() { return [ [null], [''], ['123'], [Random::str(1, 64)], [new StringObject(Random::str(1, 64))], ]; } public static function validDateDataProvider() { return [ [null], [''], [date(YOOKASSA_DATE, Random::int(0, time()))], [new DateTime()], ]; } public static function validStatusDataProvider() { $result = [ [null], [''], ]; foreach (PaymentStatus::getValidValues() as $value) { $result[] = [$value]; $result[] = [new StringObject($value)]; } return $result; } public static function validLimitDataProvider() { return [ [null], [Random::int(1, PaymentsRequest::MAX_LIMIT_VALUE)], ]; } public function invalidIdDataProvider() { return [ [[]], [new stdClass()], [true], [false], ]; } public static function invalidLimitDataProvider() { return [ [new stdClass(), InvalidPropertyValueTypeException::class], [Random::str(10), InvalidPropertyValueTypeException::class], [Random::bytes(10), InvalidPropertyValueTypeException::class], [-1, InvalidPropertyValueException::class], [PaymentsRequest::MAX_LIMIT_VALUE + 1, InvalidPropertyValueException::class], ]; } public static function invalidStatusDataProvider() { return [ [Random::str(10)], ]; } public static function invalidPaymentMethodDataProvider() { return [ [true], [Random::str(35)], [Random::str(37)], [new StringObject(Random::str(10))], ]; } public static function invalidDateDataProvider() { return [ [true], [false], [new stdClass()], [Random::str(35)], [Random::str(37)], [new StringObject(Random::str(10))], [-123], ]; } public static function invalidPageDataProvider() { return [ [[]], [new stdClass()], [true], [false], ]; } protected function getTestInstance(): PaymentsRequest { return new PaymentsRequest(); } private function getterAndSetterTest($value, $property, $expected, $testHas = true): void { $getter = 'get' . ucfirst($property); $setter = 'set' . ucfirst($property); $has = 'has' . ucfirst($property); $instance = $this->getTestInstance(); if ($testHas) { self::assertFalse($instance->{$has}()); } self::assertNull($instance->{$getter}()); self::assertNull($instance->{$property}); $instance->{$setter}($value); if (null === $value || '' === $value) { if ($testHas) { self::assertFalse($instance->{$has}()); } self::assertNull($instance->{$getter}()); self::assertNull($instance->{$property}); } else { if ($testHas) { self::assertTrue($instance->{$has}()); } if ($expected instanceof DateTime) { self::assertEquals($expected->getTimestamp(), $instance->{$getter}()->getTimestamp()); self::assertEquals($expected->getTimestamp(), $instance->{$property}->getTimestamp()); } else { self::assertEquals($expected, $instance->{$getter}()); self::assertEquals($expected, $instance->{$property}); } } $instance->{$setter}(null); if ($testHas) { self::assertFalse($instance->{$has}()); } self::assertNull($instance->{$getter}()); self::assertNull($instance->{$property}); $instance->{$property} = $value; if (null === $value || '' === $value) { if ($testHas) { self::assertFalse($instance->{$has}()); } self::assertNull($instance->{$getter}()); self::assertNull($instance->{$property}); } else { if ($testHas) { self::assertTrue($instance->{$has}()); } if ($expected instanceof DateTime) { self::assertEquals($expected->getTimestamp(), $instance->{$getter}()->getTimestamp()); self::assertEquals($expected->getTimestamp(), $instance->{$property}->getTimestamp()); } else { self::assertEquals($expected, $instance->{$getter}()); self::assertEquals($expected, $instance->{$property}); } } } } yookassa-sdk-php/tests/Request/Payments/CreatePaymentRequestTest.php000064400000124560150364342670022040 0ustar00hasRecipient()); self::assertNull($instance->getRecipient()); self::assertNull($instance->recipient); $instance->setRecipient($options['recipient']); if (empty($options['recipient'])) { self::assertFalse($instance->hasRecipient()); self::assertNull($instance->getRecipient()); self::assertNull($instance->recipient); } else { self::assertTrue($instance->hasRecipient()); if (is_array($options['recipient'])) { self::assertSame($options['recipient'], $instance->getRecipient()->toArray()); self::assertSame($options['recipient'], $instance->recipient->toArray()); } else { self::assertSame($options['recipient'], $instance->getRecipient()); self::assertSame($options['recipient'], $instance->recipient); } } $instance->setRecipient(null); self::assertFalse($instance->hasRecipient()); self::assertNull($instance->getRecipient()); self::assertNull($instance->recipient); $instance->recipient = $options['recipient']; if (empty($options['recipient'])) { self::assertFalse($instance->hasRecipient()); self::assertNull($instance->getRecipient()); self::assertNull($instance->recipient); } else { self::assertTrue($instance->hasRecipient()); if (is_array($options['recipient'])) { self::assertSame($options['recipient'], $instance->getRecipient()->toArray()); self::assertSame($options['recipient'], $instance->recipient->toArray()); } else { self::assertSame($options['recipient'], $instance->getRecipient()); self::assertSame($options['recipient'], $instance->recipient); } } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testDescription($options): void { $instance = new CreatePaymentRequest(); self::assertFalse($instance->hasDescription()); self::assertNull($instance->getDescription()); self::assertNull($instance->description); $instance->setDescription($options['description'] ?? null); if (empty($options['description'])) { self::assertFalse($instance->hasDescription()); self::assertNull($instance->getDescription()); self::assertNull($instance->description); } else { self::assertTrue($instance->hasDescription()); self::assertSame($options['description'], $instance->getDescription()); self::assertSame($options['description'], $instance->description); } $instance->setDescription(null); self::assertFalse($instance->hasDescription()); self::assertNull($instance->getDescription()); self::assertNull($instance->description); $instance->description = $options['description'] ?? null; if (empty($options['description'])) { self::assertFalse($instance->hasDescription()); self::assertNull($instance->getDescription()); self::assertNull($instance->description); } else { self::assertTrue($instance->hasDescription()); self::assertSame($options['description'], $instance->getDescription()); self::assertSame($options['description'], $instance->description); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testAmount($options): void { $instance = new CreatePaymentRequest(); $instance->setAmount($options['amount']); self::assertSame($options['amount'], $instance->getAmount()); self::assertSame($options['amount'], $instance->amount); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testPaymentToken($options): void { $instance = new CreatePaymentRequest(); self::assertFalse($instance->hasPaymentToken()); self::assertNull($instance->getPaymentToken()); self::assertNull($instance->paymentToken); $instance->setPaymentToken($options['paymentToken']); if (empty($options['paymentToken'])) { self::assertFalse($instance->hasPaymentToken()); self::assertNull($instance->getPaymentToken()); self::assertNull($instance->paymentToken); self::assertNull($instance->payment_token); } else { self::assertTrue($instance->hasPaymentToken()); self::assertSame($options['paymentToken'], $instance->getPaymentToken()); self::assertSame($options['paymentToken'], $instance->paymentToken); self::assertSame($options['paymentToken'], $instance->payment_token); } $instance->setPaymentToken(null); self::assertFalse($instance->hasPaymentToken()); self::assertNull($instance->getPaymentToken()); self::assertNull($instance->paymentToken); $instance->paymentToken = $options['paymentToken']; if (empty($options['paymentToken'])) { self::assertFalse($instance->hasPaymentToken()); self::assertNull($instance->getPaymentToken()); self::assertNull($instance->paymentToken); self::assertNull($instance->payment_token); } else { self::assertTrue($instance->hasPaymentToken()); self::assertSame($options['paymentToken'], $instance->getPaymentToken()); self::assertSame($options['paymentToken'], $instance->paymentToken); self::assertSame($options['paymentToken'], $instance->payment_token); } $instance->paymentToken = null; self::assertFalse($instance->hasPaymentToken()); self::assertNull($instance->getPaymentToken()); self::assertNull($instance->paymentToken); $instance->payment_token = $options['paymentToken']; if (empty($options['paymentToken'])) { self::assertFalse($instance->hasPaymentToken()); self::assertNull($instance->getPaymentToken()); self::assertNull($instance->paymentToken); self::assertNull($instance->payment_token); } else { self::assertTrue($instance->hasPaymentToken()); self::assertSame($options['paymentToken'], $instance->getPaymentToken()); self::assertSame($options['paymentToken'], $instance->paymentToken); self::assertSame($options['paymentToken'], $instance->payment_token); } } /** * @dataProvider invalidPaymentTokenDataProvider * * @param mixed $value */ public function testSetInvalidPaymentToken($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePaymentRequest(); $instance->setPaymentToken($value); } /** * @dataProvider invalidPaymentTokenDataProvider * * @param mixed $value */ public function testSetterInvalidPaymentToken($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePaymentRequest(); $instance->paymentToken = $value; } /** * @dataProvider invalidPaymentTokenDataProvider * * @param mixed $value */ public function testSetterInvalidSnakePaymentToken($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePaymentRequest(); $instance->payment_token = $value; } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testPaymentMethodId($options): void { $instance = new CreatePaymentRequest(); self::assertFalse($instance->hasPaymentMethodId()); self::assertNull($instance->getPaymentMethodId()); self::assertNull($instance->paymentMethodId); self::assertNull($instance->payment_method_id); $instance->setPaymentMethodId($options['paymentMethodId']); if (empty($options['paymentMethodId'])) { self::assertFalse($instance->hasPaymentMethodId()); self::assertNull($instance->getPaymentMethodId()); self::assertNull($instance->paymentMethodId); self::assertNull($instance->payment_method_id); } else { self::assertTrue($instance->hasPaymentMethodId()); self::assertSame($options['paymentMethodId'], $instance->getPaymentMethodId()); self::assertSame($options['paymentMethodId'], $instance->paymentMethodId); self::assertSame($options['paymentMethodId'], $instance->payment_method_id); } $instance->setPaymentMethodId(null); self::assertFalse($instance->hasPaymentMethodId()); self::assertNull($instance->getPaymentMethodId()); self::assertNull($instance->paymentMethodId); $instance->paymentMethodId = $options['paymentMethodId']; if (empty($options['paymentMethodId'])) { self::assertFalse($instance->hasPaymentMethodId()); self::assertNull($instance->getPaymentMethodId()); self::assertNull($instance->paymentMethodId); self::assertNull($instance->payment_method_id); } else { self::assertTrue($instance->hasPaymentMethodId()); self::assertSame($options['paymentMethodId'], $instance->getPaymentMethodId()); self::assertSame($options['paymentMethodId'], $instance->paymentMethodId); self::assertSame($options['paymentMethodId'], $instance->payment_method_id); } $instance->setPaymentMethodId(null); self::assertFalse($instance->hasPaymentMethodId()); self::assertNull($instance->getPaymentMethodId()); self::assertNull($instance->paymentMethodId); $instance->payment_method_id = $options['paymentMethodId']; if (empty($options['paymentMethodId'])) { self::assertFalse($instance->hasPaymentMethodId()); self::assertNull($instance->getPaymentMethodId()); self::assertNull($instance->paymentMethodId); self::assertNull($instance->payment_method_id); } else { self::assertTrue($instance->hasPaymentMethodId()); self::assertSame($options['paymentMethodId'], $instance->getPaymentMethodId()); self::assertSame($options['paymentMethodId'], $instance->paymentMethodId); self::assertSame($options['paymentMethodId'], $instance->payment_method_id); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testPaymentData($options): void { $instance = new CreatePaymentRequest(); self::assertFalse($instance->hasPaymentMethodData()); self::assertNull($instance->getPaymentMethodData()); self::assertNull($instance->paymentMethodData); $instance->setPaymentMethodData($options['paymentMethodData']); if (empty($options['paymentMethodData'])) { self::assertFalse($instance->hasPaymentMethodData()); self::assertNull($instance->getPaymentMethodData()); self::assertNull($instance->paymentMethodData); } else { self::assertTrue($instance->hasPaymentMethodData()); if (is_array($options['paymentMethodData'])) { self::assertSame($options['paymentMethodData'], $instance->getPaymentMethodData()->toArray()); self::assertSame($options['paymentMethodData'], $instance->paymentMethodData->toArray()); } else { self::assertSame($options['paymentMethodData'], $instance->getPaymentMethodData()); self::assertSame($options['paymentMethodData'], $instance->paymentMethodData); } } $instance->setPaymentMethodData(null); self::assertFalse($instance->hasPaymentMethodData()); self::assertNull($instance->getPaymentMethodData()); self::assertNull($instance->paymentMethodData); $instance->paymentMethodData = $options['paymentMethodData']; if (empty($options['paymentMethodData'])) { self::assertFalse($instance->hasPaymentMethodData()); self::assertNull($instance->getPaymentMethodData()); self::assertNull($instance->paymentMethodData); } else { if (is_array($options['paymentMethodData'])) { self::assertSame($options['paymentMethodData'], $instance->getPaymentMethodData()->toArray()); self::assertSame($options['paymentMethodData'], $instance->paymentMethodData->toArray()); } else { self::assertSame($options['paymentMethodData'], $instance->getPaymentMethodData()); self::assertSame($options['paymentMethodData'], $instance->paymentMethodData); } } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testConfirmationAttributes($options): void { $instance = new CreatePaymentRequest(); self::assertFalse($instance->hasConfirmation()); self::assertNull($instance->getConfirmation()); self::assertNull($instance->confirmation); $instance->setConfirmation($options['confirmation']); if (empty($options['confirmation'])) { self::assertFalse($instance->hasConfirmation()); self::assertNull($instance->getConfirmation()); self::assertNull($instance->confirmation); } else { self::assertTrue($instance->hasConfirmation()); if (is_array($options['confirmation'])) { self::assertSame($options['confirmation'], $instance->getConfirmation()->toArray()); self::assertSame($options['confirmation'], $instance->confirmation->toArray()); } else { self::assertSame($options['confirmation'], $instance->getConfirmation()); self::assertSame($options['confirmation'], $instance->confirmation); } } $instance->setConfirmation(null); self::assertFalse($instance->hasConfirmation()); self::assertNull($instance->getConfirmation()); self::assertNull($instance->confirmation); $instance->confirmation = $options['confirmation']; if (empty($options['confirmation'])) { self::assertFalse($instance->hasConfirmation()); self::assertNull($instance->getConfirmation()); self::assertNull($instance->confirmation); } else { self::assertTrue($instance->hasConfirmation()); if (is_array($options['confirmation'])) { self::assertSame($options['confirmation'], $instance->getConfirmation()->toArray()); self::assertSame($options['confirmation'], $instance->confirmation->toArray()); } else { self::assertSame($options['confirmation'], $instance->getConfirmation()); self::assertSame($options['confirmation'], $instance->confirmation); } } } /** * @dataProvider invalidConfirmationAttributesDataProvider * * @param mixed $value */ public function testSetInvalidConfirmationAttributes($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePaymentRequest(); $instance->setConfirmation($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testCreateRecurring($options): void { $instance = new CreatePaymentRequest(); self::assertFalse($instance->hasSavePaymentMethod()); self::assertNull($instance->getSavePaymentMethod()); self::assertNull($instance->savePaymentMethod); $instance->setSavePaymentMethod($options['savePaymentMethod']); if (null === $options['savePaymentMethod'] || '' === $options['savePaymentMethod']) { self::assertFalse($instance->hasSavePaymentMethod()); self::assertNull($instance->getSavePaymentMethod()); self::assertNull($instance->savePaymentMethod); } else { self::assertTrue($instance->hasSavePaymentMethod()); self::assertSame($options['savePaymentMethod'], $instance->getSavePaymentMethod()); self::assertSame($options['savePaymentMethod'], $instance->savePaymentMethod); } $instance->savePaymentMethod = $options['savePaymentMethod']; if (null === $options['savePaymentMethod'] || '' === $options['savePaymentMethod']) { self::assertFalse($instance->hasSavePaymentMethod()); self::assertNull($instance->getSavePaymentMethod()); self::assertNull($instance->savePaymentMethod); } else { self::assertTrue($instance->hasSavePaymentMethod()); self::assertSame($options['savePaymentMethod'], $instance->getSavePaymentMethod()); self::assertSame($options['savePaymentMethod'], $instance->savePaymentMethod); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testCapture($options): void { $instance = new CreatePaymentRequest(); self::assertTrue($instance->hasCapture()); self::assertTrue($instance->getCapture()); self::assertTrue($instance->capture); $instance->setCapture($options['capture']); if (null === $options['capture'] || '' === $options['capture']) { self::assertTrue($instance->hasCapture()); self::assertTrue($instance->getCapture()); self::assertTrue($instance->capture); } else { self::assertTrue($instance->hasCapture()); self::assertSame($options['capture'], $instance->getCapture()); self::assertSame($options['capture'], $instance->capture); } $instance->capture = $options['capture']; if (null === $options['capture'] || '' === $options['capture']) { self::assertTrue($instance->hasCapture()); self::assertTrue($instance->getCapture()); self::assertTrue($instance->capture); } else { self::assertTrue($instance->hasCapture()); self::assertSame($options['capture'], $instance->getCapture()); self::assertSame($options['capture'], $instance->capture); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testClientIp($options): void { $instance = new CreatePaymentRequest(); self::assertFalse($instance->hasClientIp()); self::assertNull($instance->getClientIp()); self::assertNull($instance->clientIp); $instance->setClientIp($options['clientIp']); if (empty($options['clientIp'])) { self::assertFalse($instance->hasClientIp()); self::assertNull($instance->getClientIp()); self::assertNull($instance->clientIp); } else { self::assertTrue($instance->hasClientIp()); self::assertSame($options['clientIp'], $instance->getClientIp()); self::assertSame($options['clientIp'], $instance->clientIp); } $instance->setClientIp(null); self::assertFalse($instance->hasClientIp()); self::assertNull($instance->getClientIp()); self::assertNull($instance->clientIp); $instance->clientIp = $options['clientIp']; if (empty($options['clientIp'])) { self::assertFalse($instance->hasClientIp()); self::assertNull($instance->getClientIp()); self::assertNull($instance->clientIp); } else { self::assertTrue($instance->hasClientIp()); self::assertSame($options['clientIp'], $instance->getClientIp()); self::assertSame($options['clientIp'], $instance->clientIp); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testMerchantCustomerId($options): void { $instance = new CreatePaymentRequest(); self::assertFalse($instance->hasMerchantCustomerId()); self::assertNull($instance->getMerchantCustomerId()); self::assertNull($instance->merchantCustomerId); self::assertNull($instance->merchant_customer_id); $instance->setMerchantCustomerId($options['merchant_customer_id']); if (empty($options['merchant_customer_id'])) { self::assertFalse($instance->hasMerchantCustomerId()); self::assertNull($instance->getMerchantCustomerId()); self::assertNull($instance->merchantCustomerId); self::assertNull($instance->merchant_customer_id); } else { self::assertTrue($instance->hasMerchantCustomerId()); self::assertSame($options['merchant_customer_id'], $instance->getMerchantCustomerId()); self::assertSame($options['merchant_customer_id'], $instance->merchantCustomerId); self::assertSame($options['merchant_customer_id'], $instance->merchant_customer_id); } $instance->setMerchantCustomerId(null); self::assertFalse($instance->hasMerchantCustomerId()); self::assertNull($instance->getMerchantCustomerId()); self::assertNull($instance->merchantCustomerId); self::assertNull($instance->merchant_customer_id); $instance->merchant_customer_id = $options['merchant_customer_id']; if (empty($options['merchant_customer_id'])) { self::assertFalse($instance->hasMerchantCustomerId()); self::assertNull($instance->getMerchantCustomerId()); self::assertNull($instance->merchantCustomerId); self::assertNull($instance->merchant_customer_id); } else { self::assertTrue($instance->hasMerchantCustomerId()); self::assertSame($options['merchant_customer_id'], $instance->getMerchantCustomerId()); self::assertSame($options['merchant_customer_id'], $instance->merchantCustomerId); self::assertSame($options['merchant_customer_id'], $instance->merchant_customer_id); } } /** * @dataProvider invalidMerchantCustomerIdDataProvider * * @param mixed $value */ public function testSetInvalidMerchantCustomerId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePaymentRequest(); $instance->setMerchantCustomerId($value); } public static function invalidMerchantCustomerIdDataProvider() { return [ [Random::str(Payment::MAX_LENGTH_MERCHANT_CUSTOMER_ID + 1)], ]; } /** * @dataProvider validTransfers * * @param mixed $value */ public function testSetTransfer($value): void { $instance = new CreatePaymentRequest(); $instance->setTransfers($value); if (is_array($value[0])) { $expected = [new TransferData($value[0])]; self::assertEquals($expected[0]->toArray(), $instance->getTransfers()[0]->toArray()); } else { self::assertEquals($value[0], $instance->getTransfers()[0]); } } /** * @return array[] * * @throws Exception */ public static function validTransfers(): array { $transfers = []; for ($i = 0; $i < 10; $i++) { foreach (range(0, Random::int(1, 3)) as $item) { $transfers[$i][$item] = [ 'account_id' => (string)Random::int(11111111, 99999999), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'platform_fee_amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'description' => Random::str(1, TransferData::MAX_LENGTH_DESCRIPTION), 'metadata' => ['test' => 'test'], ]; } } $transfers[0][0] = Random::bool() ? $transfers[0][0] : new TransferData($transfers[0][0]); return [$transfers]; } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testMetadata($options): void { $instance = new CreatePaymentRequest(); self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); $expected = $options['metadata']; if ($expected instanceof Metadata) { $expected = $expected->toArray(); } $instance->setMetadata($options['metadata']); if (empty($options['metadata'])) { self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); } else { self::assertTrue($instance->hasMetadata()); self::assertSame($expected, $instance->getMetadata()->toArray()); self::assertSame($expected, $instance->metadata->toArray()); } $instance->setMetadata(null); self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); $instance->metadata = $options['metadata']; if (empty($options['metadata'])) { self::assertFalse($instance->hasMetadata()); self::assertNull($instance->getMetadata()); self::assertNull($instance->metadata); } else { self::assertTrue($instance->hasMetadata()); self::assertSame($expected, $instance->getMetadata()->toArray()); self::assertSame($expected, $instance->metadata->toArray()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testDeal($options): void { $instance = new CreatePaymentRequest(); self::assertFalse($instance->hasDeal()); self::assertNull($instance->getDeal()); self::assertNull($instance->deal); $expected = $options['deal']; if ($expected instanceof PaymentDealInfo) { $expected = $expected->toArray(); } $instance->setDeal($options['deal']); if (empty($options['deal'])) { self::assertFalse($instance->hasDeal()); self::assertNull($instance->getDeal()); self::assertNull($instance->deal); } else { self::assertTrue($instance->hasDeal()); self::assertSame($expected, $instance->getDeal()->toArray()); self::assertSame($expected, $instance->deal->toArray()); } $instance->setDeal(null); self::assertFalse($instance->hasDeal()); self::assertNull($instance->getDeal()); self::assertNull($instance->deal); $instance->deal = $options['deal']; if (empty($options['deal'])) { self::assertFalse($instance->hasDeal()); self::assertNull($instance->getDeal()); self::assertNull($instance->deal); } else { self::assertTrue($instance->hasDeal()); self::assertSame($expected, $instance->getDeal()->toArray()); self::assertSame($expected, $instance->deal->toArray()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testFraudData($options): void { $instance = new CreatePaymentRequest(); self::assertFalse($instance->hasFraudData()); self::assertNull($instance->getFraudData()); self::assertNull($instance->fraud_data); $expected = $options['fraud_data']; if ($expected instanceof FraudData) { $expected = $expected->toArray(); } $instance->setFraudData($options['fraud_data']); if (empty($options['fraud_data'])) { self::assertFalse($instance->hasFraudData()); self::assertNull($instance->getFraudData()); self::assertNull($instance->fraud_data); } else { self::assertTrue($instance->hasFraudData()); self::assertSame($expected, $instance->getFraudData()->toArray()); self::assertSame($expected, $instance->fraud_data->toArray()); } $instance->setFraudData(null); self::assertFalse($instance->hasFraudData()); self::assertNull($instance->getFraudData()); self::assertNull($instance->fraud_data); $instance->fraud_data = $options['fraud_data']; if (empty($options['fraud_data'])) { self::assertFalse($instance->hasFraudData()); self::assertNull($instance->getFraudData()); self::assertNull($instance->fraud_data); } else { self::assertTrue($instance->hasFraudData()); self::assertSame($expected, $instance->getFraudData()->toArray()); self::assertSame($expected, $instance->fraud_data->toArray()); } } public function testValidate(): void { $instance = new CreatePaymentRequest(); self::assertFalse($instance->validate()); $amount = new MonetaryAmount(); $instance->setAmount($amount); self::assertFalse($instance->validate()); $instance->setAmount(new MonetaryAmount(10)); self::assertTrue($instance->validate()); $instance->setPaymentToken(Random::str(10)); self::assertTrue($instance->validate()); $instance->setPaymentMethodId(Random::str(10)); self::assertFalse($instance->validate()); $instance->setPaymentMethodId(null); self::assertTrue($instance->validate()); $instance->setPaymentMethodData(new PaymentDataQiwi(['phone' => Random::str(11, '0123456789')])); self::assertFalse($instance->validate()); $instance->setPaymentToken(null); self::assertTrue($instance->validate()); $instance->setPaymentMethodId(Random::str(10)); self::assertFalse($instance->validate()); $instance->setPaymentMethodId(null); self::assertTrue($instance->validate()); $receipt = new Receipt(); $receipt->setItems([ [ 'description' => Random::str(10), 'quantity' => (float) Random::int(1, 10), 'amount' => [ 'value' => round(Random::float(1, 100), 2), 'currency' => CurrencyCode::RUB, ], 'vat_code' => Random::int(1, 6), 'payment_subject' => PaymentSubject::COMMODITY, 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, ], ]); $instance->setReceipt($receipt); $item = new ReceiptItem(); $item->setPrice(new ReceiptItemAmount(10)); $item->setDescription('test'); $receipt->addItem($item); self::assertFalse($instance->validate()); $receipt->getCustomer()->setPhone('123123'); self::assertTrue($instance->validate()); $item->setVatCode(3); self::assertTrue($instance->validate()); $receipt->setTaxSystemCode(4); self::assertTrue($instance->validate()); self::assertNotNull($instance->getReceipt()); $instance->removeReceipt(); self::assertTrue($instance->validate()); self::assertNull($instance->getReceipt()); $instance->setAmount(new MonetaryAmount()); self::assertFalse($instance->validate()); } public function testBuilder(): void { $builder = CreatePaymentRequest::builder(); self::assertInstanceOf(CreatePaymentRequestBuilder::class, $builder); } /** * @dataProvider invalidMetadataDataProvider * * @param mixed $value */ public function testSetInvalidMetadata($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePaymentRequest(); $instance->setMetadata($value); } /** * @dataProvider invalidMetadataDataProvider * * @param mixed $value */ public function testSetInvalidDeal($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePaymentRequest(); $instance->setDeal($value); } /** * @dataProvider invalidFraudDataProvider * * @param mixed $value */ public function testSetInvalidFraudData($value): void { $this->expectException(InvalidArgumentException::class); $instance = new CreatePaymentRequest(); $instance->setFraudData($value); } public static function validDataProvider() { $metadata = new Metadata(); $metadata->test = 'test'; $result = [ [ [ 'recipient' => null, 'amount' => new MonetaryAmount(Random::int(1, 1000000)), 'referenceId' => null, 'paymentToken' => null, 'paymentMethodId' => null, 'paymentMethodData' => null, 'confirmation' => null, 'savePaymentMethod' => null, 'capture' => true, 'clientIp' => null, 'metadata' => null, 'deal' => null, 'fraud_data' => null, 'merchant_customer_id' => null, ], ], [ [ 'recipient' => null, 'amount' => new MonetaryAmount(Random::int(1, 1000000)), 'referenceId' => '', 'paymentToken' => '', 'paymentMethodId' => '', 'paymentMethodData' => null, 'confirmation' => null, 'savePaymentMethod' => true, 'capture' => true, 'clientIp' => '', 'metadata' => [], 'deal' => new PaymentDealInfo([ 'id' => Random::str(36, 50), 'settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ] ], ]), 'fraud_data' => new FraudData([ 'topped_up_phone' => Random::str(11, 15, '0123456789'), ]), 'merchant_customer_id' => '', ], ], ]; for ($i = 0; $i < 10; $i++) { $request = [ 'description' => Random::str(0, Payment::MAX_LENGTH_DESCRIPTION), 'recipient' => new Recipient(['account_id' => Random::str(11, '0123456789')]), 'amount' => new MonetaryAmount(Random::int(1, 1000000)), 'referenceId' => uniqid('', true), 'paymentToken' => uniqid('', true), 'paymentMethodId' => uniqid('', true), 'paymentMethodData' => new PaymentDataQiwi(['phone' => Random::str(11, '0123456789')]), 'confirmation' => new ConfirmationAttributesExternal(), 'savePaymentMethod' => Random::bool(), 'capture' => Random::bool(), 'clientIp' => long2ip(Random::int(0, 2 ** 32)), 'metadata' => 0 === $i ? $metadata : ['test' => 'test'], 'transfers' => [ [ 'account_id' => (string) Random::int(11111111, 99999999), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'platform_fee_amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'description' => Random::str(1, TransferData::MAX_LENGTH_DESCRIPTION), 'metadata' => 0 === $i ? $metadata : ['test' => 'test'], ], ], 'deal' => [ 'id' => Random::str(36, 50), 'settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ] ], ], 'fraud_data' => [ 'topped_up_phone' => Random::str(11, 15, '0123456789'), ], 'merchant_customer_id' => Random::str(36, 50), ]; $result[] = [$request]; } $result[] = [ [ 'recipient' => ['account_id' => Random::str(11, '0123456789')], 'amount' => new MonetaryAmount(Random::int(1, 1000000)), 'referenceId' => uniqid('', true), 'paymentToken' => uniqid('', true), 'paymentMethodId' => uniqid('', true), 'paymentMethodData' => ['phone' => Random::str(11, '0123456789'), 'type' => 'qiwi', ], 'confirmation' => [ 'return_url' => 'https://test.com', 'type' => ConfirmationType::MOBILE_APPLICATION, 'locale' => Locale::RUSSIAN, ], 'savePaymentMethod' => Random::bool(), 'capture' => Random::bool(), 'clientIp' => long2ip(Random::int(0, 2 ** 32)), 'metadata' => Random::bool() ? $metadata : ['test' => 'test'], 'transfers' => [ [ 'account_id' => (string) Random::int(11111111, 99999999), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'platform_fee_amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'description' => Random::str(1, TransferData::MAX_LENGTH_DESCRIPTION), 'metadata' => Random::bool() ? $metadata : ['test' => 'test'], ], ], 'deal' => [ 'id' => Random::str(36, 50), 'settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ] ], ], 'fraud_data' => new FraudData([ 'topped_up_phone' => Random::str(11, 15, '0123456789'), ]), 'merchant_customer_id' => Random::str(36, 50), ], ]; return $result; } public function invalidReferenceIdDataProvider() { return [ [false], [true], [new stdClass()], [[]], [Random::str(32)], ]; } public static function invalidPaymentTokenDataProvider() { return [ [Random::str(CreatePaymentRequest::MAX_LENGTH_PAYMENT_TOKEN + 1)], ]; } public static function invalidConfirmationAttributesDataProvider() { return [ [[]], [false], [true], [1], [Random::str(10)], [new stdClass()], ]; } public static function invalidMetadataDataProvider() { return [ [false], [true], [1], [Random::str(10)], ]; } public static function invalidFraudDataProvider() { return [ [false], [true], [new stdClass()], [Random::str(16, 30, '0123456789')], ]; } } yookassa-sdk-php/tests/Request/Payments/ConfirmationAttributes/ConfirmationAttributesQrTest.php000064400000001017150364342670027416 0ustar00getTestInstance(); $confirmation = $instance->factory($type); self::assertNotNull($confirmation); self::assertInstanceOf(AbstractConfirmationAttributes::class, $confirmation); self::assertEquals($type, $confirmation->getType()); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $type */ public function testInvalidFactory($type): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factory($type); } /** * @dataProvider validArrayDataProvider */ public function testFactoryFromArray(array $options): void { $instance = $this->getTestInstance(); $confirmation = $instance->factoryFromArray($options); self::assertNotNull($confirmation); self::assertInstanceOf(AbstractConfirmationAttributes::class, $confirmation); foreach ($options as $property => $value) { self::assertEquals($confirmation->{$property}, $value); } $type = $options['type']; unset($options['type']); $confirmation = $instance->factoryFromArray($options, $type); self::assertNotNull($confirmation); self::assertInstanceOf(AbstractConfirmationAttributes::class, $confirmation); self::assertEquals($type, $confirmation->getType()); foreach ($options as $property => $value) { self::assertEquals($confirmation->{$property}, $value); } } /** * @dataProvider invalidDataArrayDataProvider * * @param mixed $options */ public function testInvalidFactoryFromArray($options): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } public static function validTypeDataProvider() { $result = []; foreach (ConfirmationType::getEnabledValues() as $value) { $result[] = [$value]; } return $result; } public static function invalidTypeDataProvider() { return [ [''], [0], [1], [-1], ['5'], [Random::str(10)], ]; } public static function validArrayDataProvider() { $result = [ [ [ 'type' => ConfirmationType::REDIRECT, 'enforce' => false, 'returnUrl' => 'https://test.com', ], ], [ [ 'type' => ConfirmationType::REDIRECT, 'enforce' => true, ], ], [ [ 'type' => ConfirmationType::REDIRECT, 'returnUrl' => 'https://test.com', ], ], [ [ 'type' => ConfirmationType::REDIRECT, ], ], ]; foreach (ConfirmationType::getEnabledValues() as $value) { $result[] = [['type' => $value]]; } return $result; } public static function invalidDataArrayDataProvider() { return [ [[]], [['type' => 'test']], ]; } protected function getTestInstance(): ConfirmationAttributesFactory { return new ConfirmationAttributesFactory(); } } tests/Request/Payments/ConfirmationAttributes/ConfirmationAttributesRedirectTest.php000064400000006512150364342670030523 0ustar00yookassa-sdk-phpgetTestInstance(); $instance->setEnforce($value); if (null === $value || '' === $value) { self::assertNull($instance->getEnforce()); self::assertNull($instance->enforce); } else { self::assertEquals((bool) $value, $instance->getEnforce()); self::assertEquals((bool) $value, $instance->enforce); } $instance = $this->getTestInstance(); $instance->enforce = $value; if (null === $value || '' === $value) { self::assertNull($instance->getEnforce()); self::assertNull($instance->enforce); } else { self::assertEquals((bool) $value, $instance->getEnforce()); self::assertEquals((bool) $value, $instance->enforce); } } /** * @dataProvider validUrlDataProvider * * @param mixed $value */ public function testGetSetReturnUrl($value): void { $instance = $this->getTestInstance(); $instance->setReturnUrl($value); if (null === $value || '' === $value) { self::assertNull($instance->getReturnUrl()); self::assertNull($instance->returnUrl); self::assertNull($instance->return_url); } else { self::assertEquals($value, $instance->getReturnUrl()); self::assertEquals($value, $instance->returnUrl); self::assertEquals($value, $instance->return_url); } $instance->returnUrl = $value; if (null === $value || '' === $value) { self::assertNull($instance->getReturnUrl()); self::assertNull($instance->returnUrl); self::assertNull($instance->return_url); } else { self::assertEquals($value, $instance->getReturnUrl()); self::assertEquals($value, $instance->returnUrl); self::assertEquals($value, $instance->return_url); } $instance->return_url = $value; if (null === $value || '' === $value) { self::assertNull($instance->getReturnUrl()); self::assertNull($instance->returnUrl); self::assertNull($instance->return_url); } else { self::assertEquals($value, $instance->getReturnUrl()); self::assertEquals($value, $instance->returnUrl); self::assertEquals($value, $instance->return_url); } } public static function validEnforceDataProvider() { return [ [true], [false], ]; } public static function validUrlDataProvider() { return [ ['https://test.com'], ]; } protected function getTestInstance(): ConfirmationAttributesRedirect { return new ConfirmationAttributesRedirect(); } protected function getExpectedType(): string { return ConfirmationType::REDIRECT; } } tests/Request/Payments/ConfirmationAttributes/ConfirmationAttributesExternalTest.php000064400000001055150364342670030541 0ustar00yookassa-sdk-phpgetTestInstance(); self::assertEquals($this->getExpectedType(), $instance->getType()); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testInvalidType($value): void { $this->expectException(InvalidArgumentException::class); new TestConfirmation($value); } public static function invalidTypeDataProvider() { return [ [''], [null], [Random::str(40)], [0], ]; } /** * @dataProvider validLocaleDataProvider * * @param mixed $value */ public function testSetterLocale($value): void { $instance = $this->getTestInstance(); $instance->setLocale($value); self::assertEquals((string) $value, $instance->getLocale()); } /** * @throws Exception */ public static function validLocaleDataProvider(): array { return [ [''], [null], ['ru_RU'], ['en_US'], ]; } /** * @dataProvider invalidLocaleDataProvider * * @param mixed $value */ public function testSetInvalidLocale($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setLocale($value); } /** * @throws Exception */ public static function invalidLocaleDataProvider(): array { return [ [Random::str(4)], [Random::str(6)], [0], ]; } abstract protected function getTestInstance(): AbstractConfirmationAttributes; abstract protected function getExpectedType(): string; } class TestConfirmation extends AbstractConfirmationAttributes { public function __construct($type) { parent::__construct(); $this->setType($type); } } tests/Request/Payments/ConfirmationAttributes/ConfirmationAttributesMobileApplicationTest.php000064400000005307150364342670032356 0ustar00yookassa-sdk-phpgetTestInstance(); $instance->setReturnUrl($value); if (null === $value || '' === $value) { self::assertNull($instance->getReturnUrl()); self::assertNull($instance->returnUrl); self::assertNull($instance->return_url); } else { self::assertEquals($value, $instance->getReturnUrl()); self::assertEquals($value, $instance->returnUrl); self::assertEquals($value, $instance->return_url); } $instance->returnUrl = $value; if (null === $value || '' === $value) { self::assertNull($instance->getReturnUrl()); self::assertNull($instance->returnUrl); self::assertNull($instance->return_url); } else { self::assertEquals($value, $instance->getReturnUrl()); self::assertEquals($value, $instance->returnUrl); self::assertEquals($value, $instance->return_url); } $instance->return_url = $value; if (null === $value || '' === $value) { self::assertNull($instance->getReturnUrl()); self::assertNull($instance->returnUrl); self::assertNull($instance->return_url); } else { self::assertEquals($value, $instance->getReturnUrl()); self::assertEquals($value, $instance->returnUrl); self::assertEquals($value, $instance->return_url); } } public function validEnforceDataProvider() { return [ [true], [false], [null], [''], [0], [1], [100], ]; } public function invalidEnforceDataProvider() { return [ ['true'], ['false'], [[]], [new stdClass()], ]; } public static function validUrlDataProvider() { return [ ['https://test.ru'], ]; } protected function getTestInstance(): ConfirmationAttributesMobileApplication { return new ConfirmationAttributesMobileApplication(); } protected function getExpectedType(): string { return ConfirmationType::MOBILE_APPLICATION; } } yookassa-sdk-php/tests/Request/Payments/PaymentsResponseTest.php000064400000035344150364342670021246 0ustar00getItems()); foreach ($instance->getItems() as $index => $item) { self::assertInstanceOf(PaymentInterface::class, $item); self::assertArrayHasKey($index, $options['items']); self::assertEquals($options['items'][$index]['id'], $item->getId()); self::assertEquals($options['items'][$index]['status'], $item->getStatus()); self::assertEquals($options['items'][$index]['amount']['value'], $item->getAmount()->getValue()); self::assertEquals($options['items'][$index]['amount']['currency'], $item->getAmount()->getCurrency()); self::assertEquals($options['items'][$index]['created_at'], $item->getCreatedAt()->format(YOOKASSA_DATE)); self::assertEquals($options['items'][$index]['payment_method']['type'], $item->getPaymentMethod()->getType()); self::assertEquals($options['items'][$index]['paid'], $item->getPaid()); self::assertEquals($options['items'][$index]['refundable'], $item->getRefundable()); } } /** * @dataProvider validDataProvider */ public function testGetNextCursor(array $options): void { $instance = new PaymentsResponse($options); if (empty($options['next_cursor'])) { self::assertNull($instance->getNextCursor()); } else { self::assertEquals($options['next_cursor'], $instance->getNextCursor()); } } /** * @dataProvider validDataProvider */ public function testHasNext(array $options): void { $instance = new PaymentsResponse($options); if (empty($options['next_cursor'])) { self::assertFalse($instance->hasNextCursor()); } else { self::assertTrue($instance->hasNextCursor()); } } /** * @dataProvider invalidDataProvider */ public function testInvalidData(array $options): void { $this->expectException(InvalidArgumentException::class); new PaymentsResponse($options); } public static function validDataProvider() { return [ [ [ 'type' => 'list', 'items' => [], ], ], [ [ 'type' => 'list', 'items' => [ [ 'id' => Random::str(36), 'status' => PaymentStatus::SUCCEEDED, 'amount' => [ 'value' => Random::int(1, 100000), 'currency' => CurrencyCode::EUR, ], 'description' => Random::str(20), 'created_at' => date(YOOKASSA_DATE), 'payment_method' => [ 'type' => PaymentMethodType::QIWI, ], 'paid' => false, 'refundable' => false, 'confirmation' => [ 'type' => ConfirmationType::EXTERNAL, ], 'recipient' => [ 'account_id' => uniqid('', true), 'gateway_id' => uniqid('', true), ], ], ], 'next_cursor' => uniqid('', true), ], ], [ [ 'type' => 'list', 'items' => [ [ 'id' => Random::str(36), 'status' => PaymentStatus::SUCCEEDED, 'amount' => [ 'value' => Random::int(1, 100000), 'currency' => CurrencyCode::EUR, ], 'created_at' => date(YOOKASSA_DATE), 'payment_method' => [ 'type' => PaymentMethodType::QIWI, ], 'paid' => true, 'refundable' => true, 'confirmation' => [ 'type' => ConfirmationType::EXTERNAL, ], 'recipient' => [ 'account_id' => uniqid('', true), 'gateway_id' => uniqid('', true), ], ], [ 'id' => Random::str(36), 'status' => PaymentStatus::SUCCEEDED, 'amount' => [ 'value' => Random::int(1, 100000), 'currency' => CurrencyCode::EUR, ], 'description' => Random::str(20), 'created_at' => date(YOOKASSA_DATE), 'payment_method' => [ 'type' => PaymentMethodType::QIWI, ], 'paid' => false, 'refundable' => false, 'recipient' => [ 'account_id' => uniqid('', true), 'gateway_id' => uniqid('', true), ], 'reference_id' => uniqid('', true), 'captured_at' => date(YOOKASSA_DATE), 'charge' => ['value' => Random::int(1, 100000), 'currency' => CurrencyCode::RUB], 'income' => ['value' => Random::int(1, 100000), 'currency' => CurrencyCode::USD], 'refunded' => ['value' => Random::int(1, 100000), 'currency' => CurrencyCode::EUR], 'metadata' => ['test_key' => 'test_value'], 'cancellation_details' => ['party' => CancellationDetailsPartyCode::PAYMENT_NETWORK, 'reason' => CancellationDetailsReasonCode::INVALID_CSC], 'authorization_details' => ['rrn' => Random::str(20), 'auth_code' => Random::str(20), 'three_d_secure' => ['applied' => Random::bool()]], 'refunded_amount' => ['value' => Random::int(1, 100000), 'currency' => CurrencyCode::RUB], 'confirmation' => [ 'type' => ConfirmationType::EXTERNAL, ], 'receipt_registration' => ReceiptRegistrationStatus::PENDING, ], ], 'next_cursor' => uniqid('', true), ], ], [ [ 'type' => 'list', 'items' => [ [ 'id' => Random::str(36), 'status' => PaymentStatus::SUCCEEDED, 'amount' => [ 'value' => Random::int(1, 100000), 'currency' => CurrencyCode::EUR, ], 'description' => Random::str(20), 'created_at' => date(YOOKASSA_DATE), 'payment_method' => [ 'type' => PaymentMethodType::QIWI, ], 'paid' => true, 'refundable' => true, 'confirmation' => [ 'type' => ConfirmationType::REDIRECT, 'confirmation_url' => 'https://test.com', 'return_url' => 'https://test.com', 'enforce' => false, ], 'income_amount' => [ 'value' => Random::int(1, 100000), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'recipient' => [ 'account_id' => uniqid('', true), 'gateway_id' => uniqid('', true), ], ], [ 'id' => Random::str(36), 'status' => PaymentStatus::SUCCEEDED, 'amount' => [ 'value' => Random::int(1, 100000), 'currency' => CurrencyCode::EUR, ], 'description' => Random::str(20), 'created_at' => date(YOOKASSA_DATE), 'payment_method' => [ 'type' => PaymentMethodType::QIWI, ], 'paid' => true, 'refundable' => true, 'confirmation' => [ 'type' => ConfirmationType::REDIRECT, 'confirmation_url' => 'https://test.com', ], 'income_amount' => [ 'value' => Random::int(1, 100000), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'recipient' => [ 'account_id' => uniqid('', true), 'gateway_id' => uniqid('', true), ], ], [ 'id' => Random::str(36), 'status' => PaymentStatus::SUCCEEDED, 'amount' => [ 'value' => Random::int(1, 100000), 'currency' => CurrencyCode::EUR, ], 'description' => Random::str(20), 'created_at' => date(YOOKASSA_DATE), 'payment_method' => [ 'type' => PaymentMethodType::QIWI, ], 'paid' => true, 'refundable' => true, 'confirmation' => [ 'type' => ConfirmationType::CODE_VERIFICATION, 'confirmation_url' => Random::str(10), ], 'income_amount' => [ 'value' => Random::int(1, 100000), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'recipient' => [ 'account_id' => uniqid('', true), 'gateway_id' => uniqid('', true), ], ], [ 'id' => Random::str(36), 'status' => PaymentStatus::SUCCEEDED, 'amount' => [ 'value' => Random::int(1, 100000), 'currency' => CurrencyCode::EUR, ], 'description' => Random::str(20), 'created_at' => date(YOOKASSA_DATE), 'payment_method' => [ 'type' => PaymentMethodType::QIWI, ], 'paid' => true, 'refundable' => true, 'confirmation' => [ 'type' => ConfirmationType::EMBEDDED, 'confirmation_token' => Random::str(10), 'confirmation_url' => Random::str(10), ], 'income_amount' => [ 'value' => Random::int(1, 100000), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'recipient' => [ 'account_id' => uniqid('', true), 'gateway_id' => uniqid('', true), ], ], ], 'next_cursor' => uniqid('', true), ], ], ]; } public static function invalidDataProvider() { return [ [ [ 'items' => [ [ 'id' => Random::str(36), 'status' => PaymentStatus::SUCCEEDED, 'amount' => [ 'value' => Random::int(1, 100000), 'currency' => CurrencyCode::EUR, ], 'description' => Random::str(20), 'created_at' => date(YOOKASSA_DATE), 'payment_method' => [ 'type' => PaymentMethodType::QIWI, ], 'paid' => true, 'refundable' => true, 'confirmation' => [ 'confirmation_url' => Random::str(10), ], ], ], ], ], ]; } } yookassa-sdk-php/tests/Request/Payments/CancelResponseTest.php000064400000000462150364342670020624 0ustar00build($this->getRequiredData()); self::assertNull($instance->getRecipient()); $builder->setAccountId($options['accountId']); $instance = $builder->build($this->getRequiredData('accountId')); if (null === $options['accountId'] || '' === $options['accountId']) { self::assertNull($instance->getRecipient()); } else { self::assertNotNull($instance->getRecipient()); self::assertEquals($options['accountId'], $instance->getRecipient()->getAccountId()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetDeal($options): void { $builder = new CreatePaymentRequestBuilder(); $builder->setAmount($options['amount']); $builder->setDeal($options['deal']); $instance = $builder->build(); if (empty($options['deal'])) { self::assertNull($instance->getDeal()); } else { self::assertNotNull($instance->getDeal()); self::assertEquals($options['deal'], $instance->getDeal()->toArray()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetFraudData($options): void { $builder = new CreatePaymentRequestBuilder(); $builder->setAmount($options['amount']); $builder->setFraudData($options['fraud_data']); $instance = $builder->build(); if (empty($options['fraud_data'])) { self::assertNull($instance->getFraudData()); } else { self::assertNotNull($instance->getFraudData()); if (is_array($options['fraud_data'])) { self::assertEquals($options['fraud_data'], $instance->getFraudData()->toArray()); } else { self::assertEquals($options['fraud_data'], $instance->getFraudData()); } } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetMerchantCustomerId($options): void { $builder = new CreatePaymentRequestBuilder(); $builder->setAmount($options['amount']); $builder->setMerchantCustomerId($options['merchant_customer_id']); $instance = $builder->build(); if (empty($options['merchant_customer_id'])) { self::assertNull($instance->getMerchantCustomerId()); } else { self::assertNotNull($instance->getMerchantCustomerId()); self::assertEquals($options['merchant_customer_id'], $instance->getMerchantCustomerId()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetProductGroupId($options): void { $builder = new CreatePaymentRequestBuilder(); $instance = $builder->build($this->getRequiredData()); self::assertNull($instance->getRecipient()); $builder->setGatewayId($options['gatewayId']); $instance = $builder->build($this->getRequiredData('gatewayId')); if (empty($options['gatewayId'])) { self::assertNull($instance->getRecipient()); } else { self::assertNotNull($instance->getRecipient()); self::assertEquals($options['gatewayId'], $instance->getRecipient()->getGatewayId()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetAmount($options): void { $builder = new CreatePaymentRequestBuilder(); $instance = $builder->build($this->getRequiredData()); self::assertNotNull($instance->getAmount()); $builder->setAmount($options['amount']); $instance = $builder->build($this->getRequiredData('amount')); if ($options['amount'] instanceof AmountInterface) { self::assertEquals($options['amount']->getValue(), $instance->getAmount()->getValue()); self::assertEquals($options['amount']->getCurrency(), $instance->getAmount()->getCurrency()); } else { self::assertEquals($options['amount']['value'], $instance->getAmount()->getValue()); self::assertEquals($options['amount']['currency'], $instance->getAmount()->getCurrency()); } if (is_array($options['amount'])) { $builder->setAmount($options['amount']['value'], $options['amount']['currency']); $instance = $builder->build($this->getRequiredData('amount')); self::assertEquals($options['amount']['value'], $instance->getAmount()->getValue()); self::assertEquals($options['amount']['currency'], $instance->getAmount()->getCurrency()); } $builder->setAmount(10000)->setAmount($options['amount']); $instance = $builder->build($this->getRequiredData('amount')); if ($options['amount'] instanceof AmountInterface) { self::assertEquals($options['amount']->getValue(), $instance->getAmount()->getValue()); self::assertEquals($options['amount']->getCurrency(), $instance->getAmount()->getCurrency()); } else { self::assertEquals($options['amount']['value'], $instance->getAmount()->getValue()); self::assertEquals($options['amount']['currency'], $instance->getAmount()->getCurrency()); } if (!$options['amount'] instanceof AmountInterface) { $builder->setAmount([ 'value' => $options['amount']['value'], 'currency' => $options['amount']['currency'], ]); $instance = $builder->build($this->getRequiredData('amount')); self::assertEquals($options['amount']['value'], $instance->getAmount()->getValue()); self::assertEquals($options['amount']['currency'], $instance->getAmount()->getCurrency()); } } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePaymentRequestBuilder(); $builder->setAmount($value); } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetCurrency($options): void { $builder = new CreatePaymentRequestBuilder(); $instance = $builder->build($this->getRequiredData()); self::assertNotNull($instance->getAmount()); self::assertEquals(CurrencyCode::RUB, $instance->getAmount()->getCurrency()); $builder->setReceiptItems($options['receiptItems']); $builder->setAmount($options['amount']); $builder->setCurrency($options['amount']['currency']); $builder->setReceiptEmail($options['receiptEmail']); $instance = $builder->build($this->getRequiredData('amount')); if ($options['amount'] instanceof AmountInterface) { self::assertEquals($options['amount']->getCurrency(), $instance->getAmount()->getCurrency()); } else { self::assertEquals($options['amount']['currency'], $instance->getAmount()->getCurrency()); } if (!empty($options['receiptItems'])) { foreach ($instance->getReceipt()->getItems() as $item) { self::assertEquals($options['amount']['currency'], $item->getPrice()->getCurrency()); } } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetReceiptItems($options): void { $builder = new CreatePaymentRequestBuilder(); $builder->setReceiptItems($options['receiptItems']); $builder->setReceiptEmail($options['receiptEmail']); $instance = $builder->build($this->getRequiredData()); if (empty($options['receiptItems'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals(count($options['receiptItems']), count($instance->getReceipt()->getItems())); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testAddReceiptItems($options): void { $builder = new CreatePaymentRequestBuilder(); foreach ($options['receiptItems'] as $item) { if ($item instanceof ReceiptItem) { $builder->addReceiptItem( $item->getDescription(), $item->getPrice()->getValue(), $item->getQuantity(), $item->getVatCode(), $item->getPaymentMode(), $item->getPaymentSubject() ); } else { $builder->addReceiptItem( $item['description'], $item['price']['value'], $item['quantity'], $item['vatCode'], $item['paymentMode'], $item['paymentSubject'] ); } } $builder->setReceiptEmail($options['receiptEmail']); $instance = $builder->build($this->getRequiredData()); if (empty($options['receiptItems'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals(count($options['receiptItems']), count($instance->getReceipt()->getItems())); foreach ($instance->getReceipt()->getItems() as $item) { self::assertFalse($item->isShipping()); } } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testAddReceiptShipping($options): void { $builder = new CreatePaymentRequestBuilder(); foreach ($options['receiptItems'] as $item) { if ($item instanceof ReceiptItem) { $builder->addReceiptShipping( $item->getDescription(), $item->getPrice()->getValue(), $item->getVatCode() ); } else { $builder->addReceiptShipping($item['description'], $item['price']['value'], $item['vatCode']); } } $builder->setReceiptEmail($options['receiptEmail']); $instance = $builder->build($this->getRequiredData()); if (empty($options['receiptItems'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals(count($options['receiptItems']), count($instance->getReceipt()->getItems())); foreach ($instance->getReceipt()->getItems() as $item) { self::assertTrue($item->isShipping()); } } } /** * @dataProvider invalidItemsDataProvider * * @param mixed $items */ public function testSetInvalidReceiptItems($items): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePaymentRequestBuilder(); $builder->setReceiptItems($items); } public static function invalidItemsDataProvider() { return [ [ [ [ 'price' => [1], 'quantity' => -1.4, 'vatCode' => 10, ], ], ], [ [ [ 'title' => 'test', 'quantity' => -1.4, 'vatCode' => 3, ], ], ], [ [ [ 'description' => 'test', 'quantity' => 1.4, 'vatCode' => -3, ], ], ], [ [ [ 'title' => 'test', 'price' => [123], 'quantity' => 1.4, 'vatCode' => 7, ], ], ], [ [ [ 'description' => 'test', 'price' => [123], 'quantity' => -1.4, ], ], ], [ [ [ 'title' => 'test', 'price' => [1], 'vatCode' => 7, ], ], ], ]; } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetReceiptEmail($options): void { $builder = new CreatePaymentRequestBuilder(); $builder->setReceiptItems($options['receiptItems']); $builder->setReceiptEmail($options['receiptEmail']); $instance = $builder->build($this->getRequiredData()); if (empty($options['receiptItems'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals($options['receiptEmail'], $instance->getReceipt()->getCustomer()->getEmail()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetReceiptPhone($options): void { $builder = new CreatePaymentRequestBuilder(); $builder->setReceiptItems($options['receiptItems']); $builder->setReceiptEmail($options['receiptEmail']); $builder->setReceiptPhone($options['receiptPhone']); $instance = $builder->build($this->getRequiredData()); if (empty($options['receiptItems'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals($options['receiptPhone'], $instance->getReceipt()->getCustomer()->getPhone()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetReceiptTaxSystemCode($options): void { $builder = new CreatePaymentRequestBuilder(); $builder->setReceiptItems($options['receiptItems']); $builder->setReceiptEmail($options['receiptEmail']); $builder->setTaxSystemCode($options['taxSystemCode']); $instance = $builder->build($this->getRequiredData()); if (empty($options['receiptItems'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals($options['taxSystemCode'], $instance->getReceipt()->getTaxSystemCode()); } } /** * @dataProvider invalidVatIdDataProvider * * @param mixed $value */ public function testSetInvalidTaxSystemId($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePaymentRequestBuilder(); $builder->setTaxSystemCode($value); } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetReceiptIndustryDetails($options): void { $builder = new CreatePaymentRequestBuilder(); $builder->setReceiptItems($options['receiptItems']); $builder->setReceiptEmail($options['receiptEmail']); $builder->setReceiptIndustryDetails($options['receiptIndustryDetails']); $instance = $builder->build($this->getRequiredData()); if (empty($options['receiptItems'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals($options['receiptIndustryDetails'], $instance->getReceipt()->getReceiptIndustryDetails()->toArray()); } } /** * @dataProvider invalidReceiptIndustryDetailsDataProvider * * @param mixed $value */ public function testSetInvalidReceiptIndustryDetails($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePaymentRequestBuilder(); $builder->setReceiptIndustryDetails($value); } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetReceiptOperationalDetails($options): void { $builder = new CreatePaymentRequestBuilder(); $builder->setReceiptItems($options['receiptItems']); $builder->setReceiptEmail($options['receiptEmail']); $builder->setReceiptOperationalDetails($options['receiptOperationalDetails']); $instance = $builder->build($this->getRequiredData()); if (empty($options['receiptItems'])) { self::assertNull($instance->getReceipt()); } else { self::assertNotNull($instance->getReceipt()); self::assertEquals($options['receiptOperationalDetails'], $instance->getReceipt()->getReceiptOperationalDetails()); } } /** * @dataProvider invalidReceiptOperationalDetailsDataProvider * * @param mixed $value */ public function testSetInvalidReceiptOperationalDetails($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePaymentRequestBuilder(); $builder->setReceiptOperationalDetails($value); } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetPaymentToken($options): void { $builder = new CreatePaymentRequestBuilder(); $instance = $builder->build($this->getRequiredData(null, 'paymentMethodId')); self::assertNull($instance->getPaymentToken()); self::assertNull($instance->paymentToken); self::assertNull($instance->payment_token); if (empty($options['paymentToken'])) { $buildData = $this->getRequiredData(null, 'paymentMethodId'); } else { $buildData = $this->getRequiredData('paymentToken'); } $builder->setPaymentToken($options['paymentToken']); $instance = $builder->build($buildData); if (empty($options['paymentToken'])) { self::assertNull($instance->getPaymentToken()); self::assertNull($instance->paymentToken); self::assertNull($instance->payment_token); } else { self::assertEquals($options['paymentToken'], $instance->getPaymentToken()); self::assertEquals($options['paymentToken'], $instance->paymentToken); self::assertEquals($options['paymentToken'], $instance->payment_token); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetPaymentMethodId($options): void { $builder = new CreatePaymentRequestBuilder(); $instance = $builder->build($this->getRequiredData()); self::assertNull($instance->getPaymentMethodId()); $builder->setPaymentMethodId($options['paymentMethodId']); $instance = $builder->build($this->getRequiredData(empty($options['paymentMethodId']) ? null : 'paymentToken')); if (empty($options['paymentMethodId'])) { self::assertNull($instance->getPaymentMethodId()); } else { self::assertEquals($options['paymentMethodId'], $instance->getPaymentMethodId()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetPaymentData($options): void { $builder = new CreatePaymentRequestBuilder(); $instance = $builder->build($this->getRequiredData()); self::assertNull($instance->getPaymentMethodData()); $builder->setPaymentMethodData($options['paymentMethodData']); $instance = $builder->build($this->getRequiredData(empty($options['paymentMethodId']) ? null : 'paymentToken')); if (empty($options['paymentMethodData'])) { self::assertNull($instance->getPaymentMethodData()); } else { if (is_object($options['paymentMethodData'])) { self::assertSame($options['paymentMethodData'], $instance->getPaymentMethodData()); } elseif (is_string($options['paymentMethodData'])) { self::assertEquals($options['paymentMethodData'], $instance->getPaymentMethodData()->getType()); } else { self::assertEquals($options['paymentMethodData']['type'], $instance->getPaymentMethodData()->getType()); } } if (is_array($options['paymentMethodData'])) { $builder = new CreatePaymentRequestBuilder(); $builder->build($this->getRequiredData()); $builder->setPaymentMethodData($options['paymentMethodData']['type'], $options['paymentMethodData']); $instance = $builder->build($this->getRequiredData(empty($options['paymentMethodId']) ? null : 'paymentToken')); self::assertEquals($options['paymentMethodData']['type'], $instance->getPaymentMethodData()->getType()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetConfirmationAttributes($options): void { $builder = new CreatePaymentRequestBuilder(); $instance = $builder->build($this->getRequiredData()); self::assertNull($instance->getConfirmation()); $builder->setConfirmation($options['confirmation']); $instance = $builder->build($this->getRequiredData()); if (empty($options['confirmation'])) { self::assertNull($instance->getConfirmation()); } else { if (is_object($options['confirmation'])) { self::assertSame($options['confirmation'], $instance->getConfirmation()); } elseif (is_string($options['confirmation'])) { self::assertEquals($options['confirmation'], $instance->getConfirmation()->getType()); } else { self::assertEquals($options['confirmation']['type'], $instance->getConfirmation()->getType()); self::assertEquals($options['confirmation']['locale'], $instance->getConfirmation()->getLocale()); } } if (is_array($options['confirmation'])) { $builder = new CreatePaymentRequestBuilder(); $builder->build($this->getRequiredData()); $builder->setConfirmation($options['confirmation']); $instance = $builder->build($this->getRequiredData()); self::assertEquals($options['confirmation']['type'], $instance->getConfirmation()->getType()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetCreateRecurring($options): void { $builder = new CreatePaymentRequestBuilder(); $instance = $builder->build($this->getRequiredData()); self::assertNull($instance->getSavePaymentMethod()); $builder->setSavePaymentMethod($options['savePaymentMethod']); $instance = $builder->build($this->getRequiredData()); if (null === $options['savePaymentMethod'] || '' === $options['savePaymentMethod']) { self::assertFalse($instance->getSavePaymentMethod()); } else { self::assertEquals($options['savePaymentMethod'], $instance->getSavePaymentMethod()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetCapture($options): void { $builder = new CreatePaymentRequestBuilder(); $instance = $builder->build($this->getRequiredData()); self::assertTrue($instance->getCapture()); $builder->setCapture($options['capture']); $instance = $builder->build($this->getRequiredData()); if (null === $options['capture'] || '' === $options['capture']) { self::assertTrue($instance->getCapture()); } else { self::assertEquals($options['capture'], $instance->getCapture()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetClientIp($options): void { $builder = new CreatePaymentRequestBuilder(); $instance = $builder->build($this->getRequiredData()); self::assertNull($instance->getClientIp()); $builder->setClientIp($options['clientIp']); $instance = $builder->build($this->getRequiredData()); if (empty($options['clientIp'])) { self::assertNull($instance->getClientIp()); } else { self::assertEquals($options['clientIp'], $instance->getClientIp()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetMetadata($options): void { $builder = new CreatePaymentRequestBuilder(); $instance = $builder->build($this->getRequiredData()); self::assertNull($instance->getMetadata()); $builder->setMetadata($options['metadata']); $instance = $builder->build($this->getRequiredData()); if (empty($options['metadata'])) { self::assertNull($instance->getMetadata()); } else { self::assertEquals($options['metadata'], $instance->getMetadata()->toArray()); } } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetRecipient($options): void { $recipient = new Recipient(); $recipient->setAccountId($options['accountId']); $recipient->setGatewayId($options['gatewayId']); $builder = new CreatePaymentRequestBuilder(); $builder->setRecipient($recipient); $instance = $builder->build($this->getRequiredData()); self::assertEquals($recipient, $instance->getRecipient()); $builder = new CreatePaymentRequestBuilder(); $builder->setRecipient([ 'account_id' => $options['accountId'], 'gateway_id' => $options['gatewayId'], ]); $instance = $builder->build($this->getRequiredData()); self::assertEquals($recipient, $instance->getRecipient()); } /** * @dataProvider invalidRecipientDataProvider * * @param mixed $value */ public function testSetInvalidRecipient($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePaymentRequestBuilder(); $builder->setRecipient($value); } public static function invalidRecipientDataProvider() { return [ [null], [true], [false], [1], [1.1], ['test'], [new stdClass()], ]; } /** * @throws Exception */ public function testSetReceipt(): void { $receipt = [ 'tax_system_code' => Random::int(1, 6), 'customer' => [ 'email' => 'johndoe@yoomoney.ru', 'phone' => Random::str(4, 15, '0123456789'), ], 'items' => [ [ 'description' => 'test', 'quantity' => 123, 'amount' => [ 'value' => 321, 'currency' => 'USD', ], 'vat_code' => Random::int(1, 6), 'payment_subject' => PaymentSubject::COMMODITY, 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, ], ], ]; $builder = new CreatePaymentRequestBuilder(); $builder->setReceipt($receipt); $instance = $builder->build($this->getRequiredData()); self::assertEquals($receipt['tax_system_code'], $instance->getReceipt()->getTaxSystemCode()); self::assertEquals($receipt['customer']['email'], $instance->getReceipt()->getCustomer()->getEmail()); self::assertEquals($receipt['customer']['phone'], $instance->getReceipt()->getCustomer()->getPhone()); self::assertCount(1, $instance->getReceipt()->getItems()); $receipt = $instance->getReceipt(); $builder = new CreatePaymentRequestBuilder(); $builder->setReceipt($instance->getReceipt()); $instance = $builder->build($this->getRequiredData()); self::assertEquals($receipt['tax_system_code'], $instance->getReceipt()->getTaxSystemCode()); self::assertEquals($receipt['customer']['email'], $instance->getReceipt()->getCustomer()->getEmail()); self::assertEquals($receipt['customer']['phone'], $instance->getReceipt()->getCustomer()->getPhone()); self::assertCount(1, $instance->getReceipt()->getItems()); } /** * @dataProvider invalidReceiptDataProvider * * @param mixed $value */ public function testSetInvalidReceipt($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePaymentRequestBuilder(); $builder->setReceipt($value); } public static function invalidReceiptDataProvider() { return [ [null], [true], [false], [1], [1.1], ['test'], [new stdClass()], ]; } /** * @throws Exception */ public static function validDataProvider(): array { $receiptItem = new ReceiptItem(); $receiptItem->setPrice(new ReceiptItemAmount(1)); $receiptItem->setQuantity(1); $receiptItem->setDescription('test'); $receiptItem->setVatCode(3); $result = [ [ [ 'accountId' => Random::str(1, 32), 'gatewayId' => Random::str(1, 32), 'recipient' => null, 'description' => Random::str(1, 128), 'amount' => new MonetaryAmount(Random::int(1, 1000)), 'receiptItems' => [], 'paymentToken' => null, 'paymentMethodId' => null, 'paymentMethodData' => null, 'confirmation' => null, 'savePaymentMethod' => true, 'capture' => true, 'clientIp' => null, 'metadata' => null, 'receiptEmail' => 'johndoe@yoomoney.ru', 'receiptPhone' => null, 'taxSystemCode' => null, 'deal' => [ 'id' => Random::str(36, 50), 'settlements' => [ [ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => round(Random::float(10.00, 100.00), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ], ], 'fraud_data' => null, 'merchant_customer_id' => null, 'receiptIndustryDetails' => [], 'receiptOperationalDetails' => null, ], ], [ [ 'accountId' => Random::str(1, 32), 'gatewayId' => Random::str(1, 32), 'recipient' => null, 'description' => Random::str(1, 128), 'amount' => new MonetaryAmount(Random::int(1, 1000)), 'receiptItems' => [ [ 'description' => 'test', 'quantity' => Random::int(1, 100), 'price' => (new MonetaryAmount(Random::int(1, 1000)))->toArray(), 'vatCode' => Random::int(1, 6), 'paymentMode' => PaymentMode::CREDIT_PAYMENT, 'paymentSubject' => PaymentSubject::ANOTHER, ], $receiptItem, ], 'referenceId' => null, 'paymentToken' => null, 'paymentMethodId' => null, 'paymentMethodData' => null, 'confirmation' => null, 'savePaymentMethod' => false, 'capture' => false, 'clientIp' => '', 'metadata' => [], 'receiptEmail' => 'johndoe@yoomoney.ru', 'receiptPhone' => '', 'taxSystemCode' => null, 'deal' => [ 'id' => Random::str(36, 50), 'settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ] ], ], 'fraud_data' => new FraudData([ 'id' => Random::str(11, 15, '0123456789'), ]), 'merchant_customer_id' => null, 'receiptIndustryDetails' => [], 'receiptOperationalDetails' => null, ], ], ]; $paymentMethodData = [ new PaymentDataQiwi(['phone' => Random::str(11, '0123456789')]), PaymentMethodType::BANK_CARD, [ 'type' => PaymentMethodType::BANK_CARD, ], ]; $confirmationStatuses = [ new ConfirmationAttributesExternal(), [ 'type' => ConfirmationType::EMBEDDED, 'locale' => 'en_US', ], [ 'type' => ConfirmationType::EXTERNAL, 'locale' => 'en_US', ], [ 'type' => ConfirmationType::QR, 'locale' => 'ru_RU', ], ]; for ($i = 0; $i < 10; $i++) { $request = [ 'accountId' => uniqid('', true), 'gatewayId' => uniqid('', true), 'recipient' => new Recipient(), 'description' => uniqid('', true), 'amount' => [ 'value' => Random::int(1, 100000), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'receiptItems' => [], 'referenceId' => uniqid('', true), 'paymentToken' => uniqid('', true), 'paymentMethodId' => uniqid('', true), 'paymentMethodData' => $paymentMethodData[$i] ?? null, 'confirmation' => $confirmationStatuses[$i] ?? null, 'savePaymentMethod' => (bool)Random::int(0, 1), 'capture' => (bool)Random::int(0, 1), 'clientIp' => long2ip(Random::int(0, 2 ** 32)), 'metadata' => ['test' => 'test'], 'receiptEmail' => 'johndoe@yoomoney.ru', 'receiptPhone' => Random::str(10, '0123456789'), 'taxSystemCode' => Random::int(1, 6), 'receiptIndustryDetails' => [ [ 'federal_id' => Random::value([ '00' . Random::int(1, 9), '0' . Random::int(1, 6) . Random::int(0, 9), '07' . Random::int(0, 3) ]), 'document_date' => date(IndustryDetails::DOCUMENT_DATE_FORMAT), 'document_number' => Random::str(1, IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH), 'value' => Random::str(1, IndustryDetails::VALUE_MAX_LENGTH), ], ], 'receiptOperationalDetails' => [ 'operation_id' => Random::int(0, OperationalDetails::OPERATION_ID_MAX_VALUE), 'value' => Random::str(1, OperationalDetails::VALUE_MAX_LENGTH), 'created_at' => date(YOOKASSA_DATE), ], 'deal' => [ 'id' => Random::str(36, 50), 'settlements' => [ [ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => round(Random::float(10.00, 100.00), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ], ], 'fraud_data' => [ 'id' => Random::str(11, 15, '0123456789'), ], 'merchant_customer_id' => Random::str(3, 100), ]; $result[] = [$request]; } return $result; } public static function invalidAmountDataProvider(): array { return [ [-1], [true], [false], [new stdClass()], [0], ]; } /** * @throws Exception */ public static function invalidVatIdDataProvider(): array { return [ [false], [0], [7], [Random::int(-100, -1)], [Random::int(7, 100)], ]; } /** * @throws Exception */ public static function invalidReceiptIndustryDetailsDataProvider(): array { return [ [new stdClass()], [true], [Random::str(1, 100)], ]; } public static function invalidReceiptOperationalDetailsDataProvider() { return [ [new stdClass()], [true], [Random::str(1, 100)], ]; } /** * @dataProvider validDataProvider * * @param mixed $options * * @throws Exception */ public function testSetDescription($options): void { $builder = new CreatePaymentRequestBuilder(); $builder->setDescription($options['description']); $instance = $builder->build($this->getRequiredData()); if (empty($options['description'])) { self::assertNull($instance->getDescription()); } else { self::assertEquals($options['description'], $instance->getDescription()); } } public function testSetInvalidLengthDescription(): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePaymentRequestBuilder(); $description = Random::str(Payment::MAX_LENGTH_DESCRIPTION + 1); $builder->setDescription($description); } /** * @dataProvider invalidVatIdDataProvider * * @param mixed $value */ public function testSetInvalidAirline($value): void { $this->expectException(ValidatorParameterException::class); $builder = new CreatePaymentRequestBuilder(); $builder->setAirline($value); } /** * @throws Exception */ public static function invalidDealDataProvider(): array { return [ [true], [false], [new stdClass()], [0], [7], [Random::int(-100, -1)], [Random::int(7, 100)], ]; } /** * @dataProvider invalidDealDataProvider * * @param mixed $value */ public function testSetInvalidDeal($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePaymentRequestBuilder(); $builder->setDeal($value); } /** * @throws Exception */ public static function invalidFraudDataProvider(): array { return [ [true], [false], [new stdClass()], [0], [7], [Random::int(-100, -1)], [Random::int(7, 100)], ]; } /** * @dataProvider invalidFraudDataProvider * * @param mixed $value */ public function testSetInvalidFraudData($value): void { $this->expectException(InvalidArgumentException::class); $builder = new CreatePaymentRequestBuilder(); $builder->setFraudData($value); } /** * @param null $testingProperty * @param null $paymentType * * @throws Exception */ protected function getRequiredData($testingProperty = null, $paymentType = null): array { $result = []; if ('accountId' === $testingProperty || 'gatewayId' === $testingProperty) { if ('accountId' !== $testingProperty) { $result['accountId'] = Random::str(1, 32); } if ('gatewayId' !== $testingProperty) { $result['gatewayId'] = Random::str(1, 32); } } if ('amount' !== $testingProperty) { $result['amount'] = new MonetaryAmount(Random::int(1, 100)); } if ('paymentToken' !== $testingProperty) { if (null !== $paymentType) { $result[$paymentType] = Random::str(36); } else { $result['paymentToken'] = Random::str(36); } } return $result; } } yookassa-sdk-php/tests/Request/Payments/PaymentData/PaymentDataGooglePayTest.php000064400000000761150364342670024147 0ustar00getTestInstance(); $paymentData = $instance->factory($type); self::assertNotNull($paymentData); self::assertInstanceOf(AbstractPaymentData::class, $paymentData); self::assertEquals($type, $paymentData->getType()); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $type */ public function testInvalidFactory($type): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factory($type); } /** * @dataProvider validArrayDataProvider */ public function testFactoryFromArray(array $options): void { $instance = $this->getTestInstance(); $paymentData = $instance->factoryFromArray($options); self::assertNotNull($paymentData); self::assertInstanceOf(AbstractPaymentData::class, $paymentData); foreach ($options as $property => $value) { self::assertEquals($paymentData->{$property}, $value); } $type = $options['type']; unset($options['type']); $paymentData = $instance->factoryFromArray($options, $type); self::assertNotNull($paymentData); self::assertInstanceOf(AbstractPaymentData::class, $paymentData); self::assertEquals($type, $paymentData->getType()); foreach ($options as $property => $value) { self::assertEquals($paymentData->{$property}, $value); } } /** * @dataProvider invalidDataArrayDataProvider * * @param mixed $options */ public function testInvalidFactoryFromArray($options): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } public static function validTypeDataProvider() { $result = []; foreach (PaymentMethodType::getEnabledValues() as $value) { $result[] = [$value]; } return $result; } public static function invalidTypeDataProvider() { return [ [''], [0], [1], [-1], ['5'], [Random::str(10)], ]; } public static function validArrayDataProvider() { $result = [ [ [ 'type' => PaymentMethodType::GOOGLE_PAY, 'paymentMethodToken' => Random::str(10, 20), 'googleTransactionId' => Random::str(10, 20), ], ], [ [ 'type' => PaymentMethodType::APPLE_PAY, 'paymentData' => Random::str(10, 20), ], ], [ [ 'type' => PaymentMethodType::BANK_CARD, 'card' => new PaymentDataBankCardCard([ 'number' => Random::str(16, 19, '0123456789'), 'expiry_year' => (string) Random::int(2023, 2025), 'expiry_month' => str_pad((string) Random::int(1, 12), 2, '0', STR_PAD_LEFT), 'csc' => Random::str(3, 4, '0123456789'), 'cardholder' => Random::str(10, 20, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ '), ]), ], ], [ [ 'type' => PaymentMethodType::CASH, 'phone' => Random::str(4, 15, '0123456789'), ], ], [ [ 'type' => PaymentMethodType::MOBILE_BALANCE, 'phone' => Random::str(4, 15, '0123456789'), ], ], [ [ 'type' => PaymentMethodType::SBERBANK, 'phone' => Random::str(4, 15, '0123456789'), ], ], [ [ 'type' => PaymentMethodType::YOO_MONEY, ], ], [ [ 'type' => PaymentMethodType::INSTALLMENTS, ], ], [ [ 'type' => PaymentMethodType::TINKOFF_BANK, ], ], [ [ 'type' => PaymentMethodType::SBP, ], ], ]; foreach (PaymentMethodType::getEnabledValues() as $value) { $result[] = [['type' => $value]]; } return $result; } public static function invalidDataArrayDataProvider() { return [ [[]], [['type' => 'test']], [ [ 'type' => PaymentMethodType::ALFABANK, 'login' => Random::str(10, 20), ], ], [ [ 'type' => PaymentMethodType::UNKNOWN, ], ], ]; } protected function getTestInstance() { return new PaymentDataFactory(); } } yookassa-sdk-php/tests/Request/Payments/PaymentData/PaymentDataQiwiTest.php000064400000000723150364342670023170 0ustar00getTestInstance(); $instance->setPaymentMethodToken($data); self::assertEquals($data, $instance->getPaymentMethodToken()); $instance = $this->getTestInstance(); $instance->paymentMethodToken = $data; self::assertEquals($data, $instance->getPaymentMethodToken()); } /** * @dataProvider validPaymentDataDataProvider */ public function testGetSetGoogleTransactionId(string $data): void { /** @var PaymentDataGooglePay $instance */ $instance = $this->getTestInstance(); $instance->setGoogleTransactionId($data); self::assertEquals($data, $instance->getGoogleTransactionId()); $instance = $this->getTestInstance(); $instance->googleTransactionId = $data; self::assertEquals($data, $instance->getGoogleTransactionId()); } /** * @dataProvider invalidPaymentDataDataProvider * * @param mixed $data */ public function testSetPaymentMethodToken($data): void { $this->expectException(InvalidArgumentException::class); /** @var PaymentDataGooglePay $instance */ $instance = $this->getTestInstance(); $instance->setPaymentMethodToken($data); } /** * @dataProvider invalidPaymentDataDataProvider * * @param mixed $data */ public function testSetGoogleTransactionId($data): void { $this->expectException(InvalidArgumentException::class); /** @var PaymentDataGooglePay $instance */ $instance = $this->getTestInstance(); $instance->setGoogleTransactionId($data); } public function validPaymentDataDataProvider() { return [ [Random::str(256)], [Random::str(1024)], ]; } public function invalidPaymentDataDataProvider() { return [ [null], [''], [false], ]; } } yookassa-sdk-php/tests/Request/Payments/PaymentData/AbstractTestPaymentDataPhone.php000064400000004132150364342670025012 0ustar00getTestInstance(); $instance->setPhone($value); self::assertEquals($value, $instance->getPhone()); self::assertEquals($value, $instance->phone); $instance = $this->getTestInstance(); $instance->phone = $value; self::assertEquals($value, $instance->getPhone()); self::assertEquals($value, $instance->phone); } /** * @dataProvider invalidPhoneDataProvider * * @param mixed $value */ public function testSetInvalidPhone($value): void { $this->expectException(InvalidArgumentException::class); /** @var PaymentDataMobileBalance $instance */ $instance = $this->getTestInstance(); $instance->setPhone($value); } /** * @dataProvider invalidPhoneDataProvider * * @param mixed $value */ public function testSetterInvalidPhone($value): void { $this->expectException(InvalidArgumentException::class); /** @var PaymentDataMobileBalance $instance */ $instance = $this->getTestInstance(); $instance->phone = $value; } public function validPhoneDataProvider() { return [ ['0123'], ['45678'], ['901234'], ['5678901'], ['23456789'], ['012345678'], ['9012345678'], ['90123456789'], ['012345678901'], ['5678901234567'], ['89012345678901'], ['234567890123456'], ]; } public function invalidPhoneDataProvider() { return [ [true], ['2345678901234567'], ]; } } yookassa-sdk-php/tests/Request/Payments/PaymentData/PaymentDataCashTest.php000064400000002047150364342670023136 0ustar00getTestInstance(); self::assertEquals($this->getExpectedType(), $instance->getType()); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testInvalidType($value): void { $this->expectException(InvalidArgumentException::class); new TestPaymentData($value); } public static function invalidTypeDataProvider() { return [ [''], [null], [Random::str(40)], [0], ]; } abstract protected function getTestInstance(): AbstractPaymentData; abstract protected function getExpectedType(): string; } class TestPaymentData extends AbstractPaymentData { public function __construct($type) { parent::__construct([]); $this->setType($type); } } yookassa-sdk-php/tests/Request/Payments/PaymentData/PaymentDataApplePayTest.php000064400000000753150364342670023775 0ustar00getTestInstance(); $instance->setCard($value); if (null === $value || '' === $value || [] === $value) { self::assertNull($instance->getCard()); self::assertNull($instance->card); } else { if (is_array($value)) { $expected = new PaymentDataBankCardCard(); foreach ($value as $property => $val) { $expected->offsetSet($property, $val); } } else { $expected = $value; } self::assertEquals($expected, $instance->getCard()); self::assertEquals($expected, $instance->card); } $instance = $this->getTestInstance(); $instance->card = $value; if (null === $value || '' === $value || [] === $value) { self::assertNull($instance->getCard()); self::assertNull($instance->card); } else { if (is_array($value)) { $expected = new PaymentDataBankCardCard(); foreach ($value as $property => $val) { $expected->offsetSet($property, $val); } } else { $expected = $value; } self::assertEquals($expected, $instance->getCard()); self::assertEquals($expected, $instance->card); } } /** * @dataProvider invalidCardDataProvider * * @param mixed $value */ public function testSetInvalidCard($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCard($value); } /** * @dataProvider invalidCardDataProvider * * @param mixed $value */ public function testSetterInvalidCard($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->card = $value; } public static function validCardDataProvider() { return [ [null], [new PaymentDataBankCardCard([ 'number' => Random::str(16, '0123456789'), 'expiry_year' => (string) Random::int(2023, 2025), 'expiry_month' => str_pad((string) Random::int(1, 12), 2, '0', STR_PAD_LEFT), ])], [[]], [''], [[ 'number' => Random::str(16, '0123456789'), 'expiry_year' => (string) Random::int(2023, 2025), 'expiry_month' => str_pad((string) Random::int(1, 12), 2, '0', STR_PAD_LEFT), ]], ]; } public static function invalidCardDataProvider() { return [ [0], [1], [-1], ['5'], [true], [new stdClass()], ]; } protected function getTestInstance(): PaymentDataBankCard { return new PaymentDataBankCard(); } protected function getExpectedType(): string { return PaymentMethodType::BANK_CARD; } } yookassa-sdk-php/tests/Request/Payments/PaymentData/AbstractTestPaymentDataApplePay.php000064400000007026150364342670025461 0ustar00getTestInstance(); $instance->setPaymentData($value); if (null === $value || '' === $value) { self::assertNull($instance->getPaymentData()); self::assertNull($instance->paymentData); self::assertNull($instance->payment_data); } else { self::assertEquals($value, $instance->getPaymentData()); self::assertEquals($value, $instance->paymentData); self::assertEquals($value, $instance->payment_data); } $instance = $this->getTestInstance(); $instance->paymentData = $value; if (null === $value || '' === $value) { self::assertNull($instance->getPaymentData()); self::assertNull($instance->paymentData); self::assertNull($instance->payment_data); } else { self::assertEquals($value, $instance->getPaymentData()); self::assertEquals($value, $instance->paymentData); self::assertEquals($value, $instance->payment_data); } $instance = $this->getTestInstance(); $instance->payment_data = $value; if (null === $value || '' === $value) { self::assertNull($instance->getPaymentData()); self::assertNull($instance->paymentData); self::assertNull($instance->payment_data); } else { self::assertEquals($value, $instance->getPaymentData()); self::assertEquals($value, $instance->paymentData); self::assertEquals($value, $instance->payment_data); } } /** * @dataProvider invalidPaymentDataDataProvider * * @param mixed $value */ public function testSetInvalidPaymentData($value): void { $this->expectException(EmptyPropertyValueException::class); /** @var PaymentDataApplePay $instance */ $instance = $this->getTestInstance(); $instance->setPaymentData($value); } /** * @dataProvider invalidPaymentDataDataProvider * * @param mixed $value */ public function testSetterInvalidPaymentData($value): void { $this->expectException(EmptyPropertyValueException::class); /** @var PaymentDataApplePay $instance */ $instance = $this->getTestInstance(); $instance->paymentData = $value; } /** * @dataProvider invalidPaymentDataDataProvider * * @param mixed $value */ public function testSetterInvalidPayment_data($value): void { $this->expectException(EmptyPropertyValueException::class); /** @var PaymentDataApplePay $instance */ $instance = $this->getTestInstance(); $instance->payment_data = $value; } public function validPaymentDataDataProvider() { return [ ['https://test.ru'], [Random::str(256)], [Random::str(1024)], ]; } public function invalidPaymentDataDataProvider() { return [ [null], [''], [false], ]; } } yookassa-sdk-php/tests/Request/Payments/PaymentData/PaymentDataB2bSberbankTest.php000064400000012504150364342670024334 0ustar00getTestInstance(); $instance->setPaymentPurpose($value); self::assertEquals($value, $instance->getPaymentPurpose()); self::assertEquals($value, $instance->paymentPurpose); } /** * @dataProvider invalidPaymentPurposeDataProvider * * @param mixed $value */ public function testSetInvalidPaymentPurpose($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setPaymentPurpose($value); } /** * @throws Exception */ public static function validPaymentPurposeDataProvider(): array { return [ [Random::str(16)], ]; } /** * @throws Exception */ public static function invalidPaymentPurposeDataProvider(): array { return [ [''], [Random::str(211)], ]; } /** * @dataProvider validVatDataDataProvider * * @param mixed $value */ public function testGetSetVatData($value): void { $instance = $this->getTestInstance(); $instance->setVatData($value); if (is_array($value)) { self::assertEquals($value['type'], $instance->getVatData()->getType()); self::assertEquals($value['type'], $instance->vatData->getType()); if (isset($value['rate'])) { self::assertEquals($value['rate'], $instance->getVatData()->getRate()); self::assertEquals($value['rate'], $instance->vatData->getRate()); } if (isset($value['amount'])) { if (is_array($value['amount'])) { self::assertEquals( $value['amount']['value'], (int) $instance->getVatData()->getAmount()->getValue() ); self::assertEquals($value['amount']['currency'], $instance->vatData->getAmount()->getCurrency()); } else { self::assertEquals($value['amount'], $instance->getVatData()->getAmount()); self::assertEquals($value['amount'], $instance->vatData->getAmount()); } } } else { self::assertEquals($value, $instance->getVatData()); self::assertEquals($value, $instance->vatData); } } /** * @dataProvider invalidVatDataDataProvider * * @param mixed $value */ public function testSetInvalidVatData($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setVatData($value); } /** * @throws Exception */ public static function validVatDataDataProvider(): array { return [ [['type' => VatDataType::UNTAXED]], [[ 'type' => VatDataType::CALCULATED, 'rate' => VatDataRate::RATE_10, 'amount' => new MonetaryAmount(Random::int(1, 10000), CurrencyCode::EUR), ]], [ [ 'type' => VatDataType::UNTAXED, ], ], [ [ 'type' => VatDataType::CALCULATED, 'rate' => VatDataRate::RATE_10, 'amount' => new MonetaryAmount(Random::int(1, 10000), CurrencyCode::EUR), ], ], [ [ 'type' => VatDataType::MIXED, 'amount' => new MonetaryAmount(Random::int(1, 10000), CurrencyCode::EUR), ], ], [ [ 'type' => VatDataType::CALCULATED, 'rate' => VatDataRate::RATE_20, 'amount' => [ 'value' => Random::int(1, 10000), 'currency' => CurrencyCode::USD, ], ], ], ]; } /** * @throws Exception */ public static function invalidVatDataDataProvider(): array { return [ [0], [1], [-1], [''], [true], [new stdClass()], [ [ 'type' => VatDataType::CALCULATED, 'rate' => VatDataRate::RATE_10, 'amount' => Random::str(10), ], ], ]; } protected function getTestInstance(): PaymentDataB2bSberbank { return new PaymentDataB2bSberbank(); } protected function getExpectedType(): string { return PaymentMethodType::B2B_SBERBANK; } } yookassa-sdk-php/tests/Request/Payments/PaymentData/PaymentDataSberbankTest.php000064400000000747150364342670024014 0ustar00getAndSetTest($value, 'number'); } /** * @dataProvider invalidNumberDataProvider */ public function testSetInvalidNumber(mixed $value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setNumber($value); } /** * @dataProvider invalidNumberDataProvider */ public function testSetterInvalidNumber(mixed $value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->number = $value; } /** * @dataProvider validExpiryYearDataProvider * * @param mixed $value */ public function testGetSetExpiryYear($value): void { $this->getAndSetTest($value, 'expiryYear', 'expiry_year'); } /** * @dataProvider invalidYearDataProvider * * @param mixed $value */ public function testSetInvalidYear($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setExpiryYear($value); } /** * @dataProvider invalidYearDataProvider * * @param mixed $value */ public function testSetterInvalidYear($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->expiryYear = $value; } /** * @dataProvider invalidYearDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeYear($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->expiry_year = $value; } /** * @dataProvider invalidMonthDataProvider * * @param mixed $value */ public function testSetterInvalidMonth($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->expiryMonth = $value; } /** * @dataProvider invalidMonthDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeMonth($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->expiry_month = $value; } /** * @dataProvider validExpiryMonthDataProvider * * @param mixed $value */ public function testGetSetExpiryMonth($value): void { $this->getAndSetTest($value, 'expiryMonth', 'expiry_month'); } /** * @dataProvider invalidMonthDataProvider * * @param mixed $value */ public function testSetInvalidMonth($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setExpiryMonth($value); } /** * @dataProvider validCscDataProvider * * @param mixed $value */ public function testGetSetCsc($value): void { $this->getAndSetTest($value, 'csc'); } /** * @dataProvider invalidCscDataProvider * * @param mixed $value */ public function testSetInvalidCsc($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCsc($value); } /** * @dataProvider invalidCscDataProvider * * @param mixed $value */ public function testSetterInvalidCsc($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->csc = $value; } /** * @dataProvider validCardholderDataProvider * * @param mixed $value */ public function testGetSetCardholder($value): void { $this->getAndSetTest($value, 'cardholder'); } /** * @dataProvider invalidCardholderDataProvider * * @param mixed $value */ public function testSetInvalidCardholder($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCardholder($value); } /** * @dataProvider invalidCardholderDataProvider * * @param mixed $value */ public function testSetterInvalidCardholder($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->cardholder = $value; } public static function validNumberDataProvider(): array { $result = []; for ($i = 0; $i < 3; $i++) { $result[] = [Random::str(16, '0123456789')]; $result[] = [Random::str(17, '0123456789')]; $result[] = [Random::str(18, '0123456789')]; $result[] = [Random::str(19, '0123456789')]; } return $result; } public static function validExpiryYearDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [Random::int(2000, 2200)]; } return $result; } public static function validExpiryMonthDataProvider(): array { return [ ['01'], ['02'], ['03'], ['04'], ['05'], ['06'], ['07'], ['08'], ['09'], ['10'], ['11'], ['12'], ]; } public static function validCscDataProvider() { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [Random::str(3, 4, '0123456789')]; } return $result; } public static function validCardholderDataProvider() { $values = 'abcdefghijklmnopqrstuvwxyz'; $values .= strtoupper($values) . ' '; $result = [ [Random::str(1, $values)], [Random::str(26, $values)], ]; for ($i = 0; $i < 10; $i++) { $result[] = [Random::str(1, 26, $values)]; } return $result; } /** * @throws Exception */ public static function invalidNumberDataProvider(): array { return [ [''], [null], [0], [1], [-1], [Random::str(15, '0123456789')], [Random::str(20, '0123456789')], ]; } public static function invalidYearDataProvider() { return [ [''], [null], [0], [1], [-1], ['5'], [Random::str(1, 1, '0123456789')], [Random::str(2, 2, '0123456789')], [Random::str(5, 5, '0123456789')], [Random::str(6, 6, '0123456789')], ]; } public static function invalidMonthDataProvider() { return [ [''], [null], [0], [1], [-1], ['5'], [Random::str(1, 1, '0123456789')], [Random::str(3, 3, '0123456789')], ['13'], ['16'], ]; } public static function invalidCscDataProvider() { return [ [1], [-1], ['5'], [Random::str(2, 2, '0123456789')], [Random::str(5, 5, '0123456789')], [Random::str(6, 6, '0123456789')], ]; } public static function invalidCardholderDataProvider() { $values = 'abcdefghijklmnopqrstuvwxyz'; $values .= strtoupper($values) . ' '; return [ [1], [-1], ['5'], [Random::str(2, 2, '0123456789')], [Random::str(5, 5, '0123456789')], [Random::str(6, 6, '0123456789')], [Random::str(27, 27, $values)], ]; } protected function getTestInstance() { return new PaymentDataBankCardCard(); } protected function getAndSetTest($value, $property, $snakeCase = null): void { $getter = 'get' . ucfirst($property); $setter = 'set' . ucfirst($property); $instance = $this->getTestInstance(); self::assertNull($instance->{$getter}()); self::assertNull($instance->{$property}); if (null !== $snakeCase) { self::assertNull($instance->{$snakeCase}); } $instance->{$setter}($value); self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); if (null !== $snakeCase) { self::assertEquals($value, $instance->{$snakeCase}); } $instance = $this->getTestInstance(); $instance->{$property} = $value; self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); if (null !== $snakeCase) { self::assertEquals($value, $instance->{$snakeCase}); } if (null !== $snakeCase) { $instance = $this->getTestInstance(); $instance->{$snakeCase} = $value; self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); self::assertEquals($value, $instance->{$snakeCase}); } } } yookassa-sdk-php/tests/Request/Payments/PaymentData/PaymentDataYooMoneyTest.php000064400000000743150364342670024037 0ustar00getType()); self::assertEquals($value['amount']->getValue(), $instance->getAmount()->getValue()); } /** * @dataProvider validTypeDataProvider */ public function testGetSetType(string $value): void { $this->getAndSetTest($value, 'type'); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testSetInvalidType($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setType($value); } /** * @throws Exception */ public static function validConstructDataProvider(): array { return [ [ [ 'type' => VatDataType::MIXED, 'amount' => new MonetaryAmount(Random::int(1, 1000)), ], ], ]; } /** * @throws Exception */ public static function validTypeDataProvider(): array { return [ [VatDataType::CALCULATED], [VatDataType::UNTAXED], [VatDataType::MIXED], ]; } /** * @throws Exception */ public static function invalidTypeDataProvider(): array { return [ [''], [null], [0], [1], [-1], [Random::str(20)], ]; } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testGetSetAmount($value): void { $instance = $this->getTestInstance(); $instance->setAmount($value); if (is_array($value)) { self::assertSame($value['value'], (int) $instance->getAmount()->getValue()); self::assertSame($value['currency'], $instance->amount->getCurrency()); } else { self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } $instance = $this->getTestInstance(); $instance->amount = $value; if (is_array($value)) { self::assertSame($value['value'], (int) $instance->getAmount()->getValue()); self::assertSame($value['currency'], $instance->amount->getCurrency()); } else { self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->setAmount($value); } /** * @throws Exception */ public static function validDataProvider(): array { return [ [ [ 'value' => Random::int(1, 1000), 'currency' => CurrencyCode::EUR, ], ], [new MonetaryAmount(Random::int(1, 10000), CurrencyCode::RUB)], ]; } /** * @throws Exception */ public static function invalidDataProvider(): array { return [ [''], [0], [1], [-1], [new stdClass()], [Random::str(20)], ]; } protected function getTestInstance(): MixedVatData { return new MixedVatData(); } /** * @param null $snakeCase * @param mixed $value */ protected function getAndSetTest($value, string $property, $snakeCase = null): void { $getter = 'get' . ucfirst($property); $setter = 'set' . ucfirst($property); $instance = $this->getTestInstance(); $instance->{$setter}($value); self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); if (null !== $snakeCase) { self::assertEquals($value, $instance->{$snakeCase}); } $instance = $this->getTestInstance(); $instance->{$property} = $value; self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); if (null !== $snakeCase) { self::assertEquals($value, $instance->{$snakeCase}); } if (null !== $snakeCase) { $instance = $this->getTestInstance(); $instance->{$snakeCase} = $value; self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); self::assertEquals($value, $instance->{$snakeCase}); } } } yookassa-sdk-php/tests/Request/Payments/PaymentData/B2b/Sberbank/UntaxedVatDataTest.php000064400000006640150364342670025144 0ustar00getType()); } /** * @dataProvider validTypeDataProvider */ public function testGetSetType(string $value): void { $this->getAndSetTest($value, 'type'); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testSetInvalidType($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setType($value); } /** * @throws Exception */ public static function validConstructDataProvider(): array { return [ [ [ 'type' => VatDataType::UNTAXED, ], ], ]; } /** * @throws Exception */ public static function validTypeDataProvider(): array { return [ [VatDataType::CALCULATED], [VatDataType::UNTAXED], [VatDataType::MIXED], ]; } /** * @throws Exception */ public static function invalidTypeDataProvider(): array { return [ [''], [null], [0], [1], [-1], [Random::str(20)], ]; } /** * @throws Exception */ public static function invalidDataProvider(): array { return [ [''], [0], [1], [-1], [new stdClass()], [Random::str(20)], ]; } protected function getTestInstance(): UntaxedVatData { return new UntaxedVatData(); } /** * @param null $snakeCase * @param mixed $value */ protected function getAndSetTest($value, string $property, $snakeCase = null): void { $getter = 'get' . ucfirst($property); $setter = 'set' . ucfirst($property); $instance = $this->getTestInstance(); $instance->{$setter}($value); self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); if (null !== $snakeCase) { self::assertEquals($value, $instance->{$snakeCase}); } $instance = $this->getTestInstance(); $instance->{$property} = $value; self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); if (null !== $snakeCase) { self::assertEquals($value, $instance->{$snakeCase}); } if (null !== $snakeCase) { $instance = $this->getTestInstance(); $instance->{$snakeCase} = $value; self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); self::assertEquals($value, $instance->{$snakeCase}); } } } yookassa-sdk-php/tests/Request/Payments/PaymentData/B2b/Sberbank/CalculatedVatDataTest.php000064400000014760150364342670025577 0ustar00getType()); self::assertEquals($value['rate'], $instance->getRate()); self::assertEquals($value['amount']->getValue(), $instance->getAmount()->getValue()); } /** * @dataProvider validTypeDataProvider */ public function testGetSetType(string $value): void { $this->getAndSetTest($value, 'type'); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testSetInvalidType($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setType($value); } /** * @throws Exception */ public static function validConstructDataProvider(): array { return [ [ [ 'type' => VatDataType::CALCULATED, 'rate' => VatDataRate::RATE_18, 'amount' => new MonetaryAmount(Random::int(1, 1000)), ], ], ]; } /** * @throws Exception */ public static function validTypeDataProvider(): array { return [ [VatDataType::CALCULATED], [VatDataType::UNTAXED], [VatDataType::MIXED], ]; } /** * @throws Exception */ public static function invalidTypeDataProvider(): array { return [ [''], [null], [0], [1], [-1], [Random::str(20)], ]; } /** * @dataProvider validRateDataProvider */ public function testGetSetRate(string $value): void { $this->getAndSetTest($value, 'rate'); } /** * @dataProvider invalidRateDataProvider * * @param mixed $value */ public function testSetInvalidRate($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setRate($value); } /** * @throws Exception */ public static function validRateDataProvider(): array { return [ [VatDataRate::RATE_7], [VatDataRate::RATE_10], [VatDataRate::RATE_18], [VatDataRate::RATE_20], ]; } /** * @throws Exception */ public static function invalidRateDataProvider(): array { return [ [''], [null], [0], [1], [-1], [Random::str(20)], ]; } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testGetSetAmount($value): void { $instance = $this->getTestInstance(); $instance->setAmount($value); if (is_array($value)) { self::assertSame($value['value'], (int) $instance->getAmount()->getValue()); self::assertSame($value['currency'], $instance->amount->getCurrency()); } else { self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } $instance = $this->getTestInstance(); $instance->amount = $value; if (is_array($value)) { self::assertSame($value['value'], (int) $instance->getAmount()->getValue()); self::assertSame($value['currency'], $instance->amount->getCurrency()); } else { self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->setAmount($value); } /** * @throws Exception */ public static function validDataProvider(): array { return [ [ [ 'value' => Random::int(1, 1000), 'currency' => CurrencyCode::EUR, ], ], [new MonetaryAmount(Random::int(1, 10000), CurrencyCode::RUB)], ]; } /** * @throws Exception */ public static function invalidDataProvider(): array { return [ [''], [0], [1], [-1], [new stdClass()], [Random::str(20)], ]; } protected function getTestInstance(): CalculatedVatData { return new CalculatedVatData(); } /** * @param null $snakeCase * @param mixed $value */ protected function getAndSetTest($value, string $property, $snakeCase = null): void { $getter = 'get' . ucfirst($property); $setter = 'set' . ucfirst($property); $instance = $this->getTestInstance(); $instance->{$setter}($value); self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); if (null !== $snakeCase) { self::assertEquals($value, $instance->{$snakeCase}); } $instance = $this->getTestInstance(); $instance->{$property} = $value; self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); if (null !== $snakeCase) { self::assertEquals($value, $instance->{$snakeCase}); } if (null !== $snakeCase) { $instance = $this->getTestInstance(); $instance->{$snakeCase} = $value; self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); self::assertEquals($value, $instance->{$snakeCase}); } } } yookassa-sdk-php/tests/Request/Payments/CreatePaymentRequestSerializerTest.php000064400000052426150364342670024073 0ustar00 'paymentToken', 'payment_method_id' => 'paymentMethodId', 'client_ip' => 'clientIp', 'merchant_customer_id' => 'merchantCustomerId', ]; /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSerialize($options): void { $serializer = new CreatePaymentRequestSerializer(); $instance = CreatePaymentRequest::builder()->build($options); $data = $serializer->serialize($instance); $expected = [ 'amount' => $options['amount'], ]; foreach ($this->fieldMap as $mapped => $field) { if (isset($options[$field])) { $value = $options[$field]; if (!empty($value)) { $expected[$mapped] = $value instanceof DateTime ? $value->format(YOOKASSA_DATE) : $value; } } } if (!empty($options['accountId']) && !empty($options['gatewayId'])) { $expected['recipient'] = [ 'account_id' => $options['accountId'], 'gateway_id' => $options['gatewayId'], ]; } if (!empty($options['confirmation'])) { $expected['confirmation'] = [ 'type' => $options['confirmation']->getType(), ]; if ($locale = $options['confirmation']->getLocale()) { $expected['confirmation']['locale'] = $locale; } if (ConfirmationType::REDIRECT === $options['confirmation']->getType()) { $expected['confirmation']['enforce'] = $options['confirmation']->enforce; $expected['confirmation']['return_url'] = $options['confirmation']->returnUrl; } if (ConfirmationType::MOBILE_APPLICATION === $options['confirmation']->getType()) { $expected['confirmation']['return_url'] = $options['confirmation']->returnUrl; } } if (!empty($options['paymentMethodData'])) { $expected['payment_method_data'] = [ 'type' => $options['paymentMethodData']->getType(), ]; switch ($options['paymentMethodData']['type']) { case PaymentMethodType::ALFABANK: $expected['payment_method_data']['login'] = $options['paymentMethodData']->getLogin(); break; case PaymentMethodType::APPLE_PAY: $expected['payment_method_data']['payment_data'] = $options['paymentMethodData']->getPaymentData(); break; case PaymentMethodType::GOOGLE_PAY: $expected['payment_method_data']['payment_method_token'] = $options['paymentMethodData']->getPaymentMethodToken(); $expected['payment_method_data']['google_transaction_id'] = $options['paymentMethodData']->getGoogleTransactionId(); break; case PaymentMethodType::BANK_CARD: $expected['payment_method_data']['card'] = [ 'number' => $options['paymentMethodData']->getCard()->getNumber(), 'expiry_year' => $options['paymentMethodData']->getCard()->getExpiryYear(), 'expiry_month' => $options['paymentMethodData']->getCard()->getExpiryMonth(), 'csc' => $options['paymentMethodData']->getCard()->getCsc(), 'cardholder' => $options['paymentMethodData']->getCard()->getCardholder(), ]; break; case PaymentMethodType::MOBILE_BALANCE: case PaymentMethodType::CASH: case PaymentMethodType::SBERBANK: case PaymentMethodType::QIWI: $expected['payment_method_data']['phone'] = $options['paymentMethodData']->getPhone(); break; case PaymentMethodType::B2B_SBERBANK: /** @var PaymentDataB2bSberbank $paymentMethodData */ $paymentMethodData = $options['paymentMethodData']; $expected['payment_method_data']['payment_purpose'] = $paymentMethodData->getPaymentPurpose(); $expected['payment_method_data']['vat_data'] = $paymentMethodData->getVatData()->toArray(); break; } } if (!empty($options['metadata'])) { $expected['metadata'] = []; foreach ($options['metadata'] as $key => $value) { $expected['metadata'][$key] = $value; } } if (!empty($options['receipt']['items'])) { $expected['receipt'] = ['items' => []]; foreach ($options['receipt']['items'] as $item) { $itemArray = $item; if (!empty($item['payment_subject'])) { $itemArray['payment_subject'] = $item['payment_subject']; } if (!empty($item['payment_mode'])) { $itemArray['payment_mode'] = $item['payment_mode']; } if (!empty($item['payment_subject_industry_details'])) { $itemArray['payment_subject_industry_details'] = $item['payment_subject_industry_details']; } $expected['receipt']['items'][] = $itemArray; } if (!empty($options['receipt']['customer'])) { $expected['receipt']['customer'] = $options['receipt']['customer']; } if (!empty($options['receipt']['tax_system_code'])) { $expected['receipt']['tax_system_code'] = $options['receipt']['tax_system_code']; } } if (array_key_exists('capture', $options)) { $expected['capture'] = (bool) $options['capture']; } if (array_key_exists('savePaymentMethod', $options) && isset($options['savePaymentMethod'])) { $expected['save_payment_method'] = (bool) $options['savePaymentMethod']; } if (!empty($options['description'])) { $expected['description'] = $options['description']; } if (!empty($options['airline'])) { $expected['airline'] = [ 'booking_reference' => $options['airline']['booking_reference'], 'ticket_number' => $options['airline']['ticket_number'], 'passengers' => array_map(static function ($passenger) { return [ 'first_name' => $passenger['first_name'], 'last_name' => $passenger['last_name'], ]; }, $options['airline']['passengers']), 'legs' => array_map(static function ($leg) { return [ 'departure_airport' => $leg['departure_airport'], 'destination_airport' => $leg['destination_airport'], 'departure_date' => $leg['departure_date'] instanceof DateTime ? $leg['departure_date']->format(Leg::ISO8601) : $leg['departure_date'], ]; }, $options['airline']['legs']), ]; } if (!empty($options['transfers'])) { $expected['transfers'] = []; foreach ($options['transfers'] as $item) { $itemArray = $item; if (!empty($item['account_id'])) { $itemArray['account_id'] = $item['account_id']; } if (!empty($item['amount'])) { $itemArray['amount'] = $item['amount']; } if (!empty($item['status'])) { $itemArray['status'] = $item['status']; } if (!empty($item['platform_fee_amount'])) { $itemArray['platform_fee_amount'] = $item['platform_fee_amount']; } if (!empty($item['description'])) { $itemArray['description'] = $item['description']; } if (!empty($item['metadata'])) { $itemArray['metadata'] = $item['metadata']; } $expected['transfers'][] = $itemArray; } } if (!empty($options['deal'])) { $expected['deal'] = $options['deal']; } if (!empty($options['merchant_customer_id'])) { $expected['merchant_customer_id'] = $options['merchant_customer_id']; } self::assertEquals($expected, $data); } /** * @throws Exception */ public function validDataProvider(): array { $airline = new Airline(); $airline->setBookingReference(Random::str(10)); $airline->setTicketNumber(Random::int(10)); $leg = new Leg(); $leg->setDepartureAirport(Random::str(3, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')); $leg->setDestinationAirport(Random::str(3, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')); $leg->setDepartureDate('2018-12-31'); $airline->setLegs([$leg]); $passenger = new Passenger(); $passenger->setFirstName(Random::str(10)); $passenger->setLastName(Random::str(10)); $airline->setPassengers([$passenger]); $amount = Random::float(10, 999); $result = [ [ [ 'amount' => [ 'value' => sprintf('%.2f', round($amount, 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'paymentToken' => Random::str(36), 'receipt' => [ 'items' => [ [ 'description' => Random::str(10), 'quantity' => (float) Random::int(1, 10), 'amount' => [ 'value' => (float) Random::int(100, 100), 'currency' => CurrencyCode::RUB, ], 'vat_code' => Random::int(1, 6), 'payment_subject' => PaymentSubject::COMMODITY, 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, 'payment_subject_industry_details' => [ [ 'federal_id' => '001', 'document_date' => date('Y-m-d', Random::int(100000000, 200000000)), 'document_number' => Random::str(1, IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH), 'value' => Random::str(1, IndustryDetails::VALUE_MAX_LENGTH), ] ] ], ], 'customer' => [ 'email' => 'johndoe@yoomoney.ru', ], 'tax_system_code' => Random::int(1, 6), ], 'description' => Random::str(10), 'capture' => true, 'savePaymentMethod' => null, 'airline' => [ 'booking_reference' => Random::str(10), 'ticket_number' => Random::int(10), 'passengers' => [ [ 'first_name' => Random::str(10, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 'last_name' => Random::str(10, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), ], ], 'legs' => [ [ 'departure_airport' => Random::str(3, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 'destination_airport' => Random::str(3, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 'departure_date' => '2020-01-01', ], ], ], 'transfers' => [ [ 'account_id' => (string) Random::int(11111111, 99999999), 'amount' => [ 'value' => sprintf('%.2f', round($amount, 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'status' => Random::value(TransferStatus::getValidValues()), 'platform_fee_amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'description' => Random::str(1, Transfer::MAX_LENGTH_DESCRIPTION), 'metadata' => ['test' => Random::str(10, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')], 'release_funds' => Random::bool(), ], ], 'deal' => [ 'id' => Random::str(36, 50), 'settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ] ], ], 'merchant_customer_id' => Random::str(36, Payment::MAX_LENGTH_MERCHANT_CUSTOMER_ID), ], ], ]; $confirmations = [ new ConfirmationAttributesExternal(), new ConfirmationAttributesRedirect(), new ConfirmationAttributesMobileApplication(), ]; $paymentData = [ new PaymentDataSbp(), new PaymentDataApplePay(), new PaymentDataGooglePay(), new PaymentDataBankCard(), new PaymentDataMobileBalance(['phone' => Random::str(11, '0123456789')]), new PaymentDataQiwi(['phone' => Random::str(11, '0123456789')]), new PaymentDataSberbank(['phone' => Random::str(11, '0123456789')]), new PaymentDataCash(['phone' => Random::str(11, '0123456789')]), new PaymentDataYooMoney(), new PaymentDataInstallments(), new PaymentDataB2bSberbank(['payment_purpose' => Random::str(16), 'vat_data' => ['type' => VatDataType::UNTAXED]]), ]; $paymentData[1]->setPaymentData(Random::str(10)); $paymentData[2]->setPaymentMethodToken(Random::str(10)); $paymentData[2]->setGoogleTransactionId(Random::str(10)); $card = new PaymentDataBankCardCard(); $card->setNumber(Random::str(16, '0123456789')); $card->setExpiryYear(Random::int(2000, 2200)); $card->setExpiryMonth(Random::value(['01', '02', '03', '04', '05', '06', '07', '08', '09', '11', '12'])); $card->setCsc(Random::str(4, '0123456789')); $card->setCardholder(Random::str(26, 'abcdefghijklmnopqrstuvwxyz')); $paymentData[3]->setCard($card); $paymentData[4]->setPhone(Random::str(14, '0123456789')); $paymentData[6]->setPhone(Random::str(14, '0123456789')); /** @var PaymentDataB2bSberbank $paymentData [10] */ $paymentDataB2bSberbank = new PaymentDataB2bSberbank(); $paymentDataB2bSberbank->setPaymentPurpose(Random::str(10)); $paymentDataB2bSberbank->setVatData([ 'type' => VatDataType::CALCULATED, 'rate' => VatDataRate::RATE_10, 'amount' => [ 'value' => Random::int(1, 10000), 'currency' => CurrencyCode::USD, ], ]); $paymentData[10] = $paymentDataB2bSberbank; $confirmations[0]->setLocale('en_US'); $confirmations[1]->setEnforce(true); $confirmations[1]->setReturnUrl('https://test.com'); $confirmations[2]->setReturnUrl('https://test.ru'); foreach ($paymentData as $i => $paymentMethodData) { $request = [ 'accountId' => uniqid('', true), 'gatewayId' => uniqid('', true), 'amount' => [ 'value' => sprintf('%.2f', round($amount, 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'referenceId' => uniqid('', true), 'paymentMethodData' => $paymentData[$i], 'confirmation' => Random::value($confirmations), 'savePaymentMethod' => Random::bool(), 'capture' => (bool)Random::int(0, 1), 'clientIp' => long2ip(Random::int(0, 2 ** 32)), 'metadata' => ['test' => uniqid('', true)], 'receipt' => [ 'items' => $this->getReceiptItem($i + 1), 'customer' => [ 'email' => 'johndoe@yoomoney.ru', 'phone' => Random::str(12, '0123456789'), ], 'tax_system_code' => Random::int(1, 6), ], 'airline' => $airline->toArray(), 'deal' => [ 'id' => Random::str(36, 50), 'settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ] ], ], 'merchant_customer_id' => Random::str(36, Payment::MAX_LENGTH_MERCHANT_CUSTOMER_ID), ]; $result[] = [$request]; } return $result; } /** * @param mixed $count * * @return array */ private function getReceiptItem(mixed $count): array { $result = []; for ($i = 0; $i < $count; $i++) { $result[] = [ 'description' => Random::str(10), 'quantity' => (float) Random::float(1, 100), 'amount' => [ 'value' => (float) Random::int(1, 100), 'currency' => CurrencyCode::RUB, ], 'vat_code' => Random::int(1, 6), 'payment_subject' => PaymentSubject::COMMODITY, 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, 'payment_subject_industry_details' => [ [ 'federal_id' => '001', 'document_date' => date('Y-m-d', Random::int(100000000, 200000000)), 'document_number' => Random::str(1, IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH), 'value' => Random::str(1, IndustryDetails::VALUE_MAX_LENGTH), ] ] ]; } return $result; } } yookassa-sdk-php/tests/Request/Payments/AirlineTest.php000064400000013671150364342670017311 0ustar00notEmpty()); $airline->setBookingReference($data['booking_reference']); $airline->setTicketNumber($data['ticket_number']); $airline->setPassengers($data['passengers']); $airline->setLegs($data['legs']); self::assertEquals($airline->getBookingReference(), $data['booking_reference']); self::assertEquals($airline->getTicketNumber(), $data['ticket_number']); self::assertIsArray($airline->getPassengers()->getItems()->toArray()); self::assertIsArray($airline->getLegs()->getItems()->toArray()); foreach ($airline->getLegs() as $leg) { self::assertInstanceOf(LegInterface::class, $leg); } foreach ($airline->getPassengers() as $passenger) { self::assertInstanceOf(PassengerInterface::class, $passenger); } self::assertTrue($airline->notEmpty()); } /** * @dataProvider validDataProvider * * @param mixed $data */ public function testFromArrayInstantiate($data): void { $airline = new Airline($data); self::assertEquals($airline->getBookingReference(), $data['booking_reference']); self::assertEquals($airline->getTicketNumber(), $data['ticket_number']); self::assertIsArray($airline->getPassengers()->getItems()->toArray()); self::assertIsArray($airline->getLegs()->getItems()->toArray()); foreach ($airline->getLegs() as $leg) { self::assertInstanceOf(LegInterface::class, $leg); } foreach ($airline->getPassengers() as $passenger) { self::assertInstanceOf(PassengerInterface::class, $passenger); } self::assertTrue($airline->notEmpty()); } /** * @dataProvider validDataProvider * * @param mixed $data */ public function testAddLeg($data): void { $airline = new Airline(); foreach ($data['legs'] as $leg) { $airline->getLegs()->add($leg); } foreach ($airline->getLegs() as $leg) { self::assertInstanceOf(LegInterface::class, $leg); } self::assertTrue($airline->notEmpty()); } /** * @dataProvider exceptionDataProvider * * @param mixed $data */ public function testAirlinePassengersDataValidate($data): void { $airline = new Airline(); $this->expectException($data['exception']); $airline->setPassengers($data['value']); } /** * @dataProvider exceptionDataProvider * * @param mixed $data */ public function testAirlineLegsDataValidate($data): void { $airline = new Airline(); $this->expectException($data['exception']); $airline->setLegs($data['value']); } /** * @dataProvider stringsExceptionDataProvider * * @param mixed $data */ public function testBookingReferenceValidate($data): void { $airline = new Airline(); $this->expectException($data['exception']); $airline->setBookingReference($data['value']); } /** * @dataProvider stringsExceptionDataProvider * * @param mixed $data * @throws Exception */ public function testTicketNumberValidate($data): void { $airline = new Airline(); $this->expectException($data['exception']); $airline->setTicketNumber($data['value']); } public static function validDataProvider() { $passenger = new Passenger(); $passenger->setFirstName('SERGEI'); $passenger->setLastName('IVANOV'); $leg = new Leg(); $leg->setDepartureAirport('LED'); $leg->setDestinationAirport('AMS'); $leg->setDepartureDate('2018-06-20'); return [ [ [ 'booking_reference' => 'IIIKRV', 'ticket_number' => '12342123413', 'passengers' => [ [ 'first_name' => 'SERGEI', 'last_name' => 'IVANOV', ], ], 'legs' => [ [ 'departure_airport' => 'LED', 'destination_airport' => 'AMS', 'departure_date' => '2018-06-20', ], ], ], ], [ [ 'booking_reference' => '123', 'ticket_number' => '321', 'passengers' => [ $passenger, ], 'legs' => [ $leg, ], ], ], ]; } public static function exceptionDataProvider() { return [ [ [ 'exception' => \InvalidArgumentException::class, 'value' => new \stdClass(), ], ], ]; } public static function stringsExceptionDataProvider() { return [ [ [ 'exception' => InvalidPropertyValueException::class, 'value' => Random::str(151, 160), ], ], ]; } } yookassa-sdk-php/tests/Request/Payments/CreateCaptureRequestTest.php000064400000013637150364342670022030 0ustar00hasAmount()); self::assertNull($instance->getAmount()); self::assertNull($instance->amount); $instance->setAmount($options['amount']); self::assertTrue($instance->hasAmount()); self::assertSame($options['amount'], $instance->getAmount()); self::assertSame($options['amount'], $instance->amount); $instance = new CreateCaptureRequest(); self::assertFalse($instance->hasAmount()); self::assertNull($instance->getAmount()); self::assertNull($instance->amount); $instance->amount = $options['amount']; self::assertTrue($instance->hasAmount()); self::assertSame($options['amount'], $instance->getAmount()); self::assertSame($options['amount'], $instance->amount); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testDeal($options): void { $instance = new CreateCaptureRequest(); self::assertFalse($instance->hasDeal()); self::assertNull($instance->getDeal()); self::assertNull($instance->deal); $instance->setDeal($options['deal']); if ($instance->hasDeal()) { self::assertTrue($instance->hasDeal()); self::assertSame($options['deal'], $instance->getDeal()->toArray()); self::assertSame($options['deal'], $instance->deal->toArray()); } else { self::assertFalse($instance->hasDeal()); self::assertSame($options['deal'], $instance->getDeal()); self::assertSame($options['deal'], $instance->deal); } $instance = new CreateCaptureRequest(); self::assertFalse($instance->hasDeal()); self::assertNull($instance->getDeal()); self::assertNull($instance->deal); $instance->deal = $options['deal']; if ($instance->hasDeal()) { self::assertTrue($instance->hasDeal()); self::assertSame($options['deal'], $instance->getDeal()->toArray()); self::assertSame($options['deal'], $instance->deal->toArray()); } else { self::assertFalse($instance->hasDeal()); self::assertSame($options['deal'], $instance->getDeal()); self::assertSame($options['deal'], $instance->deal); } } public function testValidate(): void { $instance = new CreateCaptureRequest(); self::assertTrue($instance->validate()); $amount = new MonetaryAmount(); $instance->setAmount($amount); self::assertFalse($instance->validate()); $amount->setValue(1); self::assertTrue($instance->validate()); $receipt = new Receipt(); $receipt->setItems([ [ 'description' => Random::str(10), 'quantity' => (float) Random::int(1, 10), 'amount' => [ 'value' => round(Random::float(1, 100), 2), 'currency' => CurrencyCode::RUB, ], 'vat_code' => Random::int(1, 6), 'payment_subject' => PaymentSubject::COMMODITY, 'payment_mode' => PaymentMode::PARTIAL_PREPAYMENT, ], ]); $instance->setReceipt($receipt); $item = new ReceiptItem(); $item->setPrice(new ReceiptItemAmount(10)); $item->setDescription('test'); $receipt->addItem($item); self::assertFalse($instance->validate()); $receipt->getCustomer()->setPhone('123123'); self::assertTrue($instance->validate()); $item->setVatCode(3); self::assertTrue($instance->validate()); $receipt->setTaxSystemCode(4); self::assertTrue($instance->validate()); self::assertNotNull($instance->getReceipt()); $instance->removeReceipt(); self::assertTrue($instance->validate()); self::assertNull($instance->getReceipt()); $instance->setAmount(new MonetaryAmount()); self::assertFalse($instance->validate()); } public function testBuilder(): void { $builder = CreateCaptureRequest::builder(); self::assertInstanceOf(CreateCaptureRequestBuilder::class, $builder); } public static function validDataProvider(): array { $result = []; $currencies = CurrencyCode::getValidValues(); for ($i = 0; $i < 10; $i++) { $request = [ 'amount' => new MonetaryAmount(Random::int(1, 1000000), $currencies[Random::int(0, count($currencies) - 1)]), 'deal' => $i % 2 ? [ 'settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ] ], ] : null, ]; $result[] = [$request]; } return $result; } } yookassa-sdk-php/tests/Request/Payments/PaymentsRequestSerializerTest.php000064400000006623150364342670023130 0ustar00 'created_at.gte', 'createdAtGt' => 'created_at.gt', 'createdAtLte' => 'created_at.lte', 'createdAtLt' => 'created_at.lt', 'capturedAtGte' => 'captured_at.gte', 'capturedAtGt' => 'captured_at.gt', 'capturedAtLte' => 'captured_at.lte', 'capturedAtLt' => 'captured_at.lt', 'status' => 'status', 'paymentMethod' => 'payment_method', 'limit' => 'limit', 'cursor' => 'cursor', ]; /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSerialize(mixed $options): void { $serializer = new PaymentsRequestSerializer(); $data = $serializer->serialize(PaymentsRequest::builder()->build($options)); $expected = []; foreach ($this->fieldMap as $field => $mapped) { if (isset($options[$field])) { $value = $options[$field]; if (!empty($value)) { $expected[$mapped] = $value instanceof DateTime ? $value->format(YOOKASSA_DATE) : $value; } } } self::assertEquals($expected, $data); } public function validDataProvider(): array { $result = [ [ [], ], [ [ 'createdAtGte' => '', 'createdAtGt' => '', 'createdAtLte' => '', 'createdAtLt' => '', 'capturedAtGte' => '', 'capturedAtGt' => '', 'capturedAtLte' => '', 'capturedAtLt' => '', 'paymentMethod' => '', 'status' => '', 'limit' => 1, 'cursor' => '', ], ], ]; $statuses = PaymentStatus::getValidValues(); $methods = PaymentMethodType::getValidValues(); for ($i = 0; $i < 10; $i++) { $request = [ 'createdAtGte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtGt' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLte' => date(YOOKASSA_DATE, Random::int(1, time())), 'createdAtLt' => date(YOOKASSA_DATE, Random::int(1, time())), 'capturedAtGte' => date(YOOKASSA_DATE, Random::int(1, time())), 'capturedAtGt' => date(YOOKASSA_DATE, Random::int(1, time())), 'capturedAtLte' => date(YOOKASSA_DATE, Random::int(1, time())), 'capturedAtLt' => date(YOOKASSA_DATE, Random::int(1, time())), 'paymentMethod' => $methods[Random::int(0, count($methods) - 1)], 'status' => $statuses[Random::int(0, count($statuses) - 1)], 'limit' => Random::int(1, 100), 'cursor' => Random::str(Random::int(2, 30)), ]; $result[] = [$request]; } return $result; } } yookassa-sdk-php/tests/Request/Payments/FraudDataTest.php000064400000003564150364342670017561 0ustar00setToppedUpPhone($options['topped_up_phone']); self::assertEquals($options['topped_up_phone'], $instance->getToppedUpPhone()); self::assertEquals($options['topped_up_phone'], $instance->topped_up_phone); $instance = new FraudData(); $instance->topped_up_phone = $options['topped_up_phone']; self::assertEquals($options['topped_up_phone'], $instance->getToppedUpPhone()); self::assertEquals($options['topped_up_phone'], $instance->topped_up_phone); } /** * @dataProvider invalidDataProvider * * @param mixed $value * @throws Exception */ public function testSetInvalidToppedUpPhone($value): void { $this->expectException(InvalidArgumentException::class); $instance = new FraudData(); $instance->setToppedUpPhone($value); } public static function validDataProvider() { $result = []; $result[] = [['topped_up_phone' => null]]; $result[] = [['topped_up_phone' => '']]; for ($i = 0; $i < 10; $i++) { $payment = [ 'topped_up_phone' => Random::str(4, 15, '0123456789'), ]; $result[] = [$payment]; } return $result; } public static function invalidDataProvider() { return [ [Random::str(1, 3, '0123456789')], [Random::str(16, 30, '0123456789')], [Random::str(4, 16)], ]; } } yookassa-sdk-php/tests/Request/Payments/PaymentResponseTest.php000064400000000466150364342670021060 0ustar00setFirstName($name); self::assertEquals($name, $instance->getFirstName()); self::assertEquals($name, $instance->firstName); self::assertEquals($name, $instance->first_name); } /** * @dataProvider validDataProvider * * @param mixed $name */ public function testGetSetLastName($name): void { $instance = self::getInstance(); $instance->setLastName($name); self::assertEquals($name, $instance->getLastName()); self::assertEquals($name, $instance->lastName); self::assertEquals($name, $instance->last_name); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value * @throws Exception */ public function testSetInvalidFirstName($value, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->setFirstName($value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value * @throws Exception */ public function testSetterInvalidLastName($value, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->setLastName($value); } /** * @throws Exception */ public static function validDataProvider(): array { $alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; return [ [ 'firstName' => Random::str(1, null, $alphabet), 'lastName' => Random::str(1, null, $alphabet), ], [ 'firstName' => Random::str(64, null, $alphabet), 'lastName' => Random::str(64, null, $alphabet), ], ]; } /** * @throws Exception */ public static function invalidValueDataProvider(): array { return [ [Random::str(65), InvalidPropertyValueException::class], [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], ]; } /** * @dataProvider validDataProvider */ public function testJsonSerialize(string $firstName, string $lastName): void { $instance = self::getInstance(); $instance->setFirstName($firstName); $instance->setLastName($lastName); $expected = [ 'first_name' => $firstName, 'last_name' => $lastName, ]; self::assertEquals($expected, $instance->jsonSerialize()); } protected static function getInstance(): Passenger { return new Passenger(); } } yookassa-sdk-php/tests/Request/Payments/CreatePaymentResponseTest.php000064400000000516150364342670022200 0ustar00setDepartureAirport($data['departure_airport']); $leg->setDestinationAirport($data['destination_airport']); $leg->setDepartureDate($data['departure_date']); $leg->setCarrierCode($data['carrier_code']); self::assertEquals($data['departure_airport'], $leg->getDepartureAirport()); self::assertEquals($data['destination_airport'], $leg->getDestinationAirport()); self::assertEquals($data['carrier_code'], $leg->getCarrierCode()); } /** * @dataProvider invalidDataProvider * * @param mixed $data */ public function testDepartureAirportValidate($data): void { $leg = new Leg(); $this->expectException($data['exception']); $leg->setDepartureAirport($data['value']); } /** * @dataProvider invalidDataProvider * * @param mixed $data */ public function testDestinationAirportValidate($data): void { $leg = new Leg(); $this->expectException($data['exception']); $leg->setDestinationAirport($data['value']); } /** * @dataProvider invalidDataProvider * * @param mixed $data * @throws Exception */ public function testDepartureDateValidate($data): void { $leg = new Leg(); $this->expectException($data['exception']); $leg->setDepartureDate($data['value']); } public static function validDataProvider() { return [ [ [ 'departure_airport' => 'LED', 'destination_airport' => 'AMS', 'departure_date' => '2018-06-20', 'carrier_code' => 'AN', ], ], [ [ 'departure_airport' => 'UGR', 'destination_airport' => 'IVA', 'departure_date' => '2018-06-21', 'carrier_code' => 'TW', ], ], ]; } public static function invalidDataProvider() { return [ [ [ 'exception' => InvalidPropertyValueException::class, 'value' => 'stringThatGreaterThanNeededCharsLongAndActuallyNotValidAtAll123', ], ], ]; } } yookassa-sdk-php/tests/Request/Payments/TransferDataTest.php000064400000022313150364342670020275 0ustar00getTestInstance(); $instance->fromArray($value); self::assertSame($value['account_id'], $instance->getAccountId()); self::assertSame($value['account_id'], $instance->accountId); self::assertSame($value['amount'], $instance->getAmount()->jsonSerialize()); self::assertSame($value['amount'], $instance->amount->jsonSerialize()); self::assertSame($value['platform_fee_amount'], $instance->getPlatformFeeAmount()->jsonSerialize()); self::assertSame($value['platform_fee_amount'], $instance->platform_fee_amount->jsonSerialize()); self::assertSame($value['description'], $instance->getDescription()); self::assertSame($value['description'], $instance->description); if (!empty($value['metadata'])) { self::assertSame($value['metadata'], $instance->getMetadata()->toArray()); self::assertSame($value['metadata'], $instance->metadata->toArray()); self::assertSame($value, $instance->jsonSerialize()); } self::assertInstanceOf(TransferData::class, $instance); } /** * @dataProvider validDataProvider */ public function testGetSetAccountId(array $value): void { $instance = $this->getTestInstance(); $instance->setAccountId($value['account_id']); self::assertSame($value['account_id'], $instance->getAccountId()); self::assertSame($value['account_id'], $instance->accountId); } /** * @dataProvider validDataProvider */ public function testSetterAccountId(mixed $value): void { $instance = $this->getTestInstance(); $instance->accountId = $value['account_id']; self::assertSame($value['account_id'], $instance->getAccountId()); self::assertSame($value['account_id'], $instance->accountId); } /** * @throws Exception */ public static function validDataProvider(): array { $result = [ [ 'account_id' => '123', 'amount' => [ 'value' => '10.00', 'currency' => 'RUB', ], 'platform_fee_amount' => [ 'value' => '10.00', 'currency' => 'RUB', ], 'description' => 'Заказ маркетплейса №1', 'metadata' => null, ], ]; for ($i = 0; $i < 10; $i++) { $result[] = [ 'account_id' => (string) Random::int(11111111, 99999999), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'platform_fee_amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'description' => Random::str(2, TransferData::MAX_LENGTH_DESCRIPTION), 'metadata' => [ Random::str(2, 16) => Random::str(2, 512), ], ]; } return [$result]; } /** * @dataProvider invalidAccountIdProvider * * @param mixed $value */ public function testGetSetInvalidAccountId($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setAccountId($value); } /** * @dataProvider invalidAccountIdProvider * * @param mixed $value */ public function testSetterInvalidAccountId($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->accountId = $value; } /** * @dataProvider invalidMetadataProvider * * @param mixed $value */ public function testInvalidMetadata($value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->setMetadata($value); } public static function invalidAccountIdProvider(): array { return [ [null], ]; } /** * @dataProvider validAmountDataProvider * * @param mixed $value */ public function testGetSetAmount($value): void { $instance = $this->getTestInstance(); $instance->setAmount($value); self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } /** * @dataProvider validAmountDataProvider */ public function testSetterAmount(AmountInterface $value): void { $instance = $this->getTestInstance(); $instance->amount = $value; self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } /** * @dataProvider validAmountDataProvider * * @param mixed $value */ public function testGetSetPlatformFeeAmount($value): void { $instance = $this->getTestInstance(); $instance->setPlatformFeeAmount($value); self::assertSame($value, $instance->getPlatformFeeAmount()); self::assertSame($value, $instance->platform_fee_amount); } /** * @dataProvider validAmountDataProvider */ public function testSetterPlatformFeeAmount(AmountInterface $value): void { $instance = $this->getTestInstance(); $instance->platform_fee_amount = $value; self::assertSame($value, $instance->getPlatformFeeAmount()); self::assertSame($value, $instance->platform_fee_amount); } /** * @return MonetaryAmount[][] * * @throws Exception */ public static function validAmountDataProvider(): array { return [ [ new MonetaryAmount( Random::int(1, 100), Random::value(CurrencyCode::getValidValues()) ), ], [ new MonetaryAmount(), ], ]; } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setAmount($value); } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetterInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->amount = $value; } /** * @dataProvider invalidAmountWithoutNullDataProvider * * @param mixed $value */ public function testSetInvalidPlatformFeeAmount($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setPlatformFeeAmount($value); } /** * @dataProvider invalidAmountWithoutNullDataProvider * * @param mixed $value */ public function testSetterInvalidPlatformFeeAmount($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->platform_fee_amount = $value; } public static function invalidAmountDataProvider(): array { return [ [null], [new stdClass()], ]; } public static function invalidAmountWithoutNullDataProvider(): array { return [ [new stdClass()], ]; } public function testSetInvalidLengthDescription(): void { $this->expectException(InvalidArgumentException::class); $instance = new TransferData(); $description = Random::str(TransferData::MAX_LENGTH_DESCRIPTION + 1); $instance->setDescription($description); } /** * @dataProvider validDataProvider */ public function testGetSetMetadata(array $options): void { $instance = $this->getTestInstance(); $instance->setMetadata($options['metadata']); self::assertSame($options['metadata'], $instance->getMetadata()); self::assertSame($options['metadata'], $instance->metadata); $instance = $this->getTestInstance(); $instance->metadata = $options['metadata']; self::assertSame($options['metadata'], $instance->getMetadata()); self::assertSame($options['metadata'], $instance->metadata); } /** * @throws Exception */ public static function invalidMetadataProvider(): array { return [ [[new stdClass()]], ]; } protected function getTestInstance(): TransferData { return new TransferData(); } } yookassa-sdk-php/tests/Request/SelfEmployed/SelfEmployedRequestSerializerTest.php000064400000004136150364342670024505 0ustar00build($options); $data = $serializer->serialize($instance); $expected = [ 'itn' => $options['itn'], 'phone' => $options['phone'], ]; if (!empty($options['confirmation'])) { $expected['confirmation'] = $options['confirmation']; } self::assertEquals($expected, $data); } /** * @throws Exception */ public static function validDataProvider(): array { $result = [ [ [ 'itn' => Random::str(12, '0123456789'), 'phone' => Random::str(4, 15, '0123456789'), 'confirmation' => ['type' => Random::value(SelfEmployedConfirmationType::getEnabledValues())], ], ], [ [ 'itn' => Random::str(12, '0123456789'), 'phone' => Random::str(4, 15, '0123456789'), 'confirmation' => ['type' => Random::value(SelfEmployedConfirmationType::getEnabledValues())], ], ], ]; for ($i = 0; $i < 10; $i++) { $request = [ 'itn' => Random::str(12, '0123456789'), 'phone' => Random::str(4, 15, '0123456789'), 'confirmation' => ['type' => Random::value(SelfEmployedConfirmationType::getEnabledValues())], ]; $result[] = [$request]; } return $result; } } yookassa-sdk-php/tests/Request/SelfEmployed/SelfEmployedResponseTest.php000064400000026743150364342670022631 0ustar00setId($options['id']); self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); $instance = new SelfEmployedResponse(); $instance->id = $options['id']; self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployedResponse(); $instance->setId($value['id']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployedResponse(); $instance->id = $value['id']; } /** * @dataProvider validDataProvider */ public function testGetSetStatus(array $options): void { $instance = new SelfEmployedResponse(); $instance->setStatus($options['status']); self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); $instance = new SelfEmployedResponse(); $instance->status = $options['status']; self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployedResponse(); $instance->setStatus($value['status']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployedResponse(); $instance->status = $value['status']; } /** * @dataProvider validDataProvider */ public function testGetSetTest(array $options): void { $instance = new SelfEmployedResponse(); $instance->setTest($options['test']); self::assertSame($options['test'], $instance->getTest()); self::assertSame($options['test'], $instance->test); $instance = new SelfEmployedResponse(); $instance->test = $options['test']; self::assertSame($options['test'], $instance->getTest()); self::assertSame($options['test'], $instance->test); } /** * @dataProvider validDataProvider */ public function testGetSetPhone(array $options): void { $instance = new SelfEmployedResponse(); $instance->setPhone($options['phone']); self::assertSame($options['phone'], $instance->getPhone()); self::assertSame($options['phone'], $instance->phone); $instance = new SelfEmployedResponse(); $instance->phone = $options['phone']; self::assertSame($options['phone'], $instance->getPhone()); self::assertSame($options['phone'], $instance->phone); } /** * @dataProvider validDataProvider */ public function testGetSetItn(array $options): void { $instance = new SelfEmployedResponse(); $instance->setItn($options['itn']); self::assertSame($options['itn'], $instance->getItn()); self::assertSame($options['itn'], $instance->itn); $instance = new SelfEmployedResponse(); $instance->itn = $options['itn']; self::assertSame($options['itn'], $instance->getItn()); self::assertSame($options['itn'], $instance->itn); } /** * @dataProvider validDataProvider */ public function testGetSetCreatedAt(array $options): void { $instance = new SelfEmployedResponse(); $instance->setCreatedAt($options['created_at']); self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); $instance = new SelfEmployedResponse(); $instance->createdAt = $options['created_at']; self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); $instance = new SelfEmployedResponse(); $instance->created_at = $options['created_at']; self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployedResponse(); $instance->setCreatedAt($value['created_at']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployedResponse(); $instance->createdAt = $value['created_at']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployedResponse(); $instance->created_at = $value['created_at']; } /** * @dataProvider validDataProvider */ public function testGetSetConfirmation(array $options): void { $instance = new SelfEmployedResponse(); $instance->setConfirmation($options['confirmation']); if (is_array($options['confirmation'])) { self::assertSame($options['confirmation'], $instance->getConfirmation()->toArray()); self::assertSame($options['confirmation'], $instance->confirmation->toArray()); } else { self::assertSame($options['confirmation'], $instance->getConfirmation()); self::assertSame($options['confirmation'], $instance->confirmation); } $instance = new SelfEmployedResponse(); $instance->confirmation = $options['confirmation']; if (is_array($options['confirmation'])) { self::assertSame($options['confirmation'], $instance->getConfirmation()->toArray()); self::assertSame($options['confirmation'], $instance->confirmation->toArray()); } else { self::assertSame($options['confirmation'], $instance->getConfirmation()); self::assertSame($options['confirmation'], $instance->confirmation); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidConfirmation($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployedResponse(); $instance->confirmation = $value['confirmation']; } public static function validDataProvider(): array { $result = []; $confirmTypes = SelfEmployedConfirmationType::getValidValues(); $confirmFactory = new SelfEmployedConfirmationFactory(); $result[] = [ [ 'id' => Random::str(36, 50), 'status' => Random::value(SelfEmployedStatus::getValidValues()), 'test' => Random::bool(), 'itn' => null, 'phone' => Random::str(4, 15, '0123456789'), 'created_at' => date(YOOKASSA_DATE, Random::int(111111111, time())), 'confirmation' => ['type' => Random::value($confirmTypes)], ], ]; $result[] = [ [ 'id' => Random::str(36, 50), 'status' => Random::value(SelfEmployedStatus::getValidValues()), 'test' => Random::bool(), 'itn' => Random::str(12, '0123456789'), 'phone' => null, 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'confirmation' => null, ], ]; for ($i = 0; $i < 20; $i++) { $payment = [ 'id' => Random::str(36, 50), 'status' => Random::value(SelfEmployedStatus::getValidValues()), 'test' => Random::bool(), 'itn' => Random::str(12, '0123456789'), 'phone' => Random::str(4, 15, '0123456789'), 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'confirmation' => $confirmFactory->factory(Random::value($confirmTypes)), ]; $result[] = [$payment]; } return $result; } public static function invalidDataProvider(): array { $result = [ [ [ 'id' => Random::str(Random::int(1, 35)), 'test' => Random::str(10), 'status' => Random::str(10), 'itn' => new stdClass(), 'phone' => [], 'created_at' => null, 'confirmation' => Random::str(10), ], ], [ [ 'id' => '', 'test' => 'null', 'status' => '', 'itn' => [], 'phone' => new stdClass(), 'created_at' => 'null', 'confirmation' => new stdClass(), ], ], ]; for ($i = 0; $i < 10; $i++) { $selfEmployed = [ 'id' => Random::str($i < 5 ? Random::int(1, 35) : Random::int(51, 64)), 'test' => $i % 2 ? Random::str(10) : new stdClass(), 'status' => Random::str(1, 35), 'phone' => $i % 2 ? new stdClass() : [], 'itn' => $i % 2 ? new stdClass() : [], 'created_at' => 0 === $i ? '23423-234-32' : -Random::int(), 'confirmation' => Random::value([ Random::str(1, 35), new stdClass(), ]), ]; $result[] = [$selfEmployed]; } return $result; } } yookassa-sdk-php/tests/Request/SelfEmployed/AbstractTestConfirmation.php000064400000002353150364342670022625 0ustar00getTestInstance(); self::assertEquals($this->getExpectedType(), $instance->getType()); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testInvalidType($value): void { $this->expectException(InvalidArgumentException::class); new TestConfirmation($value); } /** * @throws Exception */ public static function invalidTypeDataProvider(): array { return [ [''], [Random::str(40)], [0], ]; } abstract protected function getTestInstance(): SelfEmployedRequestConfirmation; abstract protected function getExpectedType(): string; } class TestConfirmation extends SelfEmployedRequestConfirmation { public function __construct($type) { parent::__construct(); $this->setType($type); } } yookassa-sdk-php/tests/Request/SelfEmployed/ConfirmationRedirectTest.php000064400000001053150364342670022617 0ustar00getTestInstance(); $confirmation = $instance->factory($type); self::assertNotNull($confirmation); self::assertInstanceOf(SelfEmployedRequestConfirmation::class, $confirmation); self::assertEquals($type, $confirmation->getType()); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $type */ public function testInvalidFactory($type): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factory($type); } /** * @dataProvider validArrayDataProvider */ public function testFactoryFromArray(array $options): void { $instance = $this->getTestInstance(); $confirmation = $instance->factoryFromArray($options); self::assertNotNull($confirmation); self::assertInstanceOf(SelfEmployedRequestConfirmation::class, $confirmation); foreach ($options as $property => $value) { self::assertEquals($confirmation->{$property}, $value); } $type = $options['type']; unset($options['type']); $confirmation = $instance->factoryFromArray($options, $type); self::assertNotNull($confirmation); self::assertInstanceOf(SelfEmployedRequestConfirmation::class, $confirmation); self::assertEquals($type, $confirmation->getType()); foreach ($options as $property => $value) { self::assertEquals($confirmation->{$property}, $value); } } /** * @dataProvider invalidDataArrayDataProvider * * @param mixed $options */ public function testInvalidFactoryFromArray($options): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } public static function validTypeDataProvider(): array { $result = []; foreach (SelfEmployedConfirmationType::getValidValues() as $value) { $result[] = [$value]; } return $result; } public static function invalidTypeDataProvider(): array { return [ [''], [0], [1], [-1], ['5'], [Random::str(10)], ]; } public static function validArrayDataProvider(): array { $result = [ [ [ 'type' => SelfEmployedConfirmationType::REDIRECT, ], ], ]; foreach (SelfEmployedConfirmationType::getValidValues() as $value) { $result[] = [['type' => $value]]; } return $result; } public static function invalidDataArrayDataProvider(): array { return [ [[]], [['type' => 'test']], ]; } protected function getTestInstance(): SelfEmployedRequestConfirmationFactory { return new SelfEmployedRequestConfirmationFactory(); } } yookassa-sdk-php/tests/Request/SelfEmployed/SelfEmployedRequestTest.php000064400000015633150364342670022457 0ustar00setItn($options['itn']); self::assertSame($options['itn'], $instance->getItn()); self::assertSame($options['itn'], $instance->itn); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testPhone($options): void { $instance = new SelfEmployedRequest(); self::assertFalse($instance->hasPhone()); self::assertNull($instance->getPhone()); self::assertNull($instance->phone); $expected = $options['phone']; $instance->setPhone($options['phone']); if (empty($options['phone'])) { self::assertFalse($instance->hasPhone()); self::assertNull($instance->getPhone()); self::assertNull($instance->phone); } else { self::assertTrue($instance->hasPhone()); self::assertSame($expected, $instance->getPhone()); self::assertSame($expected, $instance->phone); } $instance->setPhone(); self::assertFalse($instance->hasPhone()); self::assertNull($instance->getPhone()); self::assertNull($instance->phone); $instance->phone = $options['phone']; if (empty($options['phone'])) { self::assertFalse($instance->hasPhone()); self::assertNull($instance->getPhone()); self::assertNull($instance->phone); } else { self::assertTrue($instance->hasPhone()); self::assertSame($expected, $instance->getPhone()); self::assertSame($expected, $instance->phone); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testConfirmation($options): void { $instance = new SelfEmployedRequest(); self::assertFalse($instance->hasConfirmation()); self::assertNull($instance->getConfirmation()); self::assertNull($instance->confirmation); $expected = $options['confirmation']; if ($expected instanceof SelfEmployedRequestConfirmation) { $expected = $expected->toArray(); } $instance->setConfirmation($options['confirmation']); if (empty($options['confirmation'])) { self::assertFalse($instance->hasConfirmation()); self::assertNull($instance->getConfirmation()); self::assertNull($instance->confirmation); } else { self::assertTrue($instance->hasConfirmation()); self::assertSame($expected, $instance->getConfirmation()->toArray()); self::assertSame($expected, $instance->confirmation->toArray()); } $instance->setConfirmation(); self::assertFalse($instance->hasConfirmation()); self::assertNull($instance->getConfirmation()); self::assertNull($instance->confirmation); $instance->confirmation = $options['confirmation']; if (empty($options['confirmation'])) { self::assertFalse($instance->hasConfirmation()); self::assertNull($instance->getConfirmation()); self::assertNull($instance->confirmation); } else { self::assertTrue($instance->hasConfirmation()); self::assertSame($expected, $instance->getConfirmation()->toArray()); self::assertSame($expected, $instance->confirmation->toArray()); } } /** * @dataProvider invalidConfirmationDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidConfirmation(mixed $value, string $exceptionClassName): void { $instance = new SelfEmployedRequest(); $this->expectException($exceptionClassName); $instance->setConfirmation($value); } public function testValidate(): void { $instance = new SelfEmployedRequest(); self::assertFalse($instance->validate()); $instance->setItn(); self::assertFalse($instance->validate()); $instance->setPhone(); self::assertFalse($instance->validate()); $instance->setConfirmation(new SelfEmployedRequestConfirmationRedirect()); self::assertFalse($instance->validate()); $instance->setItn('529834813422'); self::assertTrue($instance->validate()); } public function testBuilder(): void { $builder = SelfEmployedRequest::builder(); self::assertInstanceOf(SelfEmployedRequestBuilder::class, $builder); } public static function validDataProvider(): array { $factory = new SelfEmployedRequestConfirmationFactory(); $result = [ [ [ 'itn' => Random::str(12, 12, '0123456789'), 'phone' => Random::str(4, 15, '0123456789'), 'confirmation' => null, ], ], [ [ 'itn' => Random::str(12, 12, '0123456789'), 'phone' => Random::str(4, 15, '0123456789'), 'confirmation' => $factory->factoryFromArray(['type' => Random::value(SelfEmployedConfirmationType::getValidValues())]), ], ], ]; for ($i = 0; $i < 10; $i++) { $request = [ 'itn' => Random::str(12, 12, '0123456789'), 'phone' => Random::str(4, 15, '0123456789'), 'confirmation' => $factory->factoryFromArray(['type' => Random::value(SelfEmployedConfirmationType::getValidValues())]), ]; $result[] = [$request]; } return $result; } public static function invalidItnDataProvider(): array { return [ [false], [true], ]; } public static function invalidPhoneDataProvider(): array { return [ [false], [true], ]; } public static function invalidConfirmationDataProvider(): array { return [ [Random::str(100), TypeError::class], [[], InvalidArgumentException::class], [[new \stdClass()], InvalidArgumentException::class], ]; } } yookassa-sdk-php/tests/Model/MonetaryAmountTest.php000064400000023232150364342670016512 0ustar00getValue()); self::assertEquals(self::DEFAULT_CURRENCY, $instance->getCurrency()); $instance = new MonetaryAmount($value, $currency); self::assertEquals(number_format($value, 2, '.', ''), $instance->getValue()); self::assertEquals(strtoupper($currency), $instance->getCurrency()); } /** * @dataProvider validArrayDataProvider * * @param mixed $data */ public function testArrayConstructor($data): void { $instance = new MonetaryAmount(); self::assertEquals(self::DEFAULT_VALUE, $instance->getValue()); self::assertEquals(self::DEFAULT_CURRENCY, $instance->getCurrency()); $instance = new MonetaryAmount($data); self::assertEquals(number_format($data['value'], 2, '.', ''), $instance->getValue()); self::assertEquals(strtoupper($data['currency']), $instance->getCurrency()); } /** * @dataProvider validValueDataProvider * * @param mixed $value */ public function testGetSetValue($value): void { $expected = number_format($value, 2, '.', ''); $instance = self::getInstance(); self::assertEquals(self::DEFAULT_VALUE, $instance->getValue()); self::assertEquals(self::DEFAULT_VALUE, $instance->value); $instance->setValue($value); self::assertEquals($expected, $instance->getValue()); self::assertEquals($expected, $instance->value); $instance = self::getInstance(); $instance->value = $value; self::assertEquals($expected, $instance->getValue()); self::assertEquals($expected, $instance->value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetInvalidValue($value, string $exceptionClassName): void { $instance = self::getInstance(); try { $instance->setValue($value); } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetterInvalidValue($value, string $exceptionClassName): void { $instance = self::getInstance(); try { $instance->value = $value; } catch (Exception $e) { self::assertInstanceOf($exceptionClassName, $e); } } /** * @dataProvider validCurrencyDataProvider */ public function testGetSetCurrency(string $currency): void { $instance = self::getInstance(); self::assertEquals(self::DEFAULT_CURRENCY, $instance->getCurrency()); self::assertEquals(self::DEFAULT_CURRENCY, $instance->currency); $instance->setCurrency($currency); self::assertEquals(strtoupper($currency), $instance->getCurrency()); self::assertEquals(strtoupper($currency), $instance->currency); } /** * @dataProvider invalidCurrencyDataProvider * * @param mixed $currency */ public function testSetInvalidCurrency($currency, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->setCurrency($currency); } /** * @dataProvider invalidCurrencyDataProvider */ public function testSetterInvalidCurrency(mixed $currency, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->currency = $currency; } public function validDataProvider(): array { $result = self::validValueDataProvider(); foreach (self::validCurrencyDataProvider() as $index => $tmp) { if (isset($result[$index])) { $result[$index][] = $tmp[0]; } } return $result; } public static function validArrayDataProvider(): array { $result = []; foreach (range(1, 10) as $i) { $result[$i][] = [ 'value' => Random::float(0, 9999.99), 'currency' => Random::value(CurrencyCode::getValidValues()), ]; } return $result; } public static function validValueDataProvider(): array { $result = [ [0.01], [0.1], ['0.1'], [0.11], [0.112], [0.1111], [0.1166], ['0.01'], [1], ['1'], ]; for ($i = 0, $iMax = count(CurrencyCode::getValidValues()) - count($result); $i < $iMax; $i++) { $result[] = [number_format(Random::float(0, 9999999), 2, '.', '')]; } return $result; } public static function validCurrencyDataProvider(): array { $result = []; foreach (CurrencyCode::getValidValues() as $value) { $result[] = [$value]; } return $result; } public static function invalidValueDataProvider(): array { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [[], InvalidPropertyValueTypeException::class], [fopen(__FILE__, 'rb'), InvalidPropertyValueTypeException::class], ['invalid_value', InvalidPropertyValueTypeException::class], [-1, InvalidPropertyValueException::class], [-0.01, InvalidPropertyValueException::class], [0.0, InvalidPropertyValueException::class], [0, InvalidPropertyValueException::class], [0.001, InvalidPropertyValueException::class], [true, InvalidPropertyValueTypeException::class], [false, InvalidPropertyValueTypeException::class], ]; } public static function invalidCurrencyDataProvider(): array { return [ ['', EmptyPropertyValueException::class], ['invalid_value', InvalidPropertyValueException::class], ['III', InvalidPropertyValueException::class], ]; } /** * @dataProvider validMultiplyDataProvider * * @param mixed $source * @param mixed $coefficient * @param mixed $expected */ public function testMultiply($source, $coefficient, $expected): void { $instance = new MonetaryAmount($source); $instance->multiply($coefficient); self::assertEquals($expected, $instance->getIntegerValue()); } public static function validMultiplyDataProvider(): array { return [ [1, 0.5, 50], [1.01, 0.5, 51], [1.00, 0.01, 1], [0.99, 0.01, 1], ]; } /** * @dataProvider invalidMultiplyDataProvider * * @param mixed $source * @param mixed $coefficient */ public function testInvalidMultiply($source, $coefficient): void { $this->expectException(InvalidArgumentException::class); $instance = new MonetaryAmount($source); $instance->multiply($coefficient); } public static function invalidMultiplyDataProvider(): array { return [ [0.99, false], [0.99, -1.0], [0.99, -0.0], [0.99, -0.00001], [0.99, 0.000001], ]; } /** * @dataProvider validIncreaseDataProvider * * @param mixed $source * @param mixed $amount * @param mixed $expected */ public function testIncrease($source, $amount, $expected): void { $instance = new MonetaryAmount($source); $instance->increase($amount); self::assertEquals($expected, $instance->getIntegerValue()); } public static function validIncreaseDataProvider(): array { return [ [1.00, -0.001, 100], ]; } /** * @dataProvider invalidIncreaseDataProvider * * @param mixed $source * @param mixed $amount */ public function testInvalidIncrease($source, $amount): void { $this->expectException(InvalidArgumentException::class); $instance = new MonetaryAmount($source); $instance->increase($amount); } public static function invalidIncreaseDataProvider(): array { return [ [0.99, -1.0], ]; } /** * @dataProvider validDataProvider * * @param mixed $value * @param mixed $currency */ public function testJsonSerialize($value, $currency): void { $instance = new MonetaryAmount($value, $currency); $expected = [ 'value' => number_format($value, 2, '.', ''), 'currency' => strtoupper($currency), ]; self::assertEquals($expected, $instance->jsonSerialize()); } protected static function getInstance($value = null, $currency = null): MonetaryAmount { return new MonetaryAmount($value, $currency); } } yookassa-sdk-php/tests/Model/Refund/RefundCancellationDetailsTest.php000064400000010143150364342670022016 0ustar00getParty()); self::assertEquals($data['reason'], $instance->getReason()); } /** * @dataProvider validDataProvider * * @param mixed|null $data */ public function testGetSetParty(mixed $data = null): void { $instance = self::getInstance($data); self::assertEquals($data['party'], $instance->getParty()); $instance = self::getInstance(); $instance->setParty($data['party']); self::assertEquals($data['party'], $instance->getParty()); self::assertEquals($data['party'], $instance->party); } /** * @dataProvider validDataProvider * * @param mixed|null $data */ public function testGetSetReason(mixed $data = null): void { $instance = self::getInstance($data); self::assertEquals($data['reason'], $instance->getReason()); $instance = self::getInstance(); $instance->setReason($data['reason']); self::assertEquals($data['reason'], $instance->getReason()); self::assertEquals($data['reason'], $instance->reason); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetInvalidParty($value, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->setParty($value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetterInvalidReason($value, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->reason = $value; } public static function validDataProvider(): array { $result = []; $cancellationDetailsParties = RefundCancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); $cancellationDetailsReasons = RefundCancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); for ($i = 0; $i < 20; $i++) { $result[] = [ [ 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons], ] ]; } return $result; } public static function invalidValueDataProvider() { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [[], TypeError::class], [fopen(__FILE__, 'r'), TypeError::class], [true, InvalidPropertyValueException::class], [false, EmptyPropertyValueException::class], ]; } /** * @dataProvider validDataProvider * * @param mixed|null $data */ public function testJsonSerialize(mixed $data = null): void { $instance = new RefundCancellationDetails($data); $expected = $data; self::assertEquals($expected, $instance->jsonSerialize()); } /** * @param mixed|null $data */ protected static function getInstance(mixed $data = null): RefundCancellationDetails { return new RefundCancellationDetails($data); } } yookassa-sdk-php/tests/Model/Refund/SourceTest.php000064400000015465150364342670016224 0ustar00getTestInstance(); $instance->fromArray($value); self::assertSame($value['account_id'], $instance->getAccountId()); self::assertSame($value['account_id'], $instance->accountId); self::assertSame($value['amount'], $instance->getAmount()->jsonSerialize()); self::assertSame($value['amount'], $instance->amount->jsonSerialize()); self::assertSame($value['platform_fee_amount'], $instance->getPlatformFeeAmount()->jsonSerialize()); self::assertSame($value['platform_fee_amount'], $instance->platform_fee_amount->jsonSerialize()); self::assertTrue($instance->hasAmount()); self::assertTrue($instance->hasPlatformFeeAmount()); self::assertSame($value, $instance->jsonSerialize()); } /** * @dataProvider validDataProvider */ public function testGetSetAccountId(array $value): void { $instance = $this->getTestInstance(); $instance->setAccountId($value['account_id']); self::assertSame($value['account_id'], $instance->getAccountId()); self::assertSame($value['account_id'], $instance->accountId); } /** * @dataProvider validDataProvider */ public function testSetterAccountId(mixed $value): void { $instance = $this->getTestInstance(); $instance->accountId = $value['account_id']; self::assertSame($value['account_id'], $instance->getAccountId()); self::assertSame($value['account_id'], $instance->accountId); } /** * @throws Exception */ public static function validDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [ 'account_id' => (string) Random::int(11111111, 99999999), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'platform_fee_amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ]; } return [$result]; } /** * @dataProvider invalidAccountIdProvider * * @param mixed $value */ public function testGetSetInvalidAccountId($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setAccountId($value); } /** * @dataProvider invalidAccountIdProvider * * @param mixed $value */ public function testSetterInvalidAccountId($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->accountId = $value; } public static function invalidAccountIdProvider(): array { return [ [null], [''], [[]], [new stdClass()], ]; } /** * @dataProvider validAmountDataProvider * * @param mixed $value */ public function testGetSetAmount($value): void { $instance = $this->getTestInstance(); $instance->setAmount($value); self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } /** * @dataProvider validAmountDataProvider */ public function testSetterAmount(AmountInterface $value): void { $instance = $this->getTestInstance(); $instance->amount = $value; self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } /** * @dataProvider validAmountDataProvider * * @param mixed $value */ public function testGetSetPlatformFeeAmount($value): void { $instance = $this->getTestInstance(); $instance->setPlatformFeeAmount($value); self::assertSame($value, $instance->getPlatformFeeAmount()); self::assertSame($value, $instance->platform_fee_amount); } /** * @dataProvider validAmountDataProvider */ public function testSetterPlatformFeeAmount(AmountInterface $value): void { $instance = $this->getTestInstance(); $instance->platform_fee_amount = $value; self::assertSame($value, $instance->getPlatformFeeAmount()); self::assertSame($value, $instance->platform_fee_amount); } /** * @return MonetaryAmount[][] * * @throws Exception */ public static function validAmountDataProvider(): array { return [ [ new MonetaryAmount( Random::int(1, 100), Random::value(CurrencyCode::getValidValues()) ), ], [ new MonetaryAmount(), ], ]; } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setAmount($value); } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetterInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->amount = $value; } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetInvalidPlatformFeeAmount($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setPlatformFeeAmount($value); } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetterInvalidPlatformFeeAmount($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->platform_fee_amount = $value; } public static function invalidAmountDataProvider(): array { return [ ['null'], [1.0], [1], [true], [false], [new stdClass()], ]; } protected function getTestInstance(): Source { return new Source(); } } yookassa-sdk-php/tests/Model/Refund/RefundTest.php000064400000051631150364342670016202 0ustar00setId($value); self::assertEquals((string) $value, $instance->getId()); self::assertEquals((string) $value, $instance->id); $instance = new Refund(); $instance->id = $value; self::assertEquals((string) $value, $instance->getId()); self::assertEquals((string) $value, $instance->id); } public static function validIdDataProvider() { $values = 'abcdefghijklmnopqrstuvwxyz'; $values .= strtoupper($values) . '0123456789._-+'; return [ [Random::str(36, $values)], [Random::str(36, $values)], [new StringObject(Random::str(36, $values))], [new StringObject(Random::str(36, $values))], ]; } /** * @dataProvider invalidIdDataProvider * * @param mixed $value */ public function testSetInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Refund(); $instance->setId($value); } /** * @dataProvider invalidIdDataProvider * * @param mixed $value */ public function testSetterInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Refund(); $instance->id = $value; } public static function invalidIdDataProvider(): array { return [ [''], [Random::str(1, 35)], [Random::str(1)], [Random::str(35)], [Random::str(37, 48)], [Random::str(37)], [1], [0], [-1], [true], [false], ]; } /** * @dataProvider validSources * * @param mixed $value */ public function testSetSources($value): void { $instance = new Refund(); $instance->setSources($value); if (is_array($value)) { $value = [new Source($value[0])]; } self::assertEquals($value, $instance->getSources()->getItems()->toArray()); } /** * @dataProvider invalidSourcesDataProvider * * @param mixed $value * @param mixed $exception */ public function testSetInvalidSources($value, $exception): void { $this->expectException($exception); $instance = new Refund(); $instance->setSources($value); } /** * @return array[] * * @throws Exception */ public static function validSources(): array { $sources = []; for ($i = 0; $i < 10; $i++) { $sources[$i][] = [ 'account_id' => (string) Random::int(11111111, 99999999), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'platform_fee_amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ]; } $sources[$i][] = [new Source($sources[0])]; return [$sources]; } /** * @dataProvider validCancellationDetails * * @param mixed $value */ public function testSetCancellationDetails($value): void { $instance = new Refund(); $instance->setCancellationDetails($value); if (is_array($value)) { $value = new RefundCancellationDetails($value); } self::assertEquals($value, $instance->getCancellationDetails()); } /** * @dataProvider invalidCancellationDetailsDataProvider * * @param mixed $value * @param mixed $exception */ public function testSetInvalidCancellationDetails($value, $exception): void { $this->expectException($exception); $instance = new Refund(); $instance->setCancellationDetails($value); } /** * @return array[] * * @throws Exception */ public static function validCancellationDetails(): array { $cancellationDetailsParties = RefundCancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); $cancellationDetailsReasons = RefundCancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); $cancellation_details = []; for ($i = 0; $i < 10; $i++) { $cancellation_details[] = [ [ 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons], ] ]; } return $cancellation_details; } /** * @dataProvider validIdDataProvider */ public function testGetSetPaymentId(mixed $value): void { $instance = new Refund(); $instance->setPaymentId($value); self::assertEquals((string) $value, $instance->getPaymentId()); self::assertEquals((string) $value, $instance->paymentId); self::assertEquals((string) $value, $instance->payment_id); $instance = new Refund(); $instance->paymentId = $value; self::assertEquals((string) $value, $instance->getPaymentId()); self::assertEquals((string) $value, $instance->paymentId); self::assertEquals((string) $value, $instance->payment_id); $instance = new Refund(); $instance->payment_id = $value; self::assertEquals((string) $value, $instance->getPaymentId()); self::assertEquals((string) $value, $instance->paymentId); self::assertEquals((string) $value, $instance->payment_id); } /** * @dataProvider invalidIdDataProvider * * @param mixed $value */ public function testSetInvalidPaymentId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Refund(); $instance->setPaymentId($value); } /** * @dataProvider invalidIdDataProvider * * @param mixed $value */ public function testSetterInvalidPaymentId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Refund(); $instance->paymentId = $value; } /** * @dataProvider invalidIdDataProvider * * @param mixed $value */ public function testSetterInvalidSnakePaymentId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Refund(); $instance->payment_id = $value; } /** * @dataProvider validStatusDataProvider */ public function testGetSetStatus(mixed $value): void { $instance = new Refund(); $instance->setStatus($value); self::assertEquals((string) $value, $instance->getStatus()); self::assertEquals((string) $value, $instance->status); $instance = new Refund(); $instance->status = $value; self::assertEquals((string) $value, $instance->getStatus()); self::assertEquals((string) $value, $instance->status); } public static function validStatusDataProvider(): array { $result = []; foreach (RefundStatus::getValidValues() as $value) { $result[] = [$value]; } return $result; } /** * @dataProvider invalidIdDataProvider * * @param mixed $value */ public function testSetInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Refund(); $instance->setStatus($value); } /** * @dataProvider invalidIdDataProvider * * @param mixed $value */ public function testSetterInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Refund(); $instance->status = $value; } /** * @dataProvider validCreatedAtDataProvider * * @param mixed $value */ public function testGetSetCreatedAt($value): void { $instance = new Refund(); if (is_numeric($value)) { $expected = $value; } elseif ($value instanceof DateTime) { $expected = $value->getTimestamp(); } else { $expected = strtotime((string) $value); } $instance->setCreatedAt($value); self::assertSame($expected, $instance->getCreatedAt()->getTimestamp()); self::assertSame($expected, $instance->createdAt->getTimestamp()); self::assertSame($expected, $instance->created_at->getTimestamp()); $instance = new Refund(); $instance->createdAt = $value; self::assertSame($expected, $instance->getCreatedAt()->getTimestamp()); self::assertSame($expected, $instance->createdAt->getTimestamp()); self::assertSame($expected, $instance->created_at->getTimestamp()); $instance = new Refund(); $instance->created_at = $value; self::assertSame($expected, $instance->getCreatedAt()->getTimestamp()); self::assertSame($expected, $instance->createdAt->getTimestamp()); self::assertSame($expected, $instance->created_at->getTimestamp()); } public static function validCreatedAtDataProvider(): array { return [ [new DateTime()], [new DateTime(date(YOOKASSA_DATE, Random::int(1, time())))], [date(YOOKASSA_DATE)], [date(YOOKASSA_DATE, Random::int(1, time()))], [new StringObject(date(YOOKASSA_DATE))], [new StringObject(date(YOOKASSA_DATE, Random::int(1, time())))], ]; } /** * @dataProvider invalidCreatedAtDataProvider * * @param $value * @param $exception * @return void */ public function testSetInvalidCreatedAt($value, $exception): void { $this->expectException($exception); $instance = new Refund(); $instance->setCreatedAt($value); } /** * @dataProvider invalidCreatedAtDataProvider * * @param mixed $value * @param $exception */ public function testSetterInvalidCreatedAt($value, $exception): void { $this->expectException($exception); $instance = new Refund(); $instance->createdAt = $value; } /** * @dataProvider invalidCreatedAtDataProvider * * @param mixed $value * @param $exception */ public function testSetterInvalidSnakeCreatedAt($value, $exception): void { $this->expectException($exception); $instance = new Refund(); $instance->created_at = $value; } public static function invalidCreatedAtDataProvider(): array { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [true, InvalidPropertyValueException::class], [false, EmptyPropertyValueException::class], [[], TypeError::class], [fopen(__FILE__, 'rb'), TypeError::class], ]; } /** * @dataProvider validAmountDataProvider */ public function testGetSetAmount(AmountInterface $value): void { $instance = new Refund(); $instance->setAmount($value); self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); $instance = new Refund(); $instance->amount = $value; self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } public static function validAmountDataProvider(): array { return [ [new MonetaryAmount(1)], [new MonetaryAmount(Random::float(0.01, 9999999.99))], ]; } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Refund(); $instance->setAmount($value); } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetterInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Refund(); $instance->amount = $value; } public static function invalidAmountDataProvider(): array { return [ ['string'], [new stdClass()], ]; } /** * @dataProvider validReceiptRegisteredDataProvider */ public function testGetSetReceiptRegistered(mixed $value): void { $instance = new Refund(); $instance->setReceiptRegistration($value); self::assertEquals((string) $value, $instance->getReceiptRegistration()); self::assertEquals((string) $value, $instance->receiptRegistration); self::assertEquals((string) $value, $instance->receipt_registration); $instance = new Refund(); $instance->receiptRegistration = $value; self::assertEquals((string) $value, $instance->getReceiptRegistration()); self::assertEquals((string) $value, $instance->receiptRegistration); self::assertEquals((string) $value, $instance->receipt_registration); $instance = new Refund(); $instance->receipt_registration = $value; self::assertEquals((string) $value, $instance->getReceiptRegistration()); self::assertEquals((string) $value, $instance->receiptRegistration); self::assertEquals((string) $value, $instance->receipt_registration); } public static function validReceiptRegisteredDataProvider(): array { $result = []; foreach (ReceiptRegistrationStatus::getValidValues() as $value) { $result[] = [$value]; } return $result; } /** * @dataProvider invalidReceiptRegisteredDataProvider * * @param mixed $value */ public function testSetInvalidReceiptRegistered($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Refund(); $instance->setReceiptRegistration($value); } /** * @dataProvider invalidReceiptRegisteredDataProvider * * @param mixed $value */ public function testSetterInvalidReceiptRegistration($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Refund(); $instance->receiptRegistration = $value; } /** * @dataProvider invalidReceiptRegisteredDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeReceiptRegistration($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Refund(); $instance->receipt_registration = $value; } public static function invalidReceiptRegisteredDataProvider(): array { return [ ['invalid'], [true], [false], [Random::str(1, 10)], [new StringObject(Random::str(1, 10))], ]; } /** * @dataProvider validDescriptionDataProvider */ public function testGetSetDescription(mixed $value): void { $instance = new Refund(); $instance->setDescription($value); self::assertEquals((string) $value, $instance->getDescription()); self::assertEquals((string) $value, $instance->description); $instance = new Refund(); $instance->description = $value; self::assertEquals((string) $value, $instance->getDescription()); self::assertEquals((string) $value, $instance->description); } public static function validDescriptionDataProvider() { return [ [Random::str(1, 249)], [new StringObject(Random::str(1, 249))], [Random::str(250)], [new StringObject(Random::str(250))], ]; } /** * @dataProvider invalidDescriptionDataProvider * * @param mixed $value */ public function testSetInvalidDescription($value, $exception): void { $this->expectException($exception); $instance = new Refund(); $instance->setDescription($value); } /** * @dataProvider invalidDescriptionDataProvider * * @param mixed $value */ public function testSetterInvalidDescription($value, $exception): void { $this->expectException($exception); $instance = new Refund(); $instance->description = $value; } public static function invalidDescriptionDataProvider() { return [ [Random::str(Refund::MAX_LENGTH_DESCRIPTION + 1), InvalidPropertyValueException::class], [[], TypeError::class], [fopen(__FILE__, 'r'), TypeError::class], ]; } public static function invalidSourcesDataProvider() { return [ [Random::str(Refund::MAX_LENGTH_DESCRIPTION + 1), ValidatorParameterException::class], [fopen(__FILE__, 'r'), ValidatorParameterException::class], ]; } public static function invalidCancellationDetailsDataProvider() { return [ [Random::str(Refund::MAX_LENGTH_DESCRIPTION + 1), ValidatorParameterException::class], [fopen(__FILE__, 'r'), ValidatorParameterException::class], ]; } /** * @dataProvider validDealDataProvider * * @param mixed $value */ public function testGetSetDeal($value): void { $instance = new Refund(); $instance->setDeal($value); self::assertSame($value, $instance->getDeal()); self::assertSame($value, $instance->deal); $instance = new Refund(); $instance->deal = $value; self::assertSame($value, $instance->getDeal()); self::assertSame($value, $instance->deal); } /** * @throws Exception */ public static function validDealDataProvider(): array { return [ [null], [new RefundDealInfo(['id' => Random::str(36), 'amount' => 1, 'refund_settlements' => self::generateRefundSettlements()])], [new RefundDealInfo(['id' => Random::str(36), 'amount' => Random::float(0.01, 9999999.99), 'refund_settlements' => self::generateRefundSettlements()])], ]; } private static function generateRefundSettlements(): array { $return = []; $count = Random::int(1, 10); for ($i = 0; $i < $count; $i++) { $return[] = self::generateRefundSettlement(); } return $return; } private static function generateRefundSettlement(): array { return [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => round(Random::float(1.00, 100.00), 2), 'currency' => 'RUB', ], ]; } /** * @dataProvider invalidDealDataProvider * * @param mixed $value */ public function testSetInvalidDeal($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Refund(); $instance->setDeal($value); } /** * @dataProvider invalidDealDataProvider * * @param mixed $value */ public function testSetterInvalidDeal($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Refund(); $instance->deal = $value; } public static function invalidDealDataProvider(): array { return [ [true], [false], [new MonetaryAmount()], [1], [new stdClass()], ]; } } yookassa-sdk-php/tests/Model/Webhook/WebhookTest.php000064400000003765150364342670016535 0ustar00setId($data['id']); $webhook->setUrl($data['url']); $webhook->setEvent($data['event']); self::assertEquals($webhook->getId(), $data['id']); self::assertEquals($webhook->getUrl(), $data['url']); self::assertEquals($webhook->getEvent(), $data['event']); } /** * @dataProvider validDataProvider * * @param mixed $data */ public function testWebhookConstructorInstantiate($data): void { $webhook = new Webhook($data); self::assertEquals($webhook->getId(), $data['id']); self::assertEquals($webhook->getUrl(), $data['url']); self::assertEquals($webhook->getEvent(), $data['event']); } public static function validDataProvider(): array { return [ [ [ 'id' => Random::str(20), 'event' => NotificationEventType::REFUND_SUCCEEDED, 'url' => 'https://merchant-site.ru/notification_url', ], ], [ [ 'id' => Random::str(20), 'event' => NotificationEventType::PAYMENT_SUCCEEDED, 'url' => 'https://merchant-site.ru/notification_url', ], ], [ [ 'id' => Random::str(20), 'event' => NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE, 'url' => 'https://merchant-site.ru/notification_url', ], ], ]; } } yookassa-sdk-php/tests/Model/Payout/SbpParticipantBankTest.php000064400000015627150364342670020541 0ustar00setName($value['name']); self::assertEquals($value['name'], $instance->getName()); self::assertEquals($value['name'], $instance->name); $instance->name = $value['name']; self::assertEquals($value['name'], $instance->getName()); self::assertEquals($value['name'], $instance->name); } /** * @dataProvider validDataProvider * @param array $value * @return void */ public function testGetSetBic(array $value): void { $instance = self::getInstance(); $instance->setBic($value['bic']); self::assertEquals($value['bic'], $instance->getBic()); self::assertEquals($value['bic'], $instance->bic); $instance->bic = $value['bic']; self::assertEquals($value['bic'], $instance->getBic()); self::assertEquals($value['bic'], $instance->bic); } /** * @dataProvider validDataProvider * @param array $value * @return void */ public function testGetSetBankId(array $value): void { $instance = self::getInstance(); $instance->setBankId($value['bank_id']); self::assertEquals($value['bank_id'], $instance->getBankId()); self::assertEquals($value['bank_id'], $instance->bank_id); $instance->bank_id = $value['bank_id']; self::assertEquals($value['bank_id'], $instance->getBankId()); self::assertEquals($value['bank_id'], $instance->bank_id); } /** * @dataProvider validArrayDataProvider */ public function testJsonSerialize(array $options): void { $instance = self::getInstance($options); $expected = $options; self::assertEquals($expected, $instance->jsonSerialize()); } /** * @dataProvider invalidNameDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidName(mixed $value, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->setName($value); } /** * @dataProvider invalidNameDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidName(mixed $value, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->name = $value; } /** * @dataProvider invalidBankIdDataProvider * * @param mixed $value * @param string $exceptionClassBankId */ public function testSetInvalidBankId(mixed $value, string $exceptionClassBankId): void { $instance = self::getInstance(); $this->expectException($exceptionClassBankId); $instance->setBankId($value); } /** * @dataProvider invalidBankIdDataProvider * * @param mixed $value * @param string $exceptionClassBankId */ public function testSetterInvalidBankId(mixed $value, string $exceptionClassBankId): void { $instance = self::getInstance(); $this->expectException($exceptionClassBankId); $instance->bank_id = $value; } /** * @dataProvider invalidBicDataProvider * * @param mixed $value * @param string $exceptionClassBic */ public function testSetInvalidBic(mixed $value, string $exceptionClassBic): void { $instance = self::getInstance(); $this->expectException($exceptionClassBic); $instance->setBic($value); } /** * @dataProvider invalidBicDataProvider * * @param mixed $value * @param string $exceptionClassBic */ public function testSetterInvalidBic(mixed $value, string $exceptionClassBic): void { $instance = self::getInstance(); $this->expectException($exceptionClassBic); $instance->bic = $value; } /** * @return array * @throws Exception */ public static function validDataProvider(): array { $sbpParticipantBank = []; for ($i = 0; $i < 10; $i++) { $array = [ 'bank_id' => Random::str(SbpParticipantBank::MAX_LENGTH_BANK_ID), 'name' => Random::str(SbpParticipantBank::MAX_LENGTH_NAME), 'bic' => Random::str(9, 9, '0123456789'), ]; $sbpParticipantBank[] = [$array]; } return $sbpParticipantBank; } /** * @return array * @throws Exception */ public static function validArrayDataProvider(): array { $result = []; foreach (range(1, 10) as $i) { $result[$i][] = [ 'bank_id' => Random::str(SbpParticipantBank::MAX_LENGTH_BANK_ID), 'name' => Random::str(SbpParticipantBank::MAX_LENGTH_NAME), 'bic' => Random::str(9, 9, '0123456789'), ]; } return $result; } /** * @return array * @throws Exception */ public static function invalidNameDataProvider(): array { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [Random::str(SbpParticipantBank::MAX_LENGTH_NAME + 1), InvalidPropertyValueException::class], [[], TypeError::class], [new \stdClass(), TypeError::class], ]; } /** * @return array * @throws Exception */ public static function invalidBankIdDataProvider(): array { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [Random::str(SbpParticipantBank::MAX_LENGTH_BANK_ID + 1), InvalidPropertyValueException::class], [[], TypeError::class], [new \stdClass(), TypeError::class], ]; } /** * @return array * @throws Exception */ public static function invalidBicDataProvider(): array { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [true, InvalidPropertyValueException::class], ]; } } yookassa-sdk-php/tests/Model/Payout/PayoutSelfEmployedTest.php000064400000004775150364342670020616 0ustar00getTestInstance($options); self::assertEquals($options['id'], $instance->getId()); } /** * @return array * @throws Exception */ public static function validDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $deal = [ 'id' => Random::str(PayoutSelfEmployed::MIN_LENGTH_ID, PayoutSelfEmployed::MAX_LENGTH_ID), ]; $result[] = [$deal]; } return $result; } /** * @dataProvider invalidIdDataProvider * * @param mixed $value * @param string $exceptionClassBic */ public function testSetInvalidId(mixed $value, string $exceptionClassBic): void { $instance = new PayoutSelfEmployed(); $this->expectException($exceptionClassBic); $instance->setId($value); } /** * @dataProvider invalidIdDataProvider * * @param mixed $value * @param string $exceptionClassBic */ public function testSetterInvalidId(mixed $value, string $exceptionClassBic): void { $instance = new PayoutSelfEmployed(); $this->expectException($exceptionClassBic); $instance->id = $value; } /** * @return array * @throws Exception */ public static function invalidIdDataProvider(): array { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [Random::str(PayoutSelfEmployed::MIN_LENGTH_ID - 1), InvalidPropertyValueException::class], [Random::str(PayoutSelfEmployed::MAX_LENGTH_ID + 1), InvalidPropertyValueException::class], [Random::int(), InvalidPropertyValueException::class], [[], TypeError::class], [new \stdClass(), TypeError::class], ]; } /** * @param mixed $options */ protected function getTestInstance($options): PayoutSelfEmployed { return new PayoutSelfEmployed($options); } } yookassa-sdk-php/tests/Model/Payout/PayoutDestinationBankCardCardTest.php000064400000022304150364342670022653 0ustar00getAndSetTest($value, 'last4'); } /** * @dataProvider validFirst6DataProvider */ public function testGetSetFirst6(string $value): void { $this->getAndSetTest($value, 'first6'); } /** * @dataProvider validCardTypeDataProvider * * @param mixed $value */ public function testGetSetCardType($value): void { $this->getAndSetTest($value, 'cardType', 'card_type'); } /** * @dataProvider validIssuerCountryDataProvider * * @param mixed $value */ public function testGetSetIssuerCountry($value): void { $this->getAndSetTest($value, 'issuerCountry', 'issuer_country'); } /** * @dataProvider validIssuerNameDataProvider * * @param mixed $value */ public function testGetSetIssuerName($value): void { $this->getAndSetTest($value, 'issuerName', 'issuer_name'); } /** * @dataProvider invalidFirstLastDataProvider * * @param mixed $value * @param string $exceptionClassFirst6 */ public function testSetInvalidFirst6(mixed $value, string $exceptionClassFirst6): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassFirst6); $instance->setFirst6($value); } /** * @dataProvider invalidFirstLastDataProvider * * @param mixed $value * @param string $exceptionClassFirst6 */ public function testSetterInvalidFirst6(mixed $value, string $exceptionClassFirst6): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassFirst6); $instance->first6 = $value; } /** * @dataProvider invalidFirstLastDataProvider * * @param mixed $value * @param string $exceptionClassLast4 */ public function testSetInvalidLast4(mixed $value, string $exceptionClassLast4): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassLast4); $instance->setLast4($value); } /** * @dataProvider invalidFirstLastDataProvider * * @param mixed $value * @param string $exceptionClassLast4 */ public function testSetterInvalidLast4(mixed $value, string $exceptionClassLast4): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassLast4); $instance->last4 = $value; } /** * @dataProvider invalidCardTypeDataProvider * * @param mixed $value * @param string $exceptionClassCardType */ public function testSetInvalidCardType(mixed $value, string $exceptionClassCardType): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassCardType); $instance->setCardType($value); } /** * @dataProvider invalidCardTypeDataProvider * * @param mixed $value * @param string $exceptionClassCardType */ public function testSetterInvalidCardType(mixed $value, string $exceptionClassCardType): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassCardType); $instance->card_type = $value; } /** * @dataProvider invalidIssuerCountryDataProvider * * @param mixed $value * @param string $exceptionClassIssuerCountry */ public function testSetInvalidIssuerCountry(mixed $value, string $exceptionClassIssuerCountry): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassIssuerCountry); $instance->setIssuerCountry($value); } /** * @dataProvider invalidIssuerCountryDataProvider * * @param mixed $value * @param string $exceptionClassIssuerCountry */ public function testSetterInvalidIssuerCountry(mixed $value, string $exceptionClassIssuerCountry): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassIssuerCountry); $instance->issuer_country = $value; } /** * @return array * @throws Exception */ public static function validLast4DataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [Random::str(4, 4, '0123456789')]; } return $result; } /** * @return array * @throws Exception */ public static function validFirst6DataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [Random::str(6, 6, '0123456789')]; } return $result; } /** * @return array * @throws Exception */ public static function validCardTypeDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [Random::value(BankCardType::getValidValues())]; } return $result; } /** * @return array */ public static function validIssuerCountryDataProvider(): array { return [ ['RU'], ['EN'], ['UK'], ['AU'], [null], [''], ]; } /** * @return array * @throws Exception */ public static function validIssuerNameDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [Random::str(3, 35)]; } $result[] = ['']; $result[] = [null]; return $result; } /** * @return array */ public static function invalidCardTypeDataProvider(): array { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [[], TypeError::class], [fopen(__FILE__, 'r'), TypeError::class], [true, InvalidPropertyValueException::class], [false, EmptyPropertyValueException::class], ]; } /** * @return array * @throws Exception */ public static function invalidIssuerCountryDataProvider(): array { return [ [Random::str(PayoutDestinationBankCardCard::ISO_3166_CODE_LENGTH + 1), InvalidPropertyValueException::class], [fopen(__FILE__, 'r'), TypeError::class], [Random::float(), InvalidPropertyValueException::class], [Random::int(), InvalidPropertyValueException::class], [[], TypeError::class], [new \stdClass(), TypeError::class], ]; } /** * @return array * @throws Exception */ public static function invalidFirstLastDataProvider(): array { return [ [Random::str(Random::int(1, 100)), InvalidPropertyValueException::class], [fopen(__FILE__, 'r'), TypeError::class], [Random::float(), InvalidPropertyValueException::class], [Random::int(), InvalidPropertyValueException::class], [[], TypeError::class], [new \stdClass(), TypeError::class], ]; } /** * @return PayoutDestinationBankCardCard */ protected function getTestInstance(): PayoutDestinationBankCardCard { return new PayoutDestinationBankCardCard(); } /** * @param $value * @param $property * @param $snakeCase * @return void */ protected function getAndSetTest($value, $property, $snakeCase = null): void { $getter = 'get' . ucfirst($property); $setter = 'set' . ucfirst($property); $instance = $this->getTestInstance(); self::assertNull($instance->{$getter}()); self::assertNull($instance->{$property}); if (null !== $snakeCase) { self::assertNull($instance->{$snakeCase}); } $instance->{$setter}($value); self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); if (null !== $snakeCase) { self::assertEquals($value, $instance->{$snakeCase}); } $instance = $this->getTestInstance(); $instance->{$property} = $value; self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); if (null !== $snakeCase) { self::assertEquals($value, $instance->{$snakeCase}); } if (null !== $snakeCase) { $instance = $this->getTestInstance(); $instance->{$snakeCase} = $value; self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); self::assertEquals($value, $instance->{$snakeCase}); } } } yookassa-sdk-php/tests/Model/Payout/PayoutDestinationSbpTest.php000064400000013643150364342670021146 0ustar00getTestInstance(); $instance->setPhone($value); if (null === $value || '' === $value) { self::assertNull($instance->getPhone()); self::assertNull($instance->phone); } else { $expected = $value; self::assertEquals($expected, $instance->getPhone()); self::assertEquals($expected, $instance->phone); } $instance = $this->getTestInstance(); $instance->phone = $value; if (null === $value || '' === $value) { self::assertNull($instance->getPhone()); self::assertNull($instance->phone); } else { $expected = $value; self::assertEquals($expected, $instance->getPhone()); self::assertEquals($expected, $instance->phone); } } /** * @dataProvider invalidPhoneDataProvider * * @param mixed $value */ public function testSetInvalidPhone($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setPhone($value); } /** * @dataProvider invalidPhoneDataProvider * * @param mixed $value */ public function testSetterInvalidPhone($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->phone = $value; } /** * @dataProvider validBankIdDataProvider */ public function testGetSetBankId(string $value): void { $instance = $this->getTestInstance(); $instance->setBankId($value); if (null === $value || '' === $value) { self::assertNull($instance->getBankId()); self::assertNull($instance->bankId); self::assertNull($instance->bank_id); } else { $expected = $value; self::assertEquals($expected, $instance->getBankId()); self::assertEquals($expected, $instance->bankId); self::assertEquals($expected, $instance->bank_id); } $instance = $this->getTestInstance(); $instance->bankId = $value; if (null === $value || '' === $value) { self::assertNull($instance->getBankId()); self::assertNull($instance->bankId); self::assertNull($instance->bank_id); } else { $expected = $value; self::assertEquals($expected, $instance->getBankId()); self::assertEquals($expected, $instance->bankId); self::assertEquals($expected, $instance->bank_id); } } /** * @dataProvider invalidBankIdDataProvider * * @param mixed $value */ public function testSetInvalidBankId($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setBankId($value); } /** * @dataProvider invalidBankIdDataProvider * * @param mixed $value */ public function testSetterInvalidBankId($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->bankId = $value; } /** * @dataProvider validRecipientCheckedDataProvider */ public function testGetSetRecipientChecked(mixed $value): void { $instance = $this->getTestInstance(); $instance->setRecipientChecked($value); if (null === $value || '' === $value) { self::assertNull($instance->getRecipientChecked()); self::assertNull($instance->recipientChecked); self::assertNull($instance->recipient_checked); } else { $expected = $value; self::assertEquals($expected, $instance->getRecipientChecked()); self::assertEquals($expected, $instance->recipientChecked); self::assertEquals($expected, $instance->recipient_checked); } $instance = $this->getTestInstance(); $instance->recipientChecked = $value; if (null === $value || '' === $value) { self::assertNull($instance->getRecipientChecked()); self::assertNull($instance->recipientChecked); self::assertNull($instance->recipient_checked); } else { $expected = $value; self::assertEquals($expected, $instance->getRecipientChecked()); self::assertEquals($expected, $instance->recipientChecked); self::assertEquals($expected, $instance->recipient_checked); } } public static function validPhoneDataProvider(): array { return [ [Random::str(4, 15, '0123456789')], [Random::str(4, 15, '0123456789')], ]; } public static function invalidPhoneDataProvider(): array { return [ [null], [''], ]; } public static function validBankIdDataProvider(): array { return [ [Random::str(7, 12, '0123456789')], [Random::str(7, 12, '0123456789')], ]; } public static function invalidBankIdDataProvider(): array { return [ [null], [''], [Random::str(13)], ]; } public static function validRecipientCheckedDataProvider(): array { return [ [Random::bool()], [Random::bool()], ]; } protected function getTestInstance(): PayoutDestinationSbp { return new PayoutDestinationSbp(); } protected function getExpectedType(): string { return PaymentMethodType::SBP; } } yookassa-sdk-php/tests/Model/Payout/AbstractTestPayoutDestination.php000064400000002241150364342670022155 0ustar00getTestInstance(); self::assertEquals($this->getExpectedType(), $instance->getType()); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testInvalidType($value): void { $this->expectException(InvalidArgumentException::class); new TestPaymentData($value); } public static function invalidTypeDataProvider() { return [ [''], [null], [Random::str(40)], [0], ]; } abstract protected function getTestInstance(): AbstractPayoutDestination; abstract protected function getExpectedType(): string; } class TestPaymentData extends AbstractPayoutDestination { public function __construct($type) { parent::__construct(); $this->setType($type); } } yookassa-sdk-php/tests/Model/Payout/PayoutDestinationFactoryTest.php000064400000012141150364342670022021 0ustar00getTestInstance(); $paymentData = $instance->factory($type); self::assertNotNull($paymentData); self::assertInstanceOf(AbstractPayoutDestination::class, $paymentData); self::assertEquals($type, $paymentData->getType()); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $type */ public function testInvalidFactory($type): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factory($type); } /** * @dataProvider validArrayDataProvider */ public function testFactoryFromArray(array $options): void { $instance = $this->getTestInstance(); $paymentData = $instance->factoryFromArray($options); self::assertNotNull($paymentData); self::assertInstanceOf(AbstractPayoutDestination::class, $paymentData); foreach ($options as $property => $value) { if (!is_array($value)) { self::assertEquals($paymentData->{$property}, $value); } else { self::assertEquals($paymentData->{$property}->toArray(), $value); } } $type = $options['type']; unset($options['type']); $paymentData = $instance->factoryFromArray($options, $type); self::assertNotNull($paymentData); self::assertInstanceOf(AbstractPayoutDestination::class, $paymentData); self::assertEquals($type, $paymentData->getType()); foreach ($options as $property => $value) { if (!is_array($value)) { self::assertEquals($paymentData->{$property}, $value); } else { self::assertEquals($paymentData->{$property}->toArray(), $value); } } } /** * @dataProvider invalidDataArrayDataProvider * * @param mixed $options */ public function testInvalidFactoryFromArray($options): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } /** * @return array */ public static function validTypeDataProvider(): array { $result = []; foreach (PayoutDestinationType::getEnabledValues() as $value) { $result[] = [$value]; } return $result; } /** * @return array * @throws Exception */ public static function invalidTypeDataProvider(): array { return [ [''], [null], [0], [1], [-1], ['5'], [Random::str(10)], ]; } /** * @return array * @throws Exception */ public static function validArrayDataProvider(): array { $result = [ [ [ 'type' => PaymentMethodType::BANK_CARD, 'card' => [ 'first6' => Random::str(6, '0123456789'), 'last4' => Random::str(4, '0123456789'), 'card_type' => Random::value(BankCardType::getValidValues()), 'issuer_country' => Random::value(self::validIssuerCountry()), 'issuer_name' => Random::str(4, 50), ], ], ], [ [ 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => Random::str(11, 33, '1234567890'), ], ], [ [ 'type' => PaymentMethodType::SBP, 'phone' => Random::str(4, 15, '1234567890'), 'bank_id' => Random::str(4, 12), ], ], ]; foreach (PayoutDestinationType::getEnabledValues() as $value) { $result[] = [['type' => $value]]; } return $result; } private static function validIssuerCountry(): array { return [ 'RU', 'EN', 'UK', 'AU', ]; } /** * @return array */ public static function invalidDataArrayDataProvider(): array { return [ [[]], [['type' => 'test']], ]; } /** * @return PayoutDestinationFactory */ protected function getTestInstance(): PayoutDestinationFactory { return new PayoutDestinationFactory(); } } yookassa-sdk-php/tests/Model/Payout/IncomeReceiptTest.php000064400000017550150364342670017545 0ustar00setAmount($options['amount']); if (empty($options['amount'])) { self::assertNull($instance->getAmount()); self::assertNull($instance->amount); } else { if (is_array($options['amount'])) { self::assertEquals($options['amount'], $instance->getAmount()->toArray()); self::assertEquals($options['amount'], $instance->amount->toArray()); } else { self::assertEquals($options['amount'], $instance->getAmount()); self::assertEquals($options['amount'], $instance->amount); } } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetterAmount($options): void { $instance = new IncomeReceipt(); $instance->amount = $options['amount']; if (empty($options['amount'])) { self::assertNull($instance->getAmount()); self::assertNull($instance->amount); } else { if (is_array($options['amount'])) { self::assertEquals($options['amount'], $instance->getAmount()->toArray()); self::assertEquals($options['amount'], $instance->amount->toArray()); } else { self::assertEquals($options['amount'], $instance->getAmount()); self::assertEquals($options['amount'], $instance->amount); } } } /** * @dataProvider invalidAmountProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $instance = new IncomeReceipt(); $instance->setAmount($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testGetSetServiceName($options): void { $instance = new IncomeReceipt(); $instance->setServiceName($options['service_name']); self::assertEquals($options['service_name'], $instance->getServiceName()); self::assertEquals($options['service_name'], $instance->service_name); self::assertEquals($options['service_name'], $instance->serviceName); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetterServiceName($options): void { $instance = new IncomeReceipt(); $instance->service_name = $options['service_name']; self::assertEquals($options['service_name'], $instance->getServiceName()); self::assertEquals($options['service_name'], $instance->service_name); self::assertEquals($options['service_name'], $instance->serviceName); $instance->serviceName = $options['service_name']; self::assertEquals($options['service_name'], $instance->getServiceName()); self::assertEquals($options['service_name'], $instance->service_name); self::assertEquals($options['service_name'], $instance->serviceName); } /** * @dataProvider invalidServiceNameProvider * * @param mixed $value */ public function testSetInvalidServiceName($value): void { $this->expectException(InvalidArgumentException::class); $instance = new IncomeReceipt(); $instance->setServiceName($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testGetSetNpdReceiptId($options): void { $instance = new IncomeReceipt(); $instance->setNpdReceiptId($options['npd_receipt_id']); self::assertEquals($options['npd_receipt_id'], $instance->getNpdReceiptId()); self::assertEquals($options['npd_receipt_id'], $instance->npd_receipt_id); self::assertEquals($options['npd_receipt_id'], $instance->npdReceiptId); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetterNpdReceiptId($options): void { $instance = new IncomeReceipt(); $instance->npd_receipt_id = $options['npd_receipt_id']; self::assertEquals($options['npd_receipt_id'], $instance->getNpdReceiptId()); self::assertEquals($options['npd_receipt_id'], $instance->npd_receipt_id); self::assertEquals($options['npd_receipt_id'], $instance->npdReceiptId); $instance->npdReceiptId = $options['npd_receipt_id']; self::assertEquals($options['npd_receipt_id'], $instance->getNpdReceiptId()); self::assertEquals($options['npd_receipt_id'], $instance->npd_receipt_id); self::assertEquals($options['npd_receipt_id'], $instance->npdReceiptId); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testGetSetUrl($options): void { $instance = new IncomeReceipt(); $instance->setUrl($options['url']); self::assertEquals($options['url'], $instance->getUrl()); self::assertEquals($options['url'], $instance->url); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetterUrl($options): void { $instance = new IncomeReceipt(); $instance->url = $options['url']; self::assertEquals($options['url'], $instance->getUrl()); self::assertEquals($options['url'], $instance->url); } public static function validDataProvider(): array { $result = [ [ [ 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), 'npd_receipt_id' => null, 'url' => null, 'amount' => null, ], ], [ [ 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), 'npd_receipt_id' => '', 'url' => 'http://test.ru', 'amount' => new MonetaryAmount(['value' => Random::float(0.01, 99.99)]), ], ], [ [ 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), 'npd_receipt_id' => Random::str(1, 50), 'url' => '', 'amount' => new MonetaryAmount(Random::int(1, 1000000)), ], ], ]; for ($i = 1; $i < 6; $i++) { $receipt = [ 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), 'npd_receipt_id' => Random::str(10, 50), 'url' => 'https://' . Random::str(1, 10, 'abcdefghijklmnopqrstuvwxyz') . '.ru', 'amount' => [ 'value' => round(Random::float(0.1, 99.99), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ]; $result[] = [$receipt]; } return $result; } public static function invalidServiceNameProvider(): array { return [ [''], [false], [Random::str(IncomeReceipt::MAX_LENGTH_SERVICE_NAME + 1, 60)], ]; } public static function invalidAmountProvider(): array { return [ [new stdClass()], [true], [false], ]; } } yookassa-sdk-php/tests/Model/Payout/PayoutCancellationDetailsTest.php000064400000011722150364342670022116 0ustar00getParty()); self::assertEquals($value['reason'], $instance->getReason()); } /** * @dataProvider validDataProvider * * @param null|mixed $value */ public function testGetSetParty(mixed $value = null): void { $instance = self::getInstance($value); self::assertEquals($value['party'], $instance->getParty()); $instance = self::getInstance([]); $instance->setParty($value['party']); self::assertEquals($value['party'], $instance->getParty()); self::assertEquals($value['party'], $instance->party); } /** * @dataProvider validDataProvider * * @param null $value */ public function testGetSetReason(mixed $value = null): void { $instance = self::getInstance($value); self::assertEquals($value['reason'], $instance->getReason()); $instance = self::getInstance([]); $instance->setReason($value['reason']); self::assertEquals($value['reason'], $instance->getReason()); self::assertEquals($value['reason'], $instance->reason); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidParty(mixed $value, string $exceptionClassName): void { $instance = self::getInstance([]); $this->expectException($exceptionClassName); $instance->setParty($value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidParty(mixed $value, string $exceptionClassName): void { $instance = self::getInstance([]); $this->expectException($exceptionClassName); $instance->party = $value; } /** * @dataProvider invalidValueDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidReason(mixed $value, string $exceptionClassName): void { $instance = self::getInstance([]); $this->expectException($exceptionClassName); $instance->setReason($value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidReason(mixed $value, string $exceptionClassName): void { $instance = self::getInstance([]); $this->expectException($exceptionClassName); $instance->reason = $value; } public static function validDataProvider(): array { $result = []; $cancellationDetailsParties = PayoutCancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); $cancellationDetailsReasons = PayoutCancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); for ($i = 0; $i < 20; $i++) { $result[] = [ [ 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons], ], ]; } return $result; } public static function invalidValueDataProvider(): array { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [Random::str(10), InvalidPropertyValueException::class], ]; } /** * @dataProvider validDataProvider * * @param mixed|null $value */ public function testJsonSerialize(mixed $value = null): void { $instance = new PayoutCancellationDetails($value); $expected = [ 'party' => $value['party'], 'reason' => $value['reason'], ]; self::assertEquals($expected, $instance->jsonSerialize()); } /** * @param mixed $value * @return PayoutCancellationDetails */ protected static function getInstance(mixed $value = null): PayoutCancellationDetails { return new PayoutCancellationDetails($value); } } yookassa-sdk-php/tests/Model/Payout/PayoutDestinationYooMoneyTest.php000064400000006330150364342670022173 0ustar00getTestInstance(); $instance->setAccountNumber($value); self::assertEquals($value, $instance->getAccountNumber()); self::assertEquals($value, $instance->accountNumber); self::assertEquals($value, $instance->account_number); $instance = $this->getTestInstance(); $instance->account_number = $value; self::assertEquals($value, $instance->getAccountNumber()); self::assertEquals($value, $instance->accountNumber); self::assertEquals($value, $instance->account_number); } /** * @dataProvider invalidAccountNumberDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidAccountNumber(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->setAccountNumber($value); } /** * @dataProvider invalidAccountNumberDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidAccountNumber(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->account_number = $value; } /** * @return array * @throws Exception */ public static function validAccountNumberDataProvider(): array { return [ [1234567894560], ['0123456789456'], [Random::str(PayoutDestinationYooMoney::MIN_LENGTH_ACCOUNT_NUMBER, PayoutDestinationYooMoney::MAX_LENGTH_ACCOUNT_NUMBER, '0123456789')], ]; } /** * @return array * @throws Exception */ public static function invalidAccountNumberDataProvider(): array { return [ ['', EmptyPropertyValueException::class], [Random::str(PayoutDestinationYooMoney::MIN_LENGTH_ACCOUNT_NUMBER - 1), InvalidPropertyValueException::class], [Random::str(PayoutDestinationYooMoney::MAX_LENGTH_ACCOUNT_NUMBER + 1), InvalidPropertyValueException::class], [true, InvalidPropertyValueException::class], [[], TypeError::class], [new stdClass(), TypeError::class], ]; } /** * @return PayoutDestinationYooMoney */ protected function getTestInstance(): PayoutDestinationYooMoney { return new PayoutDestinationYooMoney(); } /** * @return string */ protected function getExpectedType(): string { return PaymentMethodType::YOO_MONEY; } } yookassa-sdk-php/tests/Model/Payout/PayoutDestinationBankCardTest.php000064400000011067150364342670022065 0ustar00getTestInstance(); self::assertNull($instance->getCard()); self::assertNull($instance->card); $instance->setCard($value); if (null === $value) { self::assertNull($instance->getCard()); self::assertNull($instance->card); } else { if (is_array($value)) { $expected = new PayoutDestinationBankCardCard(); foreach ($value as $property => $val) { $expected->offsetSet($property, $val); } } else { $expected = $value; } self::assertEquals($expected, $instance->getCard()); self::assertEquals($expected, $instance->card); } $instance = $this->getTestInstance(); $instance->card = $value; if (null === $value) { self::assertNull($instance->getCard()); self::assertNull($instance->card); } else { if (is_array($value)) { $expected = new PayoutDestinationBankCardCard(); foreach ($value as $property => $val) { $expected->offsetSet($property, $val); } } else { $expected = $value; } self::assertEquals($expected, $instance->getCard()); self::assertEquals($expected, $instance->card); } } /** * @dataProvider invalidCardDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetInvalidCard(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->setCard($value); } /** * @dataProvider invalidCardDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testSetterInvalidCard(mixed $value, string $exceptionClassName): void { $instance = $this->getTestInstance(); $this->expectException($exceptionClassName); $instance->card = $value; } /** * @return array * @throws Exception */ public static function validCardDataProvider(): array { return [ [null], [new PayoutDestinationBankCardCard([ 'first6' => Random::str(6, '0123456789'), 'last4' => Random::str(4, '0123456789'), 'card_type' => Random::value(BankCardType::getValidValues()), ])], [[ 'first6' => Random::str(6, '0123456789'), 'last4' => Random::str(4, '0123456789'), 'card_type' => Random::value(BankCardType::getValidValues()), 'issuer_country' => 'RU', 'issuer_name' => 'SberBank', ]], ]; } /** * @return array */ public static function invalidCardDataProvider(): array { return [ [[''], EmptyPropertyValueException::class], ['5', ValidatorParameterException::class], [[ 'first6' => Random::str(100), 'last4' => Random::str(100), 'card_type' => Random::str(100), ], InvalidPropertyValueException::class], [new stdClass(), InvalidPropertyValueTypeException::class], [[new stdClass()], EmptyPropertyValueException::class], ]; } /** * @return PayoutDestinationBankCard */ protected function getTestInstance(): PayoutDestinationBankCard { return new PayoutDestinationBankCard(); } /** * @return string */ protected function getExpectedType(): string { return PaymentMethodType::BANK_CARD; } } yookassa-sdk-php/tests/Model/Payout/PayoutTest.php000064400000057521150364342670016302 0ustar00setId($options['id']); self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); $instance = new Payout(); $instance->id = $options['id']; self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->setId($value['id']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->id = $value['id']; } /** * @dataProvider validDataProvider */ public function testGetSetStatus(array $options): void { $instance = new Payout(); $instance->setStatus($options['status']); self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); $instance = new Payout(); $instance->status = $options['status']; self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->setStatus($value['status']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->status = $value['status']; } /** * @dataProvider validDataProvider */ public function testGetSetAmount(array $options): void { $instance = new Payout(); $instance->setAmount($options['amount']); self::assertSame($options['amount'], $instance->getAmount()); self::assertSame($options['amount'], $instance->amount); $instance = new Payout(); $instance->amount = $options['amount']; self::assertSame($options['amount'], $instance->getAmount()); self::assertSame($options['amount'], $instance->amount); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->setAmount($value['amount']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->amount = $value['amount']; } /** * @dataProvider validDataProvider */ public function testGetSetPayoutDestination(array $options): void { $instance = new Payout(); $instance->setPayoutDestination($options['payout_destination']); self::assertEquals($options['payout_destination'], $instance->getPayoutDestination()); self::assertEquals($options['payout_destination'], $instance->payout_destination); $instance = new Payout(); $instance->payout_destination = $options['payout_destination']; self::assertEquals($options['payout_destination'], $instance->getPayoutDestination()); self::assertEquals($options['payout_destination'], $instance->payout_destination); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidPayoutDestination($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->setPayoutDestination($value['payout_destination']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidPayoutDestination($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->payout_destination = $value['payout_destination']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidCancellationDetails($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->setCancellationDetails($value['cancellation_details']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidCancellationDetails($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->cancellation_details = $value['cancellation_details']; } /** * @dataProvider validDataProvider */ public function testGetSetCreatedAt(array $options): void { $instance = new Payout(); $instance->setCreatedAt($options['created_at']); self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); $instance = new Payout(); $instance->createdAt = $options['created_at']; self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); $instance = new Payout(); $instance->created_at = $options['created_at']; self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->setCreatedAt($value['created_at']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->createdAt = $value['created_at']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->created_at = $value['created_at']; } /** * @dataProvider validDataProvider */ public function testGetSetTest(array $options): void { $instance = new Payout(); $instance->setTest($options['test']); self::assertSame($options['test'], $instance->getTest()); self::assertSame($options['test'], $instance->test); $instance = new Payout(); $instance->test = $options['test']; self::assertSame($options['test'], $instance->getTest()); self::assertSame($options['test'], $instance->test); } /** * @dataProvider validDataProvider */ public function testGetSetDeal(array $options): void { $instance = new Payout(); $instance->setDeal($options['deal']); if (empty($options['deal'])) { self::assertNull($instance->getSelfEmployed()); self::assertNull($instance->deal); } elseif (is_array($options['deal'])) { self::assertSame($options['deal'], $instance->getDeal()->toArray()); self::assertSame($options['deal'], $instance->deal->toArray()); } else { self::assertSame($options['deal'], $instance->getDeal()); self::assertSame($options['deal'], $instance->deal); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidDeal($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->setDeal($value['deal']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidDeal($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->deal = $value['deal']; } /** * @dataProvider validDataProvider */ public function testGetSetSelfEmployed(array $options): void { $instance = new Payout(); $instance->setSelfEmployed($options['self_employed']); if (empty($options['receipt'])) { self::assertNull($instance->getSelfEmployed()); self::assertNull($instance->self_employed); self::assertNull($instance->selfEmployed); } elseif (is_array($options['self_employed'])) { self::assertSame($options['self_employed'], $instance->getSelfEmployed()->toArray()); self::assertSame($options['self_employed'], $instance->self_employed->toArray()); self::assertSame($options['self_employed'], $instance->selfEmployed->toArray()); } else { self::assertSame($options['self_employed'], $instance->getSelfEmployed()); self::assertSame($options['self_employed'], $instance->self_employed); self::assertSame($options['self_employed'], $instance->selfEmployed); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidSelfEmployed($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->setSelfEmployed($value['self_employed']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSelfEmployed($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->self_employed = $value['self_employed']; $instance = new Payout(); $instance->selfEmployed = $value['self_employed']; } /** * @dataProvider validDataProvider */ public function testGetSetReceipt(array $options): void { $instance = new Payout(); $instance->setReceipt($options['receipt']); if (empty($options['receipt'])) { self::assertNull($instance->getReceipt()); self::assertNull($instance->receipt); } elseif (is_array($options['receipt'])) { self::assertSame($options['receipt'], $instance->getReceipt()->toArray()); self::assertSame($options['receipt'], $instance->receipt->toArray()); } else { self::assertSame($options['receipt'], $instance->getReceipt()); self::assertSame($options['receipt'], $instance->receipt); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidReceipt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->setReceipt($value['receipt']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidReceipt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $instance->receipt = $value['receipt']; } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetDescription($options): void { $instance = new Payout(); $instance->setDescription($options['description']); if (empty($options['description']) && ('0' !== $options['description'])) { self::assertNull($instance->getDescription()); } else { self::assertEquals($options['description'], $instance->getDescription()); } } public function testSetInvalidLengthDescription(): void { $this->expectException(InvalidArgumentException::class); $instance = new Payout(); $description = Random::str(Payout::MAX_LENGTH_DESCRIPTION + 1); $instance->setDescription($description); } /** * @dataProvider validDataProvider */ public function testGetSetCancellationDetails(array $options): void { $instance = new Payout(); $instance->setCancellationDetails($options['cancellation_details']); self::assertSame($options['cancellation_details'], $instance->getCancellationDetails()); self::assertSame($options['cancellation_details'], $instance->cancellationDetails); self::assertSame($options['cancellation_details'], $instance->cancellation_details); $instance = new Payout(); $instance->cancellationDetails = $options['cancellation_details']; self::assertSame($options['cancellation_details'], $instance->getCancellationDetails()); self::assertSame($options['cancellation_details'], $instance->cancellationDetails); self::assertSame($options['cancellation_details'], $instance->cancellation_details); $instance = new Payout(); $instance->cancellation_details = $options['cancellation_details']; self::assertSame($options['cancellation_details'], $instance->getCancellationDetails()); self::assertSame($options['cancellation_details'], $instance->cancellationDetails); self::assertSame($options['cancellation_details'], $instance->cancellation_details); } /** * @dataProvider validDataProvider */ public function testGetSetMetadata(array $options): void { $instance = new Payout(); if (is_array($options['metadata'])) { $instance->setMetadata($options['metadata']); self::assertSame($options['metadata'], $instance->getMetadata()->toArray()); self::assertSame($options['metadata'], $instance->metadata->toArray()); $instance = new Payout(); $instance->metadata = $options['metadata']; self::assertSame($options['metadata'], $instance->getMetadata()->toArray()); self::assertSame($options['metadata'], $instance->metadata->toArray()); } elseif ($options['metadata'] instanceof Metadata || empty($options['metadata'])) { $instance->setMetadata($options['metadata']); self::assertSame($options['metadata'], $instance->getMetadata()); self::assertSame($options['metadata'], $instance->metadata); $instance = new Payout(); $instance->metadata = $options['metadata']; self::assertSame($options['metadata'], $instance->getMetadata()); self::assertSame($options['metadata'], $instance->metadata); } } public static function validDataProvider() { $result = []; $cancellationDetailsParties = PayoutCancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); $cancellationDetailsReasons = PayoutCancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); $payoutDestinationFactory = new PayoutDestinationFactory(); $payoutDestinations = [ PayoutDestinationType::YOO_MONEY => $payoutDestinationFactory->factoryFromArray([ 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => Random::str(11, 33, '1234567890'), ]), PayoutDestinationType::BANK_CARD => $payoutDestinationFactory->factoryFromArray([ 'type' => PaymentMethodType::BANK_CARD, 'card' => [ 'first6' => Random::str(6, '0123456789'), 'last4' => Random::str(4, '0123456789'), 'card_type' => Random::value(BankCardType::getValidValues()), 'issuer_country' => 'RU', 'issuer_name' => 'SberBank', ], ]), PayoutDestinationType::SBP => $payoutDestinationFactory->factoryFromArray([ 'type' => PaymentMethodType::SBP, 'phone' => Random::str(4, 15, '0123456789'), 'bank_id' => Random::str(4, 12, '0123456789'), 'recipient_checked' => Random::bool(), ]), ]; $result[] = [ [ 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => new MonetaryAmount(Random::int(1, 10000), 'RUB'), 'description' => Random::str(1, Payout::MAX_LENGTH_DESCRIPTION), 'payout_destination' => $payoutDestinations[Random::value(PayoutDestinationType::getValidValues())], 'created_at' => date(YOOKASSA_DATE, Random::int(111111111, time())), 'test' => true, 'deal' => null, 'self_employed' => null, 'receipt' => new IncomeReceipt(), 'metadata' => ['order_id' => '37'], 'cancellation_details' => new PayoutCancellationDetails([ 'party' => Random::value($cancellationDetailsParties), 'reason' => Random::value($cancellationDetailsReasons), ]), ], ]; $result[] = [ [ 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => new MonetaryAmount(Random::int(1, 10000), 'RUB'), 'description' => Random::str(1, Payout::MAX_LENGTH_DESCRIPTION), 'payout_destination' => $payoutDestinations[Random::value(PayoutDestinationType::getValidValues())], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'test' => true, 'deal' => ['id' => Random::str(36, 50)], 'receipt' => [ 'service_name' => Random::str(1, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), 'npd_receipt_id' => Random::str(1, 50), 'url' => 'https://' . Random::str(1, 10, 'abcdefghijklmnopqrstuvwxyz') . '.ru', 'amount' => [ 'value' => number_format(Random::float(1, 99), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], 'self_employed' => ['id' => Random::str(36, 50)], 'metadata' => null, 'cancellation_details' => null, ], ]; for ($i = 0; $i < 20; $i++) { $payment = [ 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => new MonetaryAmount(Random::int(1, 10000), 'RUB'), 'description' => $i % 2 ? null : Random::str(Payout::MAX_LENGTH_DESCRIPTION), 'payout_destination' => $payoutDestinations[Random::value([PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD])], 'created_at' => date(YOOKASSA_DATE, Random::int(111111111, time())), 'test' => Random::bool(), 'deal' => new PayoutDealInfo(['id' => Random::str(36, 50)]), 'self_employed' => new PayoutSelfEmployed(['id' => Random::str(36, 50)]), 'receipt' => new IncomeReceipt([ 'service_name' => Random::str(2, IncomeReceipt::MAX_LENGTH_SERVICE_NAME), 'npd_receipt_id' => Random::str(2, 50), 'url' => 'https://' . Random::str(2, 10, 'abcdefghijklmnopqrstuvwxyz') . '.ru', 'amount' => [ 'value' => number_format(Random::float(1, 99), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ]), 'metadata' => new Metadata(), 'cancellation_details' => new PayoutCancellationDetails([ 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons], ]), ]; $result[] = [$payment]; } return $result; } public static function invalidDataProvider(): array { $result = [ [ [ 'id' => '', 'status' => '', 'amount' => '', 'payout_destination' => [], 'test' => '', 'deal' => new Metadata(), 'self_employed' => new stdClass(), 'receipt' => new Metadata(), 'metadata' => new stdClass(), 'created_at' => '', 'cancellation_details' => new stdClass(), ], ], ]; for ($i = 0; $i < 10; $i++) { $payment = [ 'id' => Random::str($i < 5 ? Random::int(1, 35) : Random::int(51, 64)), 'status' => Random::str(1, 35), 'amount' => $i % 2 ? -1 : new stdClass(), 'payout_destination' => $i % 2 ? [] : [new stdClass()], 'test' => 0 === $i ? [] : new stdClass(), 'deal' => 0 === $i ? Random::str(10) : new stdClass(), 'self_employed' => 0 === $i ? Random::str(10) : new stdClass(), 'receipt' => 0 === $i ? Random::str(10) : new stdClass(), 'metadata' => 0 === $i ? Random::str(10) : new stdClass(), 'cancellation_details' => $i % 2 ? Random::str(10) : -Random::int(), 'created_at' => 0 === $i ? '23423-234-32' : -Random::int(), ]; $result[] = [$payment]; } return $result; } } yookassa-sdk-php/tests/Model/Receipt/ReceiptTest.php000064400000111540150364342670016516 0ustar00getItems()); self::assertEquals(ReceiptItem::class, $instance->getItems()->getType()); self::assertEmpty($instance->getItems()); self::assertNotNull($instance->items); self::assertEquals(ReceiptItem::class, $instance->items->getType()); self::assertEmpty($instance->items); $item = new ReceiptItem(); $instance->addItem($item); $items = $instance->getItems(); self::assertSame(count($items), 1); foreach ($items as $tmp) { self::assertSame($item, $tmp); } $this->expectException(EmptyPropertyValueException::class); $instance->setItems([]); self::assertNotNull($instance->getItems()); self::assertIsArray($instance->getItems()); self::assertEmpty($instance->getItems()); $instance->setItems($items); self::assertSame(count($items), 1); foreach ($items as $tmp) { self::assertSame($item, $tmp); } } /** * @dataProvider invalidItemsProvider * * @param mixed $value */ public function testSetInvalidItems(mixed $value): void { $this->expectException(InvalidArgumentException::class); $instance = new Receipt(); $instance->setItems($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testGetSetTaxSystemCode($options): void { $instance = new Receipt(); $instance->setTaxSystemCode($options['tax_system_code']); self::assertEquals($options['tax_system_code'], $instance->getTaxSystemCode()); self::assertEquals($options['tax_system_code'], $instance->taxSystemCode); self::assertEquals($options['tax_system_code'], $instance->tax_system_code); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetterTaxSystemCode($options): void { $instance = new Receipt(); self::assertNull($instance->getTaxSystemCode()); self::assertNull($instance->taxSystemCode); self::assertNull($instance->tax_system_code); $instance->taxSystemCode = $options['tax_system_code']; self::assertEquals($options['tax_system_code'], $instance->getTaxSystemCode()); self::assertEquals($options['tax_system_code'], $instance->taxSystemCode); self::assertEquals($options['tax_system_code'], $instance->tax_system_code); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testGetSetAdditionalUserProps($options): void { $instance = new Receipt(); self::assertNull($instance->getAdditionalUserProps()); self::assertNull($instance->additionalUserProps); self::assertNull($instance->additional_user_props); if (!empty($options['additional_user_props'])) { $instance->setAdditionalUserProps($options['additional_user_props']); if (is_array($options['additional_user_props'])) { self::assertEquals($options['additional_user_props'], $instance->getAdditionalUserProps()->toArray()); self::assertEquals($options['additional_user_props'], $instance->additionalUserProps->toArray()); self::assertEquals($options['additional_user_props'], $instance->additional_user_props->toArray()); } else { self::assertEquals($options['additional_user_props'], $instance->getAdditionalUserProps()); self::assertEquals($options['additional_user_props'], $instance->additionalUserProps); self::assertEquals($options['additional_user_props'], $instance->additional_user_props); } } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetterAdditionalUserProps($options): void { $instance = new Receipt(); self::assertNull($instance->getAdditionalUserProps()); self::assertNull($instance->additionalUserProps); self::assertNull($instance->additional_user_props); if (!empty($options['additional_user_props'])) { $instance->additionalUserProps = $options['additional_user_props']; if (is_array($options['additional_user_props'])) { self::assertEquals($options['additional_user_props'], $instance->getAdditionalUserProps()->toArray()); self::assertEquals($options['additional_user_props'], $instance->additionalUserProps->toArray()); self::assertEquals($options['additional_user_props'], $instance->additional_user_props->toArray()); } else { self::assertEquals($options['additional_user_props'], $instance->getAdditionalUserProps()); self::assertEquals($options['additional_user_props'], $instance->additionalUserProps); self::assertEquals($options['additional_user_props'], $instance->additional_user_props); } } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetReceiptIndustryDetails($options): void { $instance = new Receipt(); $instance->setReceiptIndustryDetails($options['receipt_industry_details']); self::assertEquals($options['receipt_industry_details'], $instance->getReceiptIndustryDetails()->toArray()); self::assertCount(count($options['receipt_industry_details']), $instance->getReceiptIndustryDetails()); if (!empty($options['receipt_industry_details'])) { self::assertEquals($options['receipt_industry_details'][0], $instance->getReceiptIndustryDetails()[0]->toArray()); } } /** * @dataProvider invalidReceiptIndustryDetailsDataProvider * * @param mixed $value */ public function testSetInvalidReceiptIndustryDetails($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Receipt(); $instance->setReceiptIndustryDetails($value); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testAddReceiptIndustryDetails($options): void { $instance = new Receipt(); foreach ($options['receipt_industry_details'] as $item) { $instance->addReceiptIndustryDetails($item); } self::assertCount(count($options['receipt_industry_details']), $instance->getReceiptIndustryDetails()); if (!empty($options['receipt_industry_details'])) { self::assertEquals($options['receipt_industry_details'][0], $instance->getReceiptIndustryDetails()[0]->toArray()); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetReceiptOperationalDetails($options): void { $instance = new Receipt(); $instance->setReceiptOperationalDetails($options['receipt_operational_details']); if (is_array($options['receipt_operational_details'])) { self::assertEquals($options['receipt_operational_details'], $instance->getReceiptOperationalDetails()->toArray()); } else { self::assertEquals($options['receipt_operational_details'], $instance->getReceiptOperationalDetails()); } } /** * @dataProvider invalidReceiptOperationalDetailsDataProvider * * @param mixed $value */ public function testSetInvalidReceiptOperationalDetails($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Receipt(); $instance->setReceiptOperationalDetails($value); } /** * @dataProvider validDataProvider * @param $options */ public function testSetterTax_system_code($options) { $instance = new Receipt(); self::assertNull($instance->getTaxSystemCode()); self::assertNull($instance->taxSystemCode); self::assertNull($instance->tax_system_code); $instance->tax_system_code = $options['tax_system_code']; self::assertEquals($options['tax_system_code'], $instance->getTaxSystemCode()); self::assertEquals($options['tax_system_code'], $instance->taxSystemCode); self::assertEquals($options['tax_system_code'], $instance->tax_system_code); } /** * @dataProvider invalidTaxSystemIdProvider * * @param mixed $value * @param string $exception */ public function testSetInvalidTaxSystemCode(mixed $value, string $exception): void { $this->expectException($exception); $instance = new Receipt(); $instance->setTaxSystemCode($value); } /** * */ public function testNotEmpty() { $instance = new Receipt(); self::assertFalse($instance->notEmpty()); $instance->addItem(new ReceiptItem()); self::assertTrue($instance->notEmpty()); } /** * @dataProvider validSettlementsDataProvider * * @param mixed $value */ public function testSetSettlements($value): void { $instance = new Receipt(); $instance->setSettlements($value); self::assertCount(count($value), $instance->getSettlements()); self::assertEquals($value[0], $instance->getSettlements()[0]); } /** * @dataProvider validSettlementsDataProvider * * @param mixed $value */ public function testAddSettlements($value): void { $instance = new Receipt(); foreach ($value as $item) { $instance->addSettlement($item); } self::assertCount(count($value), $instance->getSettlements()); self::assertEquals($value[0], $instance->getSettlements()[0]); } /** * @dataProvider invalidSettlementsDataProvider * * @param mixed $value * @param string $exceptionClassName */ public function testInvalidSettlementsData(mixed $value, string $exceptionClassName): void { $instance = new Receipt(); $this->expectException($exceptionClassName); $instance->setSettlements($value); } public static function validDataProvider() { $result = [ [ [ 'items' => [], 'tax_system_code' => null, 'customer' => [ 'phone' => '', 'email' => '', ], 'additional_user_props' => [ 'name' => Random::str(AdditionalUserProps::NAME_MAX_LENGTH), 'value' => Random::str(AdditionalUserProps::VALUE_MAX_LENGTH), ], 'settlements' => [ [ 'type' => 'cashless', 'amount' => [ 'value' => '10.00', 'currency' => 'RUB', ], ], ], 'receipt_industry_details' => [], 'receipt_operational_details' => null, ], ], [ [ 'items' => [], 'tax_system_code' => 6, 'customer' => [ 'phone' => '', 'email' => '', ], 'settlements' => [ [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => [ 'value' => round(Random::float(0.1, 99.99), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ], 'receipt_industry_details' => [], 'receipt_operational_details' => null, ], ], [ [ 'items' => [], 'customer' => [ 'phone' => '', 'email' => '', ], 'tax_system_code' => 1, 'settlements' => [ [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => [ 'value' => round(Random::float(0.1, 99.99), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ], 'receipt_industry_details' => [], 'receipt_operational_details' => null, ], ], [ [ 'items' => [], 'customer' => [ 'phone' => '', 'email' => '', ], 'tax_system_code' => 2, 'settlements' => [ [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => [ 'value' => round(Random::float(0.1, 99.99), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ], 'receipt_industry_details' => [], 'receipt_operational_details' => null, ], ], [ [ 'items' => [], 'customer' => [ 'phone' => '', 'email' => '', ], 'tax_system_code' => 3, 'settlements' => [ [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => [ 'value' => round(Random::float(0.1, 99.99), 2), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], ], 'receipt_industry_details' => [], 'receipt_operational_details' => null, ], ], ]; for ($i = 1; $i < 6; $i++) { $receipt = [ 'items' => [], 'tax_system_code' => $i, 'customer' => [ 'phone' => Random::str(10, 10, '1234567890'), 'email' => uniqid('', true) . '@' . uniqid('', true), ], 'receipt_industry_details' => [ [ 'federal_id' => Random::value([ '00' . Random::int(1, 9), '0' . Random::int(1, 6) . Random::int(0, 9), '07' . Random::int(0, 3) ]), 'document_date' => date(IndustryDetails::DOCUMENT_DATE_FORMAT), 'document_number' => Random::str(1, IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH), 'value' => Random::str(1, IndustryDetails::VALUE_MAX_LENGTH), ], ], 'receipt_operational_details' => [ 'operation_id' => Random::int(0, OperationalDetails::OPERATION_ID_MAX_VALUE), 'value' => Random::str(1, OperationalDetails::VALUE_MAX_LENGTH), 'created_at' => date(YOOKASSA_DATE), ], ]; $result[] = [$receipt]; } return $result; } public static function validSettlementsDataProvider() { $result = [ [ [new Settlement( [ 'type' => 'cashless', 'amount' => [ 'value' => '10.00', 'currency' => 'RUB', ], ] ), ], ]]; for ($i = 1; $i < 9; $i++) { $receipt = [ new Settlement( [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => new MonetaryAmount(Random::int(1, 1000), 'RUB'), ] ), ]; $result[] = [$receipt]; } return $result; } public static function invalidSettlementsDataProvider() { return [ [[[]], EmptyPropertyValueException::class], [Random::str(10), InvalidPropertyValueTypeException::class], ]; } public static function invalidItemsProvider() { return [ [null], [new stdClass()], ['invalid_value'], [''], [0], [1], [true], [false], [1.43], [[]], ]; } public static function invalidTaxSystemIdProvider() { return [ [new stdClass(), TypeError::class], ['invalid_value', TypeError::class], [0, InvalidArgumentException::class], [3234, InvalidArgumentException::class], [false, InvalidArgumentException::class], ]; } public function invalidPhoneProvider() { return [ [new stdClass()], [[]], [true], [false], ]; } /** * @throws Exception */ public static function invalidReceiptIndustryDetailsDataProvider(): array { return [ [new stdClass()], [true], [Random::str(1, 100)], ]; } public static function invalidReceiptOperationalDetailsDataProvider() { return [ [new stdClass()], [true], [Random::str(1, 100)], ]; } public function testGetAmountValue(): void { $receipt = new Receipt(); self::assertEquals(0, $receipt->getAmountValue()); $item = new ReceiptItem(); $item->setPrice(new ReceiptItemAmount(Random::float(0.01, 99.99))); $item->setQuantity(Random::float(0.0001, 99.99)); $receipt->addItem($item); $expected = (int) round($item->getPrice()->getIntegerValue() * $item->getQuantity()); self::assertEquals($expected, $receipt->getAmountValue()); self::assertEquals($expected, $receipt->getAmountValue(false)); self::assertEquals(0, $receipt->getShippingAmountValue()); $item = new ReceiptItem(); $item->setPrice(new ReceiptItemAmount(Random::float(0.01, 99.99))); $item->setQuantity(Random::float(0.0001, 99.99)); $receipt->addItem($item); $expected += (int) round($item->getPrice()->getIntegerValue() * $item->getQuantity()); self::assertEquals($expected, $receipt->getAmountValue()); self::assertEquals($expected, $receipt->getAmountValue(false)); self::assertEquals(0, $receipt->getShippingAmountValue()); $item = new ReceiptItem(); $item->setPrice(new ReceiptItemAmount(Random::float(0.01, 99.99))); $item->setQuantity(Random::float(0.0001, 99.99)); $item->setIsShipping(true); $receipt->addItem($item); $shipping = $expected; $expected += (int) round($item->getPrice()->getIntegerValue() * $item->getQuantity()); self::assertEquals($expected, $receipt->getAmountValue()); self::assertEquals($shipping, $receipt->getAmountValue(false)); self::assertEquals($expected - $shipping, $receipt->getShippingAmountValue()); $item = new ReceiptItem(); $item->setPrice(new ReceiptItemAmount(Random::float(0.01, 99.99))); $item->setQuantity(Random::float(0.0001, 99.99)); $item->setIsShipping(true); $receipt->addItem($item); $expected += (int) round($item->getPrice()->getIntegerValue() * $item->getQuantity()); self::assertEquals($expected, $receipt->getAmountValue()); self::assertEquals($shipping, $receipt->getAmountValue(false)); self::assertEquals($expected - $shipping, $receipt->getShippingAmountValue()); $item = new ReceiptItem(); $item->setPrice(new ReceiptItemAmount(Random::float(0.01, 99.99))); $item->setQuantity(Random::float(0.0001, 99.99)); $receipt->addItem($item); $shipping += (int) round($item->getPrice()->getIntegerValue() * $item->getQuantity()); $expected += (int) round($item->getPrice()->getIntegerValue() * $item->getQuantity()); self::assertEquals($expected, $receipt->getAmountValue()); self::assertEquals($shipping, $receipt->getAmountValue(false)); self::assertEquals($expected - $shipping, $receipt->getShippingAmountValue()); } /** * @dataProvider validNormalizationDataProvider * * @param mixed $withShipping * @param mixed $items * @param mixed $amount * @param mixed $expected */ public function testNormalize($items, $amount, $expected, $withShipping = false): void { $receipt = new Receipt(); foreach ($items as $itemInfo) { $item = new ReceiptItem(); $item->setPrice(new ReceiptItemAmount($itemInfo['price'])); if (!empty($itemInfo['quantity'])) { $item->setQuantity($itemInfo['quantity']); } else { $item->setQuantity(1); } if (!empty($itemInfo['shipping'])) { $item->setIsShipping(true); } $receipt->addItem($item); } $receipt->normalize(new ReceiptItemAmount($amount), $withShipping); self::assertEquals(count($expected), count($receipt->getItems())); $expectedAmount = 0; foreach ($receipt->getItems() as $index => $item) { self::assertEquals($expected[$index]['price'], $item->getPrice()->getIntegerValue()); self::assertEquals($expected[$index]['quantity'], $item->getQuantity()); $expectedAmount += $item->getAmount(); } self::assertEquals($expectedAmount, $amount * 100.0); } public static function validNormalizationDataProvider() { return [ [ [ ['price' => 10.0], ], 9.0, [ ['price' => 900, 'quantity' => 1.0], ] ], [ [ ['price' => 10.0], ['price' => 20.0], ], 29.0, [ ['price' => 967, 'quantity' => 1.0], ['price' => 1933, 'quantity' => 1.0], ] ], [ [ ['price' => 10.0, 'quantity' => 1], ['price' => 20.0, 'quantity' => 3], ], 29.0, [ ['price' => 413, 'quantity' => 1.0], ['price' => 829, 'quantity' => 3.0], ] ], [ [ ['price' => 50.0, 'quantity' => 3], ['price' => 20.0, 'quantity' => 3], ], 100.0, [ ['price' => 2381, 'quantity' => 2.0], ['price' => 2382, 'quantity' => 1.0], ['price' => 952, 'quantity' => 3.0], ] ], [ [ ['price' => 10.0, 'shipping' => true], ['price' => 50.0, 'quantity' => 3], ['price' => 10.0, 'shipping' => true], ['price' => 20.0, 'quantity' => 3], ], 120.0, [ ['price' => 1000, 'quantity' => 1.0], ['price' => 2381, 'quantity' => 2.0], ['price' => 2382, 'quantity' => 1.0], ['price' => 1000, 'quantity' => 1.0], ['price' => 952, 'quantity' => 3.0], ] ], [ [ ['price' => 50.0, 'quantity' => 1, 'shipping' => 1], ['price' => 50.0, 'quantity' => 2], ['price' => 20.0, 'quantity' => 3], ], 100.0, [ ['price' => 2381, 'quantity' => 1.0], ['price' => 2381, 'quantity' => 1.0], ['price' => 2382, 'quantity' => 1.0], ['price' => 952, 'quantity' => 3.0], ], true ], [ [ ['price' => 50.0, 'quantity' => 1, 'shipping' => 1], ], 49.0, [ ['price' => 4900, 'quantity' => 1.0], ], true ], [ [ ['price' => 100.0, 'quantity' => 0.5], ['price' => 100.0, 'quantity' => 0.4], ], 98.0, [ ['price' => 10889, 'quantity' => 0.25], ['price' => 10888, 'quantity' => 0.25], ['price' => 10889, 'quantity' => 0.4], ], true ], [ [ ['price' => 10, 'quantity' => 1], ['price' => 300, 'quantity' => 1, 'shipping' => 1], ], 10.0, [ ['price' => 32, 'quantity' => 1], ['price' => 968, 'quantity' => 1, 'shipping' => 1], ], true ], [ [ ['price' => 10, 'quantity' => 1], ['price' => 300, 'quantity' => 1, 'shipping' => 1], ], 10.0, [ ['price' => 32, 'quantity' => 1], ['price' => 968, 'quantity' => 1, 'shipping' => 1], ], false ], [ [ ['price' => 0.01, 'quantity' => 1], ['price' => 0.02, 'quantity' => 1], ['price' => 0.03, 'quantity' => 1], ['price' => 300, 'quantity' => 1, 'shipping' => 1], ], 0.06, [ ['price' => 1, 'quantity' => 1], ['price' => 1, 'quantity' => 1], ['price' => 1, 'quantity' => 1], ['price' => 3, 'quantity' => 1, 'shipping' => 1], ], false ], [ [ ['price' => 0.01, 'quantity' => 7], ['price' => 0.02, 'quantity' => 11], ['price' => 0.03, 'quantity' => 13], ['price' => 300, 'quantity' => 1, 'shipping' => 1], ], 0.60, [ ['price' => 1, 'quantity' => 7], ['price' => 1, 'quantity' => 11], ['price' => 1, 'quantity' => 13], ['price' => 29, 'quantity' => 1, 'shipping' => 1], ], false ], [ [ ['price' => 0.01, 'quantity' => 7], ['price' => 0.02, 'quantity' => 11], ['price' => 10, 'quantity' => 1], ['price' => 300, 'quantity' => 1, 'shipping' => 1], ], 10.29, [ ['price' => 1, 'quantity' => 7], ['price' => 1, 'quantity' => 11], ['price' => 33, 'quantity' => 1], ['price' => 978, 'quantity' => 1, 'shipping' => 1], ], false ], ]; } /** * @dataProvider fromArrayDataProvider * @param array $source * @param array $expected */ public function testFromArray(array $source, array $expected): void { $receipt = new Receipt($source); if (!empty($expected)) { foreach ($expected as $property => $value) { $propertyValue = $receipt->offsetGet($property); if ($propertyValue instanceof ListObject) { self::assertEquals($value, $propertyValue->getItems()->toArray()); } else { self::assertEquals($value, $propertyValue); } } } else { self::assertEquals(array(), $receipt->getItems()->toArray()); self::assertEquals(array(), $receipt->getSettlements()->toArray()); } } public function testGetObjectId() { $instance = new Receipt(); self::assertNull($instance->getObjectId()); } public function fromArrayDataProvider(): array { $receiptItem = new ReceiptItem(); $receiptItem->setDescription('test'); $receiptItem->setQuantity(322); $receiptItem->setVatCode(4); $receiptItem->setPrice(new ReceiptItemAmount(5, 'USD')); $settlement = new Settlement(); $settlement->setType(SettlementType::PREPAYMENT); $settlement->setAmount(new MonetaryAmount(123, 'USD')); return [ [ [], [], ], [ [ 'description' => Random::str(2, 128), 'taxSystemCode' => 2, 'customer' => [ 'phone' => '1234567890', 'email' => 'test@tset.ru', ], 'items' => [ [ 'description' => 'test', 'amount' => [ 'value' => 5, 'currency' => CurrencyCode::USD, ], 'quantity' => 322, 'vat_code' => 4, ], ], 'settlements' => [ [ 'type' => SettlementType::PREPAYMENT, 'amount' => [ 'value' => 123, 'currency' => CurrencyCode::USD, ], ] ] ], [ 'tax_system_code' => 2, 'customer' => new ReceiptCustomer([ 'phone' => '1234567890', 'email' => 'test@tset.ru', ]), 'items' => [ $receiptItem, ], 'settlements' => [ $settlement, ] ], ], [ [ 'tax_system_code' => 3, 'customer' => [ 'phone' => '1234567890', 'email' => 'test@tset.com', ], 'items' => [ [ 'description' => 'test', 'quantity' => 322, 'amount' => [ 'value' => 5, 'currency' => 'USD', ], 'vat_code' => 4, ], [ 'description' => 'test', 'quantity' => 322, 'amount' => new ReceiptItemAmount(5, 'USD'), 'vat_code' => 4, ], [ 'description' => 'test', 'quantity' => 322, 'amount' => new ReceiptItemAmount([ 'value' => 5, 'currency' => 'USD', ]), 'vat_code' => 4, ], ], 'settlements' => [ [ 'type' => SettlementType::PREPAYMENT, 'amount' => [ 'value' => 123, 'currency' => 'USD' ] ], [ 'type' => SettlementType::PREPAYMENT, 'amount' => [ 'value' => 123, 'currency' => 'USD' ] ] ], 'receipt_operational_details' => [ 'operation_id' => 255, 'value' => '00-tr-589', 'created_at' => '2012-11-03T11:52:31.827Z', ], ], [ 'taxSystemCode' => 3, 'customer' => new ReceiptCustomer([ 'phone' => '1234567890', 'email' => 'test@tset.com', ]), 'items' => [ $receiptItem, $receiptItem, $receiptItem, ], 'settlements' => [ $settlement, $settlement ], 'receipt_operational_details' => new OperationalDetails([ 'operation_id' => 255, 'value' => '00-tr-589', 'created_at' => '2012-11-03T11:52:31.827Z', ]), ], ], ]; } /** * @dataProvider fromArrayCustomerDataProvider * @param array $source * @param array $expected */ public function testCustomerFromArray($source, $expected): void { $receipt = new Receipt(); $receipt->fromArray($source); if (!empty($expected)) { foreach ($expected as $property => $value) { self::assertEquals($value, $receipt->offsetGet($property)); } } else { self::assertEquals(true, $receipt->getCustomer()->isEmpty()); } } public function fromArrayCustomerDataProvider(): array { $customer = new ReceiptCustomer(); $customer->setFullName('John Doe'); $customer->setEmail('johndoe@yoomoney.ru'); $customer->setPhone('79000000000'); $customer->setInn('6321341814'); return [ [ [], [], ], [ [ 'customer' => [ 'fullName' => 'John Doe', 'email' => 'johndoe@yoomoney.ru', 'phone' => '79000000000', 'inn' => '6321341814', ], ], [ 'customer' => $customer ], ], [ [ 'customer' => [ 'full_name' => 'John Doe', 'inn' => '6321341814', 'email' => 'johndoe@yoomoney.ru', 'phone' => '79000000000', ], ], [ 'customer' => $customer ], ] ]; } } yookassa-sdk-php/tests/Model/Receipt/SupplierTest.php000064400000004424150364342670016730 0ustar00setInn($value['inn']); self::assertEquals($value['inn'], $instance->getInn()); } /** * @dataProvider invalidInnDataTest * * @param mixed $value */ public function testInvalidInn($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Supplier(); $instance->setInn($value); } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testSetGetName($value): void { $instance = new Supplier(); $instance->setName($value['name']); self::assertEquals($value['name'], $instance->getName()); } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testSetGetPhone($value): void { $instance = new Supplier(); $instance->setPhone($value['phone']); self::assertEquals($value['phone'], $instance->getPhone()); } public static function validDataProvider() { $result = [ [ [ 'name' => null, 'phone' => null, 'inn' => null, ], ], [ [ 'name' => 'John Doe', 'inn' => '6321341814', 'phone' => '79000000000', ], ], ]; for ($i = 0; $i < 7; $i++) { $test = [ 'name' => Random::str(1, 150), 'inn' => Random::str(12, 12, '1234567890'), 'phone' => Random::str(10, 10, '1234567890'), ]; $result[] = [$test]; } return $result; } public static function invalidInnDataTest() { return [ ['test'], [true], ]; } } yookassa-sdk-php/tests/Model/Receipt/MarkQuantityTest.php000064400000011112150364342670017546 0ustar00getNumerator()); self::assertEquals($options['denominator'], $instance->getDenominator()); } /** * @dataProvider validArrayDataProvider */ public function testGetSetDenominator(array $options): void { $expected = $options['denominator']; $instance = self::getInstance(); $instance->setDenominator($expected); self::assertEquals($expected, $instance->getDenominator()); self::assertEquals($expected, $instance->denominator); $instance = self::getInstance(); $instance->denominator = $expected; self::assertEquals($expected, $instance->getDenominator()); self::assertEquals($expected, $instance->denominator); } /** * @dataProvider invalidDenominatorDataProvider * * @param mixed $denominator */ public function testSetInvalidDenominator($denominator, string $exceptionClassDocumentNumber): void { $instance = self::getInstance(); $this->expectException($exceptionClassDocumentNumber); $instance->setDenominator($denominator); } /** * @dataProvider invalidDenominatorDataProvider * * @param mixed $denominator */ public function testSetterInvalidDenominator($denominator, string $exceptionClassDocumentNumber): void { $instance = self::getInstance(); $this->expectException($exceptionClassDocumentNumber); $instance->denominator = $denominator; } /** * @dataProvider validArrayDataProvider */ public function testGetSetNumerator(array $options): void { $instance = self::getInstance(); $instance->setNumerator($options['numerator']); self::assertEquals($options['numerator'], $instance->getNumerator()); self::assertEquals($options['numerator'], $instance->numerator); } /** * @dataProvider invalidNumeratorDataProvider */ public function testSetInvalidNumerator(mixed $numerator, string $exceptionClassNumerator): void { $instance = self::getInstance(); $this->expectException($exceptionClassNumerator); $instance->setNumerator($numerator); } /** * @dataProvider invalidNumeratorDataProvider */ public function testSetterInvalidNumerator(mixed $numerator, string $exceptionClassNumerator): void { $instance = self::getInstance(); $this->expectException($exceptionClassNumerator); $instance->numerator = $numerator; } public static function validArrayDataProvider() { $result = []; foreach (range(1, 10) as $i) { $result[$i][] = [ 'numerator' => Random::int(MarkQuantity::MIN_VALUE, 100), 'denominator' => Random::int(MarkQuantity::MIN_VALUE, 100), ]; } return $result; } public static function invalidDenominatorDataProvider() { return [ [null, EmptyPropertyValueException::class], [Random::int(-100, MarkQuantity::MIN_VALUE - 1), InvalidPropertyValueException::class], [-1, InvalidPropertyValueException::class], [0.0, InvalidPropertyValueException::class], [0, InvalidPropertyValueException::class], ]; } public static function invalidNumeratorDataProvider() { return [ [null, EmptyPropertyValueException::class], [Random::int(-100, MarkQuantity::MIN_VALUE - 1), InvalidPropertyValueException::class], [0.0, InvalidPropertyValueException::class], [0, InvalidPropertyValueException::class], ]; } /** * @dataProvider validArrayDataProvider */ public function testJsonSerialize(array $options): void { $instance = self::getInstance($options); $expected = $options; self::assertEquals($expected, $instance->jsonSerialize()); } protected static function getInstance($options = []) { return new MarkQuantity($options); } } yookassa-sdk-php/tests/Model/Receipt/AdditionalUserPropsTest.php000064400000011011150364342670021046 0ustar00getValue()); self::assertEquals($options['name'], $instance->getName()); } /** * @dataProvider validArrayDataProvider */ public function testGetSetValue(array $options): void { $expected = $options['value']; $instance = self::getInstance(); $instance->setValue($expected); self::assertEquals($expected, $instance->getValue()); self::assertEquals($expected, $instance->value); $instance = self::getInstance(); $instance->value = $expected; self::assertEquals($expected, $instance->getValue()); self::assertEquals($expected, $instance->value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetInvalidValue($value, string $exceptionClassName): void { $instance = self::getInstance(); self::expectException($exceptionClassName); $instance->setValue($value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetterInvalidValue($value, string $exceptionClassName): void { $instance = self::getInstance(); self::expectException($exceptionClassName); $instance->value = $value; } /** * @dataProvider validArrayDataProvider */ public function testGetSetName(array $options): void { $instance = self::getInstance(); $instance->setName($options['name']); self::assertEquals($options['name'], $instance->getName()); self::assertEquals($options['name'], $instance->name); } /** * @dataProvider invalidNameDataProvider */ public function testSetInvalidName(mixed $name, string $exceptionClassName): void { $instance = self::getInstance(); self::expectException($exceptionClassName); $instance->setName($name); } /** * @dataProvider invalidNameDataProvider */ public function testSetterInvalidName(mixed $name, string $exceptionClassName): void { $instance = self::getInstance(); self::expectException($exceptionClassName); $instance->name = $name; } public static function validArrayDataProvider() { $result = []; foreach (range(1, 10) as $i) { $result[$i][] = [ 'value' => Random::str(1, AdditionalUserProps::VALUE_MAX_LENGTH), 'name' => Random::str(1, AdditionalUserProps::NAME_MAX_LENGTH), ]; } return $result; } public static function invalidValueDataProvider() { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [Random::str(AdditionalUserProps::VALUE_MAX_LENGTH + 1), InvalidPropertyValueException::class], ]; } public static function invalidNameDataProvider() { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [Random::str(AdditionalUserProps::NAME_MAX_LENGTH + 1), InvalidPropertyValueException::class], ]; } public function invalidIncreaseDataProvider() { return [ [1, null], [1.01, ''], [1.00, true], [0.99, false], [0.99, []], [0.99, new stdClass()], [0.99, 'test'], [0.99, -1.0], [0.99, -0.99], ]; } /** * @dataProvider validArrayDataProvider */ public function testJsonSerialize(array $options): void { $instance = self::getInstance($options); $expected = $options; self::assertEquals($expected, $instance->jsonSerialize()); } protected static function getInstance($options = []) { return new AdditionalUserProps($options); } } yookassa-sdk-php/tests/Model/Receipt/IndustryDetailsTest.php000064400000017551150364342670020261 0ustar00getFederalId()); self::assertEquals($options['document_number'], $instance->getDocumentNumber()); self::assertEquals($options['document_date'], $instance->getDocumentDate()->format(IndustryDetails::DOCUMENT_DATE_FORMAT)); self::assertEquals($options['value'], $instance->getValue()); } /** * @dataProvider validArrayDataProvider */ public function testGetSetValue(array $options): void { $expected = $options['value']; $instance = self::getInstance(); $instance->setValue($expected); self::assertEquals($expected, $instance->getValue()); self::assertEquals($expected, $instance->value); $instance = self::getInstance(); $instance->value = $expected; self::assertEquals($expected, $instance->getValue()); self::assertEquals($expected, $instance->value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetInvalidValue($value, string $exceptionClassDocumentNumber): void { $instance = self::getInstance(); self::expectException($exceptionClassDocumentNumber); $instance->setValue($value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetterInvalidValue($value, string $exceptionClassDocumentNumber): void { $instance = self::getInstance(); self::expectException($exceptionClassDocumentNumber); $instance->value = $value; } /** * @dataProvider validArrayDataProvider */ public function testGetSetDocumentNumber(array $options): void { $instance = self::getInstance(); $instance->setDocumentNumber($options['document_number']); self::assertEquals($options['document_number'], $instance->getDocumentNumber()); self::assertEquals($options['document_number'], $instance->document_number); } /** * @dataProvider invalidDocumentNumberDataProvider */ public function testSetInvalidDocumentNumber(mixed $document_number, string $exceptionClassDocumentNumber): void { $instance = self::getInstance(); self::expectException($exceptionClassDocumentNumber); $instance->setDocumentNumber($document_number); } /** * @dataProvider invalidDocumentNumberDataProvider */ public function testSetterInvalidDocumentNumber(mixed $document_number, string $exceptionClassDocumentNumber): void { $instance = self::getInstance(); self::expectException($exceptionClassDocumentNumber); $instance->document_number = $document_number; } /** * @dataProvider validArrayDataProvider */ public function testGetSetFederalId(array $options): void { $instance = self::getInstance(); $instance->setFederalId($options['federal_id']); self::assertEquals($options['federal_id'], $instance->getFederalId()); self::assertEquals($options['federal_id'], $instance->federal_id); } /** * @dataProvider invalidFederalIdDataProvider */ public function testSetInvalidFederalId(mixed $federal_id, string $exceptionClassFederalId): void { $instance = self::getInstance(); self::expectException($exceptionClassFederalId); $instance->setFederalId($federal_id); } /** * @dataProvider invalidFederalIdDataProvider */ public function testSetterInvalidFederalId(mixed $federal_id, string $exceptionClassFederalId): void { $instance = self::getInstance(); self::expectException($exceptionClassFederalId); $instance->federal_id = $federal_id; } /** * @dataProvider validArrayDataProvider */ public function testGetSetDocumentDate(array $options): void { $instance = self::getInstance(); $instance->setDocumentDate($options['document_date']); self::assertEquals($options['document_date'], $instance->getDocumentDate()->format(IndustryDetails::DOCUMENT_DATE_FORMAT)); self::assertEquals($options['document_date'], $instance->document_date->format(IndustryDetails::DOCUMENT_DATE_FORMAT)); } /** * @dataProvider invalidDocumentDateDataProvider */ public function testSetInvalidDocumentDate(mixed $document_date, string $exceptionClassDocumentDate): void { $instance = self::getInstance(); self::expectException($exceptionClassDocumentDate); $instance->setDocumentDate($document_date); } /** * @dataProvider invalidDocumentDateDataProvider */ public function testSetterInvalidDocumentDate(mixed $document_date, string $exceptionClassDocumentDate): void { $instance = self::getInstance(); self::expectException($exceptionClassDocumentDate); $instance->document_date = $document_date; } public static function validArrayDataProvider() { $result = []; foreach (range(1, 10) as $i) { $result[$i][] = [ 'federal_id' => Random::value([ '00' . Random::int(1, 9), '0' . Random::int(1, 6) . Random::int(0, 9), '07' . Random::int(0, 3) ]), 'document_date' => date(IndustryDetails::DOCUMENT_DATE_FORMAT, Random::int(10000000, 29999999)), 'document_number' => Random::str(1, IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH), 'value' => Random::str(1, IndustryDetails::VALUE_MAX_LENGTH), ]; } return $result; } public static function invalidValueDataProvider() { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [Random::str(IndustryDetails::VALUE_MAX_LENGTH + 1), InvalidPropertyValueException::class], ]; } public static function invalidDocumentNumberDataProvider() { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [Random::str(IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH + 1), InvalidPropertyValueException::class], ]; } public static function invalidFederalIdDataProvider() { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], ]; } public static function invalidDocumentDateDataProvider() { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [[], TypeError::class], [fopen(__FILE__, 'r'), TypeError::class], [Random::str(IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH + 1), InvalidPropertyValueException::class], [false, EmptyPropertyValueException::class], ]; } /** * @dataProvider validArrayDataProvider */ public function testJsonSerialize(array $options): void { $instance = self::getInstance($options); $expected = $options; self::assertEquals($expected, $instance->jsonSerialize()); } protected static function getInstance($options = []) { return new IndustryDetails($options); } } yookassa-sdk-php/tests/Model/Receipt/ReceiptCustomerTest.php000064400000031761150364342670020246 0ustar00setPhone($value); if (null === $value || '' === $value) { self::assertNull($instance->getPhone()); self::assertNull($instance->phone); } else { self::assertEquals($value, $instance->getPhone()); self::assertEquals($value, $instance->phone); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetterPhone($options): void { $instance = new ReceiptCustomer(); $value = !empty($options['customer']['phone']) ? $options['customer']['phone'] : (!empty($options['phone']) ? $options['phone'] : null); $instance->phone = $value; if (null === $value || '' === $value) { self::assertNull($instance->getPhone()); self::assertNull($instance->phone); } else { self::assertEquals($value, $instance->getPhone()); self::assertEquals($value, $instance->phone); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testGetSetEmail($options): void { $instance = new ReceiptCustomer(); $value = !empty($options['customer']['email']) ? $options['customer']['email'] : (!empty($options['email']) ? $options['email'] : null); $instance->setEmail($value); if (null === $value || '' === $value) { self::assertNull($instance->getEmail()); self::assertNull($instance->email); } else { self::assertEquals($value, $instance->getEmail()); self::assertEquals($value, $instance->email); } } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetterEmail($options): void { $instance = new ReceiptCustomer(); $value = !empty($options['customer']['email']) ? $options['customer']['email'] : (!empty($options['email']) ? $options['email'] : null); $instance->email = $value; if (null === $value || '' === $value) { self::assertNull($instance->getEmail()); self::assertNull($instance->email); } else { self::assertEquals($value, $instance->getEmail()); self::assertEquals($value, $instance->email); } } /** * @dataProvider validFullNameProvider * * @param mixed $value */ public function testGetSetFullName($value): void { $instance = new ReceiptCustomer(); $instance->setFullName($value); if (null === $value || '' === $value) { self::assertNull($instance->getFullName()); self::assertNull($instance->fullName); self::assertNull($instance->full_name); } else { self::assertEquals($value, $instance->getFullName()); self::assertEquals($value, $instance->fullName); self::assertEquals($value, $instance->full_name); } } /** * @dataProvider validFullNameProvider * * @param mixed $value */ public function testSetterFullName($value): void { $instance = new ReceiptCustomer(); $instance->fullName = $value; if (null === $value || '' === $value) { self::assertNull($instance->getFullName()); self::assertNull($instance->fullName); self::assertNull($instance->full_name); } else { self::assertEquals($value, $instance->getFullName()); self::assertEquals($value, $instance->fullName); self::assertEquals($value, $instance->full_name); } } /** * @dataProvider validFullNameProvider * * @param mixed $value */ public function testSetterSnakeFullName($value): void { $instance = new ReceiptCustomer(); $instance->full_name = $value; if (null === $value || '' === $value) { self::assertNull($instance->getFullName()); self::assertNull($instance->fullName); self::assertNull($instance->full_name); } else { self::assertEquals($value, $instance->getFullName()); self::assertEquals($value, $instance->fullName); self::assertEquals($value, $instance->full_name); } } public static function validFullNameProvider() { return [ [null], [''], [Random::str(1)], [Random::str(1, 256)], [Random::str(256)], ]; } /** * @dataProvider invalidFullNameProvider * * @param mixed $value */ public function testSetInvalidFullName($value): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptCustomer(); $instance->setFullName($value); } public static function invalidFullNameProvider() { return [ [Random::str(257)], ]; } /** * @dataProvider validInnProvider * * @param mixed $value */ public function testGetSetInn($value): void { $instance = new ReceiptCustomer(); $instance->setInn($value); if (null === $value || '' === $value) { self::assertNull($instance->getInn()); self::assertNull($instance->inn); } else { self::assertEquals($value, $instance->getInn()); self::assertEquals($value, $instance->inn); } } /** * @dataProvider validInnProvider * * @param mixed $options */ public function testSetterInn($options): void { $instance = new ReceiptCustomer(); $instance->inn = $options; if (null === $options || '' === $options) { self::assertNull($instance->getInn()); self::assertNull($instance->inn); } else { self::assertEquals($options, $instance->getInn()); self::assertEquals($options, $instance->inn); } } public static function validInnProvider() { return [ [null], [''], ['1234567890'], ['123456789012'], [Random::str(10, 10, '1234567890')], [Random::str(12, 12, '1234567890')], ]; } /** * @dataProvider invalidInnProvider * * @param mixed $value */ public function testSetInvalidInn($value): void { $this->expectException(InvalidArgumentException::class); $instance = new ReceiptCustomer(); $instance->setInn($value); } public static function invalidInnProvider() { return [ [true], ['123456789'], ['12345678901'], ['1234567890123'], [Random::str(1)], [Random::str(10, 10, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')], [Random::str(12, 12, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')], [Random::str(13, 13, '1234567890')], ]; } public static function validDataProvider() { return [ [ [ 'customer' => [], ], ], [ [ 'customer' => [], 'phone' => Random::str(10, 10, '1234567890'), 'email' => uniqid('', true) . '@' . uniqid('', true), ], ], [ [ 'customer' => [ 'phone' => Random::str(10, 10, '1234567890'), 'email' => uniqid('', true) . '@' . uniqid('', true), ], ], ], [ [ 'customer' => [ 'full_name' => Random::str(1, 256), 'inn' => Random::str(12, 12, '1234567890'), ], 'phone' => Random::str(10, 10, '1234567890'), 'email' => uniqid('', true) . '@' . uniqid('', true), ], ], [ [ 'customer' => [ 'full_name' => Random::str(1, 256), 'phone' => Random::str(10, 10, '1234567890'), 'email' => uniqid('', true) . '@' . uniqid('', true), 'inn' => Random::str(10, 10, '1234567890'), ], ], ], ]; } /** * @dataProvider fromArrayDataProvider */ public function testCustomerFromArray(mixed $source, mixed $expected): void { $receipt = new Receipt(); $receipt->fromArray($source); if (!empty($expected)) { foreach ($expected->jsonSerialize() as $property => $value) { self::assertEquals($value, $expected->offsetGet($property)); } } else { self::assertEquals(true, $receipt->getCustomer()->isEmpty()); } } public static function fromArrayDataProvider() { $customer = new ReceiptCustomer(); $customer->setFullName('John Doe'); $customer->setEmail('johndoe@yoomoney.ru'); $customer->setPhone('+79000000000'); $customer->setInn('6321341814'); return [ [ [], null, ], [ [ 'customer' => [ 'fullName' => 'John Doe', 'email' => 'johndoe@yoomoney.ru', 'phone' => '79000000000', 'inn' => '6321341814', ], ], $customer, ], [ [ 'customer' => [ 'full_name' => 'John Doe', 'inn' => '6321341814', 'email' => 'johndoe@yoomoney.ru', 'phone' => '79000000000', ], ], $customer, ], [ [ 'customer' => [ 'fullName' => 'John Doe', 'inn' => '6321341814', ], 'email' => 'johndoe@yoomoney.ru', 'phone' => '79000000000', ], $customer, ], [ [ 'customer' => [ 'full_name' => 'John Doe', 'inn' => '6321341814', 'email' => 'johndoe@yoomoney.ru', ], 'phone' => '79000000000', ], $customer, ], [ [ 'customer' => [ 'fullName' => 'John Doe', 'inn' => '6321341814', 'phone' => '79000000000', ], 'email' => 'johndoe@yoomoney.ru', ], $customer, ], [ [ 'customer' => [ 'full_name' => 'John Doe', 'inn' => '6321341814', 'phone' => '79000000000', 'email' => 'johndoe@yoomoney.ru', ], 'email' => 'johndoeOld@yoomoney.ru', ], $customer, ], [ [ 'customer' => [ 'fullName' => 'John Doe', 'inn' => '6321341814', 'phone' => '79000000000', 'email' => 'johndoe@yoomoney.ru', ], 'phone' => '79111111111', ], $customer, ], [ [ 'customer' => [ 'full_name' => 'John Doe', 'inn' => '6321341814', 'phone' => '79000000000', 'email' => 'johndoe@yoomoney.ru', ], 'phone' => '79111111111', 'email' => 'johndoeOld@yoomoney.ru', ], $customer, ], ]; } } yookassa-sdk-php/tests/Model/Receipt/MarkCodeInfoTest.php000064400000042147150364342670017432 0ustar00getMarkCodeRaw()); self::assertEquals($options['unknown'], $instance->getUnknown()); } /** * @dataProvider validArrayDataProvider */ public function testGetSetMarkCodeRaw(array $options): void { $expected = $options['mark_code_raw']; $instance = self::getInstance(); $instance->setMarkCodeRaw($expected); self::assertEquals($expected, $instance->getMarkCodeRaw()); self::assertEquals($expected, $instance->mark_code_raw); $instance = self::getInstance(); $instance->mark_code_raw = $expected; self::assertEquals($expected, $instance->getMarkCodeRaw()); self::assertEquals($expected, $instance->mark_code_raw); } /** * @dataProvider invalidMarkCodeRawDataProvider * * @param mixed $value */ public function testSetInvalidMarkCodeRaw($value, string $exceptionClassDocumentNumber): void { $instance = self::getInstance(); self::expectException($exceptionClassDocumentNumber); $instance->setMarkCodeRaw($value); } /** * @dataProvider invalidMarkCodeRawDataProvider * * @param mixed $value */ public function testSetterInvalidMarkCodeRaw($value, string $exceptionClassDocumentNumber): void { $instance = self::getInstance(); self::expectException($exceptionClassDocumentNumber); $instance->mark_code_raw = $value; } public static function invalidMarkCodeRawDataProvider() { return [ [[], TypeError::class], ]; } /** * @dataProvider validArrayDataProvider */ public function testGetSetUnknown(array $options): void { $expected = $options['unknown']; $instance = self::getInstance(); $instance->setUnknown($expected); self::assertEquals($expected, $instance->getUnknown()); self::assertEquals($expected, $instance->unknown); $instance = self::getInstance(); $instance->unknown = $expected; self::assertEquals($expected, $instance->getUnknown()); self::assertEquals($expected, $instance->unknown); } /** * @dataProvider invalidUnknownDataProvider * * @param mixed $value */ public function testSetInvalidUnknown($value, string $exceptionClassDocumentNumber): void { $instance = self::getInstance(); self::expectException($exceptionClassDocumentNumber); $instance->setUnknown($value); } /** * @dataProvider invalidUnknownDataProvider * * @param mixed $value */ public function testSetterInvalidUnknown($value, string $exceptionClassDocumentNumber): void { $instance = self::getInstance(); self::expectException($exceptionClassDocumentNumber); $instance->unknown = $value; } public static function invalidUnknownDataProvider() { return [ [[], TypeError::class], [fopen(__FILE__, 'r'), TypeError::class], [Random::str(MarkCodeInfo::MAX_UNKNOWN_LENGTH + 1), InvalidPropertyValueException::class] ]; } /** * @dataProvider validArrayDataProvider */ public function testGetSetEan8(array $options): void { $expected = $options['ean_8']; $instance = self::getInstance(); $instance->setEan8($expected); self::assertEquals($expected, $instance->getEan8()); self::assertEquals($expected, $instance->ean_8); $instance = self::getInstance(); $instance->ean_8 = $expected; self::assertEquals($expected, $instance->getEan8()); self::assertEquals($expected, $instance->ean_8); } /** * @dataProvider invalidEan8DataProvider * * @param mixed $value */ public function testSetInvalidEan8($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->setEan8($value); } /** * @dataProvider invalidEan8DataProvider * * @param mixed $value */ public function testSetterInvalidEan8($value, string $exception): void { $instance = self::getInstance(); self::expectException($exception); $instance->ean_8 = $value; } public static function invalidEan8DataProvider() { return [ [Random::str(MarkCodeInfo::EAN_8_LENGTH + 1), InvalidPropertyValueException::class], ]; } /** * @dataProvider validArrayDataProvider */ public function testGetSetEan13(array $options): void { $expected = $options['ean_13']; $instance = self::getInstance(); $instance->setEan13($expected); self::assertEquals($expected, $instance->getEan13()); self::assertEquals($expected, $instance->ean_13); $instance = self::getInstance(); $instance->ean_13 = $expected; self::assertEquals($expected, $instance->getEan13()); self::assertEquals($expected, $instance->ean_13); } /** * @dataProvider invalidEan13DataProvider * * @param mixed $value */ public function testSetInvalidEan13($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->setEan13($value); } /** * @dataProvider invalidEan13DataProvider * * @param mixed $value */ public function testSetterInvalidEan13($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->ean_13 = $value; } public static function invalidEan13DataProvider() { return [ [Random::str(MarkCodeInfo::EAN_13_LENGTH + 1), InvalidPropertyValueException::class], ]; } /** * @dataProvider validArrayDataProvider */ public function testGetSetItf14(array $options): void { $expected = $options['itf_14']; $instance = self::getInstance(); $instance->setItf14($expected); self::assertEquals($expected, $instance->getItf14()); self::assertEquals($expected, $instance->itf_14); $instance = self::getInstance(); $instance->itf_14 = $expected; self::assertEquals($expected, $instance->getItf14()); self::assertEquals($expected, $instance->itf_14); } /** * @dataProvider invalidItf14DataProvider * * @param mixed $value */ public function testSetInvalidItf14($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->setItf14($value); } /** * @dataProvider invalidItf14DataProvider * * @param mixed $value */ public function testSetterInvalidItf14($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->itf_14 = $value; } public static function invalidItf14DataProvider() { return [ [Random::str(MarkCodeInfo::ITF_14_LENGTH + 1), InvalidPropertyValueException::class], ]; } /** * @dataProvider validArrayDataProvider */ public function testGetSetGs10(array $options): void { $expected = $options['gs_10']; $instance = self::getInstance(); $instance->setGs10($expected); self::assertEquals($expected, $instance->getGs10()); self::assertEquals($expected, $instance->gs_10); $instance = self::getInstance(); $instance->gs_10 = $expected; self::assertEquals($expected, $instance->getGs10()); self::assertEquals($expected, $instance->gs_10); } /** * @dataProvider invalidGs10DataProvider * * @param mixed $value */ public function testSetInvalidGs10($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->setGs10($value); } /** * @dataProvider invalidGs10DataProvider * * @param mixed $value */ public function testSetterInvalidGs10($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->gs_10 = $value; } public static function invalidGs10DataProvider() { return [ [Random::str(MarkCodeInfo::MAX_GS_10_LENGTH + 1), InvalidPropertyValueException::class], ]; } /** * @dataProvider validArrayDataProvider */ public function testGetSetGs1m(array $options): void { $expected = $options['gs_1m']; $instance = self::getInstance(); $instance->setGs1m($expected); self::assertEquals($expected, $instance->getGs1m()); self::assertEquals($expected, $instance->gs_1m); $instance = self::getInstance(); $instance->gs_1m = $expected; self::assertEquals($expected, $instance->getGs1m()); self::assertEquals($expected, $instance->gs_1m); } /** * @dataProvider invalidGs1mDataProvider * * @param mixed $value */ public function testSetInvalidGs1m($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->setGs1m($value); } /** * @dataProvider invalidGs1mDataProvider * * @param mixed $value */ public function testSetterInvalidGs1m($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->gs_1m = $value; } public static function invalidGs1mDataProvider() { return [ [Random::str(MarkCodeInfo::MAX_GS_1M_LENGTH + 1), InvalidPropertyValueException::class], ]; } /** * @dataProvider validArrayDataProvider */ public function testGetSetShort(array $options): void { $expected = $options['short']; $instance = self::getInstance(); $instance->setShort($expected); self::assertEquals($expected, $instance->getShort()); self::assertEquals($expected, $instance->short); $instance = self::getInstance(); $instance->short = $expected; self::assertEquals($expected, $instance->getShort()); self::assertEquals($expected, $instance->short); } /** * @dataProvider invalidShortDataProvider * * @param mixed $value */ public function testSetInvalidShort($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->setShort($value); } /** * @dataProvider invalidShortDataProvider * * @param mixed $value */ public function testSetterInvalidShort($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->short = $value; } public static function invalidShortDataProvider() { return [ [Random::str(MarkCodeInfo::MAX_SHORT_LENGTH + 1), InvalidPropertyValueException::class], ]; } /** * @dataProvider validArrayDataProvider */ public function testGetSetFur(array $options): void { $expected = $options['fur']; $instance = self::getInstance(); $instance->setFur($expected); self::assertEquals($expected, $instance->getFur()); self::assertEquals($expected, $instance->fur); $instance = self::getInstance(); $instance->fur = $expected; self::assertEquals($expected, $instance->getFur()); self::assertEquals($expected, $instance->fur); } /** * @dataProvider invalidFurDataProvider * * @param mixed $value */ public function testSetInvalidFur($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->setFur($value); } /** * @dataProvider invalidFurDataProvider * * @param mixed $value */ public function testSetterInvalidFur($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->fur = $value; } public static function invalidFurDataProvider() { return [ [Random::str(MarkCodeInfo::FUR_LENGTH + 1), InvalidPropertyValueException::class], ]; } /** * @dataProvider validArrayDataProvider */ public function testGetSetEgais20(array $options): void { $expected = $options['egais_20']; $instance = self::getInstance(); $instance->setEgais20($expected); self::assertEquals($expected, $instance->getEgais20()); self::assertEquals($expected, $instance->egais_20); $instance = self::getInstance(); $instance->egais_20 = $expected; self::assertEquals($expected, $instance->getEgais20()); self::assertEquals($expected, $instance->egais_20); } /** * @dataProvider invalidEgais20DataProvider * * @param mixed $value */ public function testSetInvalidEgais20($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->setEgais20($value); } /** * @dataProvider invalidEgais20DataProvider * * @param mixed $value */ public function testSetterInvalidEgais20($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->egais_20 = $value; } public static function invalidEgais20DataProvider() { return [ [Random::str(MarkCodeInfo::EGAIS_20_LENGTH + 1), InvalidPropertyValueException::class], ]; } /** * @dataProvider validArrayDataProvider */ public function testGetSetEgais30(array $options): void { $expected = $options['egais_30']; $instance = self::getInstance(); $instance->setEgais30($expected); self::assertEquals($expected, $instance->getEgais30()); self::assertEquals($expected, $instance->egais_30); $instance = self::getInstance(); $instance->egais_30 = $expected; self::assertEquals($expected, $instance->getEgais30()); self::assertEquals($expected, $instance->egais_30); } /** * @dataProvider invalidEgais30DataProvider * * @param mixed $value */ public function testSetInvalidEgais30($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->setEgais30($value); } /** * @dataProvider invalidEgais30DataProvider * * @param mixed $value */ public function testSetterInvalidEgais30($value, string $exception): void { $instance = self::getInstance(); $this->expectException($exception); $instance->egais_30 = $value; } public static function invalidEgais30DataProvider() { return [ [Random::str(MarkCodeInfo::EGAIS_30_LENGTH + 1), InvalidPropertyValueException::class], ]; } public static function validArrayDataProvider() { $result = []; foreach (range(1, 10) as $i) { $result[$i][] = [ 'mark_code_raw' => Random::str(1, 256), 'unknown' => Random::str(1, MarkCodeInfo::MAX_UNKNOWN_LENGTH), 'ean_8' => Random::str(MarkCodeInfo::EAN_8_LENGTH), 'ean_13' => Random::str(MarkCodeInfo::EAN_13_LENGTH), 'itf_14' => Random::str(MarkCodeInfo::ITF_14_LENGTH), 'gs_10' => Random::str(MarkCodeInfo::MAX_GS_10_LENGTH), 'gs_1m' => Random::str(MarkCodeInfo::MAX_GS_1M_LENGTH), 'short' => Random::str(MarkCodeInfo::MAX_SHORT_LENGTH), 'fur' => Random::str(MarkCodeInfo::FUR_LENGTH), 'egais_20' => Random::str(MarkCodeInfo::EGAIS_20_LENGTH), 'egais_30' => Random::str(MarkCodeInfo::EGAIS_30_LENGTH), ]; } return $result; } /** * @dataProvider validArrayDataProvider */ public function testJsonSerialize(array $options): void { $instance = self::getInstance($options); $expected = $options; self::assertEquals($expected, $instance->jsonSerialize()); } protected static function getInstance($options = []) { return new MarkCodeInfo($options); } } yookassa-sdk-php/tests/Model/Receipt/ReceiptItemTest.php000064400000136214150364342670017342 0ustar00getTestInstance(); $instance->setDescription($value); self::assertEquals((string) $value, $instance->getDescription()); self::assertEquals((string) $value, $instance->description); } /** * @dataProvider validDescriptionDataProvider * * @param mixed $value */ public function testSetterDescription($value): void { $instance = $this->getTestInstance(); $instance->description = $value; self::assertEquals((string) $value, $instance->getDescription()); self::assertEquals((string) $value, $instance->description); } public static function validDescriptionDataProvider() { return [ [Random::str(1)], [Random::str(2, 31)], [Random::str(32)], [new StringObject(Random::str(64))], [123], [45.3], ]; } /** * @dataProvider invalidDescriptionDataProvider * * @param mixed $value */ public function testSetInvalidDescription($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setDescription($value); } /** * @dataProvider invalidDescriptionDataProvider * * @param mixed $value */ public function testSetterInvalidDescription($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->description = $value; } public static function invalidDescriptionDataProvider() { return [ [null], [''], [new StringObject('')], [false], [Random::str(129, 180)], ]; } /** * @dataProvider validQuantityDataProvider * * @param mixed $value */ public function testGetSetQuantity($value): void { $instance = $this->getTestInstance(); $instance->setQuantity($value); self::assertEquals((float) $value, $instance->getQuantity()); self::assertEquals((float) $value, $instance->quantity); } /** * @dataProvider validQuantityDataProvider * * @param mixed $value */ public function testSetterQuantity($value): void { $instance = $this->getTestInstance(); $instance->quantity = $value; self::assertEquals((float) $value, $instance->getQuantity()); self::assertEquals((float) $value, $instance->quantity); } public static function validQuantityDataProvider() { return [ [1], [1.3], [0.001], [10000.001], ['3.1415'], [Random::float(0.001, 9999.999)], [Random::int(1, 9999)], ]; } /** * @dataProvider invalidQuantityDataProvider * * @param mixed $value */ public function testSetInvalidQuantity($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setQuantity($value); } /** * @dataProvider invalidQuantityDataProvider * * @param mixed $value */ public function testSetterInvalidQuantity($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->quantity = $value; } public static function invalidQuantityDataProvider() { return [ [null], [0.0], [Random::float(-100, -0.001)], ]; } /** * @dataProvider validVatCodeDataProvider * * @param mixed $value */ public function testGetSetVatCode($value): void { $instance = $this->getTestInstance(); $instance->setVatCode($value); if (null === $value || '' === $value) { self::assertNull($instance->getVatCode()); self::assertNull($instance->vatCode); self::assertNull($instance->vat_code); } else { self::assertEquals((int) $value, $instance->getVatCode()); self::assertEquals((int) $value, $instance->vatCode); self::assertEquals((int) $value, $instance->vat_code); } } /** * @dataProvider validVatCodeDataProvider * * @param mixed $value */ public function testSetterVatCode($value): void { $instance = $this->getTestInstance(); $instance->vatCode = $value; if (null === $value || '' === $value) { self::assertNull($instance->getVatCode()); self::assertNull($instance->vatCode); self::assertNull($instance->vat_code); } else { self::assertEquals((int) $value, $instance->getVatCode()); self::assertEquals((int) $value, $instance->vatCode); self::assertEquals((int) $value, $instance->vat_code); } } /** * @dataProvider validDataAgentType * * @param mixed $value */ public function testSetAgentType($value): void { $instance = $this->getTestInstance(); $instance->setAgentType($value); self::assertSame($value, $instance->getAgentType()); } public static function validDataAgentType() { $values = [ [null], ]; for ($i = 0; $i < 5; $i++) { $values[] = [Random::value(AgentType::getValidValues())]; } return $values; } /** * @dataProvider invalidAgentTypeDataProvider * * @param mixed $value * @param mixed $exception */ public function testSetInvalidAgentType($value, $exception): void { $this->expectException($exception); $this->getTestInstance()->setAgentType($value); } /** * @dataProvider invalidAgentTypeDataProvider * * @param mixed $value * @param mixed $exception */ public function testSetterInvalidAgentType($value, $exception): void { $this->expectException($exception); $this->getTestInstance()->agent_type = $value; } public static function invalidAgentTypeDataProvider() { return [ [Random::str(10), InvalidPropertyValueException::class], ]; } /** * @dataProvider validDataSupplier * * @param mixed $value */ public function testSetSupplier($value): void { $instance = $this->getTestInstance(); $instance->setSupplier($value); if (is_array($value)) { self::assertEquals($value, $instance->getSupplier()->toArray()); } else { self::assertEquals($value, $instance->getSupplier()); } } /** * @dataProvider invalidSupplierDataProvider * * @param mixed $value * @param mixed $exception */ public function testSetInvalidSupplier($value, $exception): void { $this->expectException($exception); $this->getTestInstance()->setSupplier($value); } /** * @dataProvider invalidSupplierDataProvider * * @param mixed $value * @param mixed $exception */ public function testSetterInvalidSupplier($value, $exception): void { $this->expectException($exception); $this->getTestInstance()->supplier = $value; } public static function invalidSupplierDataProvider() { return [ [1, InvalidPropertyValueTypeException::class], [Random::str(10), InvalidPropertyValueTypeException::class], [true, InvalidPropertyValueTypeException::class], [new stdClass(), InvalidPropertyValueTypeException::class], ]; } /** * @return array[] * * @throws Exception */ public static function validDataSupplier(): array { $validData = [ [null], [ [ 'name' => Random::str(1, 100), 'phone' => '79000000000', 'inn' => '1000000000', ], ], ]; for ($i = 0; $i < 3; $i++) { $supplier = [ new Supplier( [ 'name' => Random::str(1, 100), 'phone' => '79000000000', 'inn' => '1000000000', ] ), ]; $validData[] = $supplier; } return $validData; } /** * @dataProvider validVatCodeDataProvider * * @param mixed $value */ public function testSetterSnakeVatCode($value): void { $instance = $this->getTestInstance(); $instance->vat_code = $value; if (null === $value || '' === $value) { self::assertNull($instance->getVatCode()); self::assertNull($instance->vatCode); self::assertNull($instance->vat_code); } else { self::assertEquals((int) $value, $instance->getVatCode()); self::assertEquals((int) $value, $instance->vatCode); self::assertEquals((int) $value, $instance->vat_code); } } /** * @dataProvider validPaymentSubjectDataProvider * * @param mixed $value */ public function testSetterPaymentSubject($value): void { $instance = $this->getTestInstance(); $instance->payment_subject = $value; if (null === $value || '' === $value) { self::assertNull($instance->getPaymentSubject()); self::assertNull($instance->payment_subject); self::assertNull($instance->paymentSubject); } else { self::assertContains($instance->getPaymentSubject(), PaymentSubject::getValidValues()); self::assertContains($instance->payment_subject, PaymentSubject::getValidValues()); self::assertContains($instance->paymentSubject, PaymentSubject::getValidValues()); } } /** * @dataProvider validPaymentSubjectDataProvider * * @param mixed $value */ public function testSetterSnakePaymentSubject($value): void { $instance = $this->getTestInstance(); $instance->paymentSubject = $value; if (null === $value || '' === $value) { self::assertNull($instance->getPaymentSubject()); self::assertNull($instance->payment_subject); self::assertNull($instance->paymentSubject); } else { self::assertContains($instance->getPaymentSubject(), PaymentSubject::getValidValues()); self::assertContains($instance->payment_subject, PaymentSubject::getValidValues()); self::assertContains($instance->paymentSubject, PaymentSubject::getValidValues()); } } /** * @dataProvider validPaymentModeDataProvider * * @param mixed $value */ public function testSetterPaymentMode($value): void { $instance = $this->getTestInstance(); $instance->payment_mode = $value; if (null === $value || '' === $value) { self::assertNull($instance->getPaymentMode()); self::assertNull($instance->payment_mode); self::assertNull($instance->paymentMode); } else { self::assertContains($instance->getPaymentMode(), PaymentMode::getValidValues()); self::assertContains($instance->payment_mode, PaymentMode::getValidValues()); self::assertContains($instance->paymentMode, PaymentMode::getValidValues()); } } /** * @dataProvider validPaymentModeDataProvider * * @param mixed $value */ public function testSetterSnakePaymentMode($value): void { $instance = $this->getTestInstance(); $instance->paymentMode = $value; if (null === $value || '' === $value) { self::assertNull($instance->getPaymentMode()); self::assertNull($instance->payment_mode); self::assertNull($instance->paymentMode); } else { self::assertContains($instance->getPaymentMode(), PaymentMode::getValidValues()); self::assertContains($instance->payment_mode, PaymentMode::getValidValues()); self::assertContains($instance->paymentMode, PaymentMode::getValidValues()); } } public static function validVatCodeDataProvider() { return [ [1], [2], [3], [4], [5], [6], ]; } public static function validPaymentSubjectDataProvider() { return [ [null], [''], [PaymentSubject::ANOTHER], [PaymentSubject::AGENT_COMMISSION], [PaymentSubject::PAYMENT], [PaymentSubject::GAMBLING_PRIZE], [PaymentSubject::GAMBLING_BET], [PaymentSubject::COMPOSITE], [PaymentSubject::INTELLECTUAL_ACTIVITY], [PaymentSubject::LOTTERY_PRIZE], [PaymentSubject::LOTTERY], [PaymentSubject::SERVICE], [PaymentSubject::JOB], [PaymentSubject::EXCISE], [PaymentSubject::COMMODITY], ]; } public static function validPaymentModeDataProvider() { return [ [null], [''], [PaymentMode::ADVANCE], [PaymentMode::CREDIT], [PaymentMode::CREDIT_PAYMENT], [PaymentMode::FULL_PAYMENT], [PaymentMode::FULL_PREPAYMENT], [PaymentMode::PARTIAL_PAYMENT], [PaymentMode::PARTIAL_PREPAYMENT], ]; } /** * @dataProvider invalidVatCodeDataProvider * * @param mixed $value */ public function testSetInvalidVatCode($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setVatCode($value); } /** * @dataProvider invalidVatCodeDataProvider * * @param mixed $value */ public function testSetterInvalidVatCode($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->vatCode = $value; } /** * @dataProvider invalidVatCodeDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeVatCode($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->vat_code = $value; } public static function invalidVatCodeDataProvider() { return [ [0], [7], [Random::int(-100, -1)], [Random::int(8, 100)], ]; } /** * @dataProvider validPriceDataProvider */ public function testGetSetPrice(mixed $value): void { $instance = $this->getTestInstance(); $instance->setPrice($value); if (is_array($value)) { self::assertSame($value, $instance->getPrice()->toArray()); self::assertSame($value, $instance->price->toArray()); } else { self::assertSame($value, $instance->getPrice()); self::assertSame($value, $instance->price); } } /** * @dataProvider validPriceDataProvider */ public function testSetterPrice(mixed $value): void { $instance = $this->getTestInstance(); $instance->price = $value; if (is_array($value)) { self::assertSame($value, $instance->getPrice()->toArray()); self::assertSame($value, $instance->price->toArray()); } else { self::assertSame($value, $instance->getPrice()); self::assertSame($value, $instance->price); } } public static function validPriceDataProvider() { return [ [ [ 'value' => number_format(Random::float(1, 100), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ], [ new ReceiptItemAmount([ 'value' => number_format(Random::float(1, 100), 2, '.', ''), 'currency' => Random::value(CurrencyCode::getValidValues()), ]), ], [ new ReceiptItemAmount( number_format(Random::float(1, 100), 2, '.', ''), Random::value(CurrencyCode::getValidValues()) ), ], [ new ReceiptItemAmount(), ], ]; } /** * @dataProvider invalidPriceDataProvider * * @param mixed $value */ public function testSetInvalidPrice($value, string $exceptionType): void { $this->expectException($exceptionType); $this->getTestInstance()->setPrice($value); } /** * @dataProvider invalidPriceDataProvider * * @param mixed $value */ public function testSetterInvalidPrice($value, string $exceptionType): void { $this->expectException($exceptionType); $this->getTestInstance()->price = $value; } public static function invalidPriceDataProvider() { return [ [null, TypeError::class], ['', TypeError::class], [1.0, TypeError::class], [1, TypeError::class], [true, TypeError::class], [false, TypeError::class], [new stdClass(), TypeError::class], ]; } /** * @dataProvider validIsShippingDataProvider * * @param mixed $value */ public function testGetSetIsShipping($value): void { $instance = $this->getTestInstance(); self::assertFalse($instance->isShipping()); $instance->setIsShipping($value); if ($value) { self::assertTrue($instance->isShipping()); } else { self::assertFalse($instance->isShipping()); } } /** * @dataProvider validIsShippingDataProvider * * @param mixed $value */ public function testSetterIsShipping($value): void { $instance = $this->getTestInstance(); $instance->isShipping = $value; if ($value) { self::assertTrue($instance->isShipping()); } else { self::assertFalse($instance->isShipping()); } } public static function validIsShippingDataProvider(): array { return [ [true], [false], [0], [1], [2], [''], ]; } /** * @dataProvider validApplyDiscountCoefficientDataProvider * * @param mixed $baseValue * @param mixed $coefficient * @param mixed $expected */ public function testApplyDiscountCoefficient($baseValue, $coefficient, $expected): void { $instance = $this->getTestInstance(); $instance->setPrice(new ReceiptItemAmount($baseValue)); $instance->applyDiscountCoefficient($coefficient); self::assertEquals($expected, $instance->getPrice()->getIntegerValue()); } public static function validApplyDiscountCoefficientDataProvider() { return [ [1, 1, 100], [1.01, 1, 101], [1.01, 0.5, 51], [1.01, 0.4, 40], [1.00, 0.5, 50], [1.00, 0.333333333, 33], [2.00, 0.333333333, 67], ]; } /** * @dataProvider invalidApplyDiscountCoefficientDataProvider * * @param mixed $coefficient */ public function testInvalidApplyDiscountCoefficient($coefficient): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->setPrice(new ReceiptItemAmount(Random::int(100))); $instance->applyDiscountCoefficient($coefficient); } public static function invalidApplyDiscountCoefficientDataProvider() { return [ [null], [-1.4], [-0.01], [-0.0001], [0.0], [false], ]; } /** * @dataProvider validAmountDataProvider * * @param mixed $price * @param mixed $quantity */ public function testGetAmount($price, $quantity): void { $instance = $this->getTestInstance(); $instance->setPrice(new ReceiptItemAmount($price)); $instance->setQuantity($quantity); $expected = (int) round($price * 100.0 * $quantity); self::assertEquals($expected, $instance->getAmount()); } public static function validAmountDataProvider() { return [ [1, 1], [1.01, 1.01], ]; } /** * @dataProvider validIncreasePriceDataProvider */ public function testIncreasePrice(float $price, float $value, int $expected): void { $instance = $this->getTestInstance(); $instance->setPrice(new ReceiptItemAmount($price)); $instance->increasePrice($value); self::assertEquals($expected, $instance->getPrice()->getIntegerValue()); } public static function validIncreasePriceDataProvider() { return [ [1, 1, 200], [1.01, 3.03, 404], [1.01, -0.01, 100], ]; } /** * @dataProvider invalidIncreasePriceDataProvider */ public function testInvalidIncreasePrice(mixed $price, mixed $value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->setPrice(new ReceiptItemAmount($price)); $instance->increasePrice($value); } public static function invalidIncreasePriceDataProvider() { return [ [1, -1], [1.01, -1.01], [1.01, -1.02], ]; } /** * @dataProvider validFetchItemDataProvider * * @param mixed $price * @param mixed $quantity * @param mixed $fetch */ public function testFetchItem($price, $quantity, $fetch): void { $instance = $this->getTestInstance(); $instance->setPrice(new ReceiptItemAmount($price)); $instance->setQuantity($quantity); $fetched = $instance->fetchItem($fetch); self::assertInstanceOf(ReceiptItem::class, $fetched); self::assertNotSame($fetched->getPrice(), $instance->getPrice()); self::assertEquals($fetch, $fetched->getQuantity()); self::assertEquals($quantity - $fetch, $instance->getQuantity()); self::assertEquals($price, $instance->getPrice()->getValue()); self::assertEquals($price, $fetched->getPrice()->getValue()); } public static function validFetchItemDataProvider() { return [ [1, 2, 1], [1.01, 2, 1.5], [1.01, 2, 1.99], [1.01, 2, 1.9999], ]; } /** * @dataProvider invalidFetchItemDataProvider * * @param mixed $quantity * @param mixed $fetch */ public function testInvalidFetchItem($quantity, $fetch): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->setPrice(new ReceiptItemAmount(Random::int(1, 100))); $instance->setQuantity($quantity); $instance->fetchItem($fetch); } public static function invalidFetchItemDataProvider() { return [ [1, 1], [1.01, 1.01], [1.01, 1.02], [1, null], [1, 0.0], [1, -12.3], ]; } /** * @dataProvider validProductCodeDataProvider * * @param mixed $value */ public function testGetSetProductCode($value): void { $instance = $this->getTestInstance(); $instance->setProductCode($value); self::assertEquals((string) $value, $instance->getProductCode()); self::assertEquals((string) $value, $instance->productCode); self::assertEquals((string) $value, $instance->product_code); } /** * @dataProvider validProductCodeDataProvider * * @param mixed $value */ public function testGetSetSnakeProductCode($value): void { $instance = $this->getTestInstance(); $instance->product_code = $value; self::assertEquals((string) $value, $instance->getProductCode()); self::assertEquals((string) $value, $instance->productCode); self::assertEquals((string) $value, $instance->product_code); } /** * @dataProvider validProductCodeDataProvider * * @param mixed $value */ public function testSetterProductCode($value): void { $instance = $this->getTestInstance(); $instance->productCode = $value; self::assertEquals((string) $value, $instance->getProductCode()); self::assertEquals((string) $value, $instance->productCode); self::assertEquals((string) $value, $instance->product_code); } public static function validProductCodeDataProvider() { return [ [null], [''], [Random::str(2, 96, '0123456789ABCDEF ')], [new ProductCode('010463003407001221SxMGorvNuq6Wk91fgr92sdfsdfghfgjh')], ]; } /** * @dataProvider invalidProductCodeDataProvider * * @param mixed $value */ public function testSetInvalidProductCode($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setProductCode($value); } /** * @dataProvider invalidProductCodeDataProvider * * @param mixed $value */ public function testSetterInvalidProductCode($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->productCode = $value; } public static function invalidProductCodeDataProvider() { return [ [new StringObject('')], [true], [false], [new stdClass()], [Random::str(2, 96, 'GHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+-=`~?><:"\'')], [Random::str(97, 100, '0123456789ABCDEF ')], ]; } /** * @dataProvider validCountryOfOriginCodeDataProvider * * @param mixed $value */ public function testGetSetCountryOfOriginCode($value): void { $instance = $this->getTestInstance(); $instance->setCountryOfOriginCode($value); self::assertEquals((string) $value, $instance->getCountryOfOriginCode()); self::assertEquals((string) $value, $instance->countryOfOriginCode); self::assertEquals((string) $value, $instance->country_of_origin_code); } /** * @dataProvider validCountryOfOriginCodeDataProvider * * @param mixed $value */ public function testSetterSnakeCountryOfOriginCode($value): void { $instance = $this->getTestInstance(); $instance->country_of_origin_code = $value; self::assertEquals((string) $value, $instance->getCountryOfOriginCode()); self::assertEquals((string) $value, $instance->countryOfOriginCode); self::assertEquals((string) $value, $instance->country_of_origin_code); } /** * @dataProvider validCountryOfOriginCodeDataProvider * * @param mixed $value */ public function testSetterCountryOfOriginCode($value): void { $instance = $this->getTestInstance(); $instance->countryOfOriginCode = $value; self::assertEquals((string) $value, $instance->getCountryOfOriginCode()); self::assertEquals((string) $value, $instance->countryOfOriginCode); self::assertEquals((string) $value, $instance->country_of_origin_code); } public static function validCountryOfOriginCodeDataProvider() { return [ [null], [''], [Random::str(2, 2, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')], ]; } /** * @dataProvider invalidCountryOfOriginCodeDataProvider * * @param mixed $value */ public function testSetInvalidCountryOfOriginCode($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCountryOfOriginCode($value); } /** * @dataProvider invalidCountryOfOriginCodeDataProvider * * @param mixed $value */ public function testSetterInvalidCountryOfOriginCode($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->countryOfOriginCode = $value; } public static function invalidCountryOfOriginCodeDataProvider() { return [ [true], [Random::int()], [Random::str(1, 1)], [Random::str(3, null, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')], [Random::str(2, 2, '0123456789!@#$%^&*()_+-=`~?><:"\' ')], ]; } /** * @dataProvider validCustomsDeclarationNumberDataProvider * * @param mixed $value */ public function testGetSetCustomsDeclarationNumber($value): void { $instance = $this->getTestInstance(); $instance->setCustomsDeclarationNumber($value); self::assertEquals((string) $value, $instance->getCustomsDeclarationNumber()); self::assertEquals((string) $value, $instance->customsDeclarationNumber); self::assertEquals((string) $value, $instance->customs_declaration_number); } /** * @dataProvider validCustomsDeclarationNumberDataProvider * * @param mixed $value */ public function testSetterCustomsDeclarationNumber($value): void { $instance = $this->getTestInstance(); $instance->customsDeclarationNumber = $value; self::assertEquals((string) $value, $instance->getCustomsDeclarationNumber()); self::assertEquals((string) $value, $instance->customsDeclarationNumber); self::assertEquals((string) $value, $instance->customs_declaration_number); } /** * @dataProvider validCustomsDeclarationNumberDataProvider * * @param mixed $value */ public function testSetterSnakeCustomsDeclarationNumber($value): void { $instance = $this->getTestInstance(); $instance->customs_declaration_number = $value; self::assertEquals((string) $value, $instance->getCustomsDeclarationNumber()); self::assertEquals((string) $value, $instance->customsDeclarationNumber); self::assertEquals((string) $value, $instance->customs_declaration_number); } public static function validCustomsDeclarationNumberDataProvider() { return [ [null], [''], [Random::str(1)], [Random::str(2, 31)], [Random::str(32)], ]; } /** * @dataProvider invalidCustomsDeclarationNumberDataProvider * * @param mixed $value */ public function testSetInvalidCustomsDeclarationNumber($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCustomsDeclarationNumber($value); } /** * @dataProvider invalidCustomsDeclarationNumberDataProvider * * @param mixed $value */ public function testSetterInvalidCustomsDeclarationNumber($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->customsDeclarationNumber = $value; } public static function invalidCustomsDeclarationNumberDataProvider() { return [ [Random::str(33, 64)], ]; } /** * @dataProvider validExciseDataProvider * * @param mixed $value */ public function testGetSetExcise($value): void { $instance = $this->getTestInstance(); $instance->setExcise($value); self::assertEquals((float) $value, $instance->getExcise()); self::assertEquals((float) $value, $instance->excise); } /** * @dataProvider validExciseDataProvider * * @param mixed $value */ public function testSetterExcise($value): void { $instance = $this->getTestInstance(); $instance->excise = $value; self::assertEquals((float) $value, $instance->getExcise()); self::assertEquals((float) $value, $instance->excise); } public static function validExciseDataProvider() { return [ [null], [1], [1.3], [0.001], [10000.001], ['3.1415'], [Random::float(0.001, 9999.999)], [Random::int(1, 9999)], ]; } /** * @dataProvider invalidExciseDataProvider * * @param mixed $value */ public function testSetInvalidExcise($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setExcise($value); } /** * @dataProvider invalidExciseDataProvider * * @param mixed $value */ public function testSetterInvalidExcise($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->excise = $value; } public static function invalidExciseDataProvider() { return [ [0.0], [Random::float(-100, -0.001)], ]; } /** * @dataProvider validMarkCodeInfoDataProvider * * @param array|MarkCodeInfo $value */ public function testGetSetMarkCodeInfo($value): void { $instance = $this->getTestInstance(); $instance->setMarkCodeInfo($value); if (is_array($value)) { self::assertSame($value, $instance->getMarkCodeInfo()->toArray()); self::assertSame($value, $instance->mark_code_info->toArray()); } else { self::assertSame($value, $instance->getMarkCodeInfo()); self::assertSame($value, $instance->mark_code_info); } } /** * @dataProvider validMarkCodeInfoDataProvider * * @param array|MarkCodeInfo $value */ public function testSetterMarkCodeInfo($value): void { $instance = $this->getTestInstance(); $instance->mark_code_info = $value; if (is_array($value)) { self::assertSame($value, $instance->getMarkCodeInfo()->toArray()); self::assertSame($value, $instance->mark_code_info->toArray()); } else { self::assertSame($value, $instance->getMarkCodeInfo()); self::assertSame($value, $instance->mark_code_info); } } public static function validMarkCodeInfoDataProvider() { return [ [ new MarkCodeInfo([ 'mark_code_raw' => '010460406000590021N4N57RTCBUZTQ\u001d2403054002410161218\u001d1424010191ffd0\u001g92tIAF/YVpU4roQS3M/m4z78yFq0nc/WsSmLeX6QkF/YVWwy5IMYAeiQ91Xa2m/fFSJcOkb2N+uUUtfr4n0mOX0Q==', ]), ], [ [ 'mark_code_raw' => '010460406000590021N4N57RTCBUZTQ\u001d2403054002410161218\u001d1424010191ffd0\u001g92tIAF/YVpU4roQS3M/m4z78yFq0nc/WsSmLeX6QkF/YVWwy5IMYAeiQ91Xa2m/fFSJcOkb2N+uUUtfr4n0mOX0Q==', ], ], [ new MarkCodeInfo(), ], [null], ]; } /** * @dataProvider invalidMarkCodeInfoDataProvider * * @param mixed $value * @param mixed $exception */ public function testSetInvalidMarkCodeInfo($value, $exception): void { $this->expectException($exception); $this->getTestInstance()->setMarkCodeInfo($value); } /** * @dataProvider invalidMarkCodeInfoDataProvider * * @param mixed $value * @param mixed $exception */ public function testSetterInvalidMarkCodeInfo($value, $exception): void { $this->expectException($exception); $this->getTestInstance()->mark_code_info = $value; } public static function invalidMarkCodeInfoDataProvider() { return [ [new stdClass(), InvalidPropertyValueTypeException::class], ]; } /** * @dataProvider validMarkQuantityDataProvider * * @param array|MarkQuantity $value */ public function testGetSetMarkQuantity($value): void { $instance = $this->getTestInstance(); $instance->setMarkQuantity($value); if (is_array($value)) { self::assertSame($value, $instance->getMarkQuantity()->toArray()); self::assertSame($value, $instance->mark_quantity->toArray()); self::assertSame($value, $instance->markQuantity->toArray()); } else { self::assertSame($value, $instance->getMarkQuantity()); self::assertSame($value, $instance->mark_quantity); self::assertSame($value, $instance->markQuantity); } } /** * @dataProvider validMarkQuantityDataProvider */ public function testSetterMarkQuantity(mixed $value): void { $instance = $this->getTestInstance(); $instance->mark_quantity = $value; if (is_array($value)) { self::assertSame($value, $instance->getMarkQuantity()->toArray()); self::assertSame($value, $instance->mark_quantity->toArray()); self::assertSame($value, $instance->markQuantity->toArray()); } else { self::assertSame($value, $instance->getMarkQuantity()); self::assertSame($value, $instance->mark_quantity); self::assertSame($value, $instance->markQuantity); } } public static function validMarkQuantityDataProvider() { return [ [ new MarkQuantity([ 'numerator' => 1, 'denominator' => 1, ]), ], [ [ 'numerator' => 1, 'denominator' => 10, ], ], [null], ]; } /** * @dataProvider invalidMarkQuantityDataProvider * * @param mixed $value * @param mixed $exception */ public function testSetInvalidMarkQuantity($value, $exception): void { $this->expectException($exception); $this->getTestInstance()->setMarkQuantity($value); } /** * @dataProvider invalidMarkQuantityDataProvider * * @param mixed $value * @param mixed $exception */ public function testSetterInvalidMarkQuantity($value, $exception): void { $this->expectException($exception); $this->getTestInstance()->mark_quantity = $value; } public static function invalidMarkQuantityDataProvider() { return [ [1.0, InvalidPropertyValueTypeException::class], [1, InvalidPropertyValueTypeException::class], [true, InvalidPropertyValueTypeException::class], [new stdClass(), InvalidPropertyValueTypeException::class], ]; } /** * @dataProvider validIndustryDetailsDataProvider * * @param array|IndustryDetails $value */ public function testGetSetPaymentSubjectIndustryDetails($value): void { $instance = $this->getTestInstance(); $instance->setPaymentSubjectIndustryDetails($value); if (is_array($value)) { self::assertCount(count($value), $instance->getPaymentSubjectIndustryDetails()); self::assertCount(count($value), $instance->payment_subject_industry_details); self::assertCount(count($value), $instance->paymentSubjectIndustryDetails); } else { self::assertSame($value, $instance->getPaymentSubjectIndustryDetails()); self::assertSame($value, $instance->payment_subject_industry_details); self::assertSame($value, $instance->paymentSubjectIndustryDetails); } } /** * @dataProvider validIndustryDetailsDataProvider */ public function testSetterPaymentSubjectIndustryDetails(mixed $value): void { $instance = $this->getTestInstance(); $instance->payment_subject_industry_details = $value; if (is_array($value)) { self::assertCount(count($value), $instance->getPaymentSubjectIndustryDetails()); self::assertCount(count($value), $instance->payment_subject_industry_details); self::assertCount(count($value), $instance->paymentSubjectIndustryDetails); } else { self::assertSame($value, $instance->getPaymentSubjectIndustryDetails()); self::assertSame($value, $instance->payment_subject_industry_details); self::assertSame($value, $instance->paymentSubjectIndustryDetails); } } public static function validIndustryDetailsDataProvider() { return [ [ [ [ 'federal_id' => '001', 'document_date' => date('Y-m-d', Random::int(100000000, 200000000)), 'document_number' => Random::str(1, IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH), 'value' => Random::str(1, IndustryDetails::VALUE_MAX_LENGTH), ], ], ], [ [ new IndustryDetails([ 'federal_id' => '001', 'document_date' => date('Y-m-d', Random::int(100000000, 200000000)), 'document_number' => Random::str(1, IndustryDetails::DOCUMENT_NUMBER_MAX_LENGTH), 'value' => Random::str(1, IndustryDetails::VALUE_MAX_LENGTH), ]) ] ], ]; } /** * @dataProvider invalidPaymentSubjectIndustryDetailsDataProvider * * @param mixed $value * @param mixed $exception */ public function testSetInvalidPaymentSubjectIndustryDetails($value, $exception): void { $this->expectException($exception); $this->getTestInstance()->setPaymentSubjectIndustryDetails($value); } /** * @dataProvider invalidPaymentSubjectIndustryDetailsDataProvider * * @param mixed $value * @param mixed $exception */ public function testSetterInvalidPaymentSubjectIndustryDetails($value, $exception): void { $this->expectException($exception); $this->getTestInstance()->payment_subject_industry_details = $value; } public static function invalidPaymentSubjectIndustryDetailsDataProvider() { return [ [1.0, InvalidPropertyValueTypeException::class], [1, InvalidPropertyValueTypeException::class], [true, InvalidPropertyValueTypeException::class], [new stdClass(), InvalidPropertyValueTypeException::class], [Random::str(10), InvalidPropertyValueTypeException::class], ]; } /** * @dataProvider validMeasureDataProvider */ public function testGetSetMeasure(mixed $value): void { $instance = $this->getTestInstance(); $instance->setMeasure($value); self::assertSame($value, $instance->getMeasure()); self::assertSame($value, $instance->measure); } /** * @dataProvider validMeasureDataProvider */ public function testSetterMeasure(mixed $value): void { $instance = $this->getTestInstance(); $instance->measure = $value; self::assertSame($value, $instance->getMeasure()); self::assertSame($value, $instance->measure); } public static function validMeasureDataProvider() { $test = [ [null], ]; for ($i = 0; $i < 5; $i++) { $test[] = [Random::value(ReceiptItemMeasure::getValidValues())]; } return $test; } /** * @dataProvider invalidMeasureDataProvider * * @param mixed $value * @param mixed $exception */ public function testSetInvalidMeasure($value, $exception): void { $this->expectException($exception); $this->getTestInstance()->setMeasure($value); } /** * @dataProvider invalidMeasureDataProvider * * @param mixed $value * @param mixed $exception */ public function testSetterInvalidMeasure($value, $exception): void { $this->expectException($exception); $this->getTestInstance()->measure = $value; } public static function invalidMeasureDataProvider() { return [ [Random::str(10), InvalidPropertyValueException::class], ]; } /** * @dataProvider validMarkModeDataProvider */ public function testGetSetMarkMode(mixed $value): void { $instance = $this->getTestInstance(); $instance->setMarkMode($value); self::assertSame($value, $instance->getMarkMode()); self::assertSame($value, $instance->mark_mode); } /** * @dataProvider validMarkModeDataProvider */ public function testSetterMarkMode(mixed $value): void { $instance = $this->getTestInstance(); $instance->mark_mode = $value; self::assertSame($value, $instance->getMarkMode()); self::assertSame($value, $instance->mark_mode); } public static function validMarkModeDataProvider() { return [ [null], ['0'] ]; } /** * @dataProvider validAdditionalPaymentSubjectPropsDataProvider */ public function testGetSetAdditionalPaymentSubjectProps(mixed $value): void { $instance = $this->getTestInstance(); $instance->setAdditionalPaymentSubjectProps($value); self::assertSame($value, $instance->getAdditionalPaymentSubjectProps()); self::assertSame($value, $instance->additional_payment_subject_props); self::assertSame($value, $instance->additionalPaymentSubjectProps); } /** * @dataProvider validAdditionalPaymentSubjectPropsDataProvider */ public function testSetterAdditionalPaymentSubjectProps(mixed $value): void { $instance = $this->getTestInstance(); $instance->additionalPaymentSubjectProps = $value; self::assertSame($value, $instance->getAdditionalPaymentSubjectProps()); self::assertSame($value, $instance->additional_payment_subject_props); self::assertSame($value, $instance->additionalPaymentSubjectProps); } public static function validAdditionalPaymentSubjectPropsDataProvider() { return [ [null], ['0'], [Random::str(1, ReceiptItem::ADD_PROPS_MAX_LENGTH)], ]; } protected function getTestInstance() { return new ReceiptItem(); } } yookassa-sdk-php/tests/Model/Receipt/SettlementTest.php000064400000010253150364342670017246 0ustar00getTestInstance(); $instance->fromArray($value); self::assertSame($value['type'], $instance->getType()); self::assertSame($value['type'], $instance->type); self::assertSame($value['amount'], $instance->getAmount()->jsonSerialize()); self::assertSame($value['amount'], $instance->amount->jsonSerialize()); self::assertSame($value, $instance->jsonSerialize()); } /** * @dataProvider validDataProvider */ public function testGetSetType(array $value): void { $instance = $this->getTestInstance(); $instance->setType($value['type']); self::assertSame($value['type'], $instance->getType()); self::assertSame($value['type'], $instance->type); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testSetInvalidType($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setType($value); } /** * @throws Exception */ public static function validDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [ 'type' => Random::value(SettlementType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ]; } return [$result]; } /** * @dataProvider validAmountDataProvider */ public function testGetSetAmount(AmountInterface $value): void { $instance = $this->getTestInstance(); $instance->setAmount($value); self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } /** * @dataProvider validAmountDataProvider */ public function testSetterAmount(AmountInterface $value): void { $instance = $this->getTestInstance(); $instance->amount = $value; self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } public static function validAmountDataProvider() { return [ [ new MonetaryAmount( Random::int(1, 100), Random::value(CurrencyCode::getValidValues()) ), ], [ new MonetaryAmount(), ], ]; } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setAmount($value); } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetterInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->amount = $value; } public static function invalidAmountDataProvider() { return [ [null], [''], [1.0], [1], [true], [false], [new stdClass()], ]; } public static function invalidTypeDataProvider() { return [ [''], [1.0], [1], [true], [false], [Random::str(1, 10)], ]; } protected function getTestInstance() { return new Settlement(); } } yookassa-sdk-php/tests/Model/Receipt/OperationalDetailsTest.php000064400000014401150364342670020704 0ustar00getOperationId()); self::assertEquals($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertEquals($options['value'], $instance->getValue()); } /** * @dataProvider validArrayDataProvider */ public function testGetSetValue(array $options): void { $expected = $options['value']; $instance = self::getInstance(); $instance->setValue($expected); self::assertEquals($expected, $instance->getValue()); self::assertEquals($expected, $instance->value); $instance = self::getInstance(); $instance->value = $expected; self::assertEquals($expected, $instance->getValue()); self::assertEquals($expected, $instance->value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetInvalidValue($value, string $exceptionClassDocumentNumber): void { $instance = self::getInstance(); self::expectException($exceptionClassDocumentNumber); $instance->setValue($value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetterInvalidValue($value, string $exceptionClassDocumentNumber): void { $instance = self::getInstance(); self::expectException($exceptionClassDocumentNumber); $instance->value = $value; } /** * @dataProvider validArrayDataProvider */ public function testGetSetOperationId(array $options): void { $instance = self::getInstance(); $instance->setOperationId($options['operation_id']); self::assertEquals($options['operation_id'], $instance->getOperationId()); self::assertEquals($options['operation_id'], $instance->operation_id); } /** * @dataProvider invalidOperationIdDataProvider */ public function testSetInvalidOperationId(mixed $operation_id, string $exceptionClassOperationId): void { $instance = self::getInstance(); self::expectException($exceptionClassOperationId); $instance->setOperationId($operation_id); } /** * @dataProvider invalidOperationIdDataProvider */ public function testSetterInvalidOperationId(mixed $operation_id, string $exceptionClassOperationId): void { $instance = self::getInstance(); self::expectException($exceptionClassOperationId); $instance->operation_id = $operation_id; } /** * @dataProvider validArrayDataProvider */ public function testGetSetCreatedAt(array $options): void { $instance = self::getInstance(); $instance->setCreatedAt($options['created_at']); self::assertEquals($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertEquals($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); } /** * @dataProvider invalidCreatedAtDataProvider */ public function testSetInvalidCreatedAt(mixed $created_at, string $exceptionClassCreatedAt): void { $instance = self::getInstance(); self::expectException($exceptionClassCreatedAt); $instance->setCreatedAt($created_at); } /** * @dataProvider invalidCreatedAtDataProvider */ public function testSetterInvalidCreatedAt(mixed $created_at, string $exceptionClassCreatedAt): void { $instance = self::getInstance(); self::expectException($exceptionClassCreatedAt); $instance->created_at = $created_at; } public static function validArrayDataProvider() { date_default_timezone_set('UTC'); $result = []; foreach (range(1, 10) as $i) { $result[$i][] = [ 'operation_id' => Random::int(1, OperationalDetails::OPERATION_ID_MAX_VALUE), 'created_at' => date(YOOKASSA_DATE, Random::int(10000000, 29999999)), 'value' => Random::str(1, OperationalDetails::VALUE_MAX_LENGTH), ]; } return $result; } public static function invalidValueDataProvider() { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [Random::str(OperationalDetails::VALUE_MAX_LENGTH + 1), InvalidPropertyValueException::class], ]; } public static function invalidOperationIdDataProvider() { return [ [null, EmptyPropertyValueException::class], ['', TypeError::class], [Random::str(OperationalDetails::MIN_VALUE, OperationalDetails::OPERATION_ID_MAX_VALUE + 1), TypeError::class], [Random::int(OperationalDetails::OPERATION_ID_MAX_VALUE + 1), InvalidPropertyValueException::class], ]; } public static function invalidCreatedAtDataProvider() { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [[], TypeError::class], [fopen(__FILE__, 'r'), TypeError::class], ['III', InvalidPropertyValueException::class], [-0.01, InvalidPropertyValueException::class], [false, EmptyPropertyValueException::class], ]; } /** * @dataProvider validArrayDataProvider */ public function testJsonSerialize(array $options): void { $instance = self::getInstance($options); $expected = $options; self::assertEquals($expected, $instance->jsonSerialize()); } protected static function getInstance($options = []) { return new OperationalDetails($options); } } yookassa-sdk-php/tests/Model/PersonalData/PersonalDataTest.php000064400000037553150364342670020475 0ustar00setId($options['id']); self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); $instance = new PersonalData(); $instance->id = $options['id']; self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PersonalData(); $instance->setId($value['id']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PersonalData(); $instance->id = $value['id']; } /** * @dataProvider validDataProvider */ public function testGetSetStatus(array $options): void { $instance = new PersonalData(); $instance->setStatus($options['status']); self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); $instance = new PersonalData(); $instance->status = $options['status']; self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PersonalData(); $instance->setStatus($value['status']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PersonalData(); $instance->status = $value['status']; } /** * @dataProvider validDataProvider */ public function testGetSetType(array $options): void { $instance = new PersonalData(); $instance->setType($options['type']); self::assertSame($options['type'], $instance->getType()); self::assertSame($options['type'], $instance->type); $instance = new PersonalData(); $instance->type = $options['type']; self::assertSame($options['type'], $instance->getType()); self::assertSame($options['type'], $instance->type); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidType($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PersonalData(); $instance->setType($value['type']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidType($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PersonalData(); $instance->type = $value['type']; } /** * @dataProvider validDataProvider */ public function testGetSetCreatedAt(array $options): void { $instance = new PersonalData(); $instance->setCreatedAt($options['created_at']); self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); $instance = new PersonalData(); $instance->createdAt = $options['created_at']; self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); $instance = new PersonalData(); $instance->created_at = $options['created_at']; self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PersonalData(); $instance->setCreatedAt($value['created_at']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PersonalData(); $instance->createdAt = $value['created_at']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PersonalData(); $instance->created_at = $value['created_at']; } /** * @dataProvider validDataProvider */ public function testGetSetExpiresAt(array $options): void { $instance = new PersonalData(); $instance->setExpiresAt($options['expires_at']); if (!empty($options['expires_at'])) { self::assertSame($options['expires_at'], $instance->getExpiresAt()->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expiresAt->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expires_at->format(YOOKASSA_DATE)); } else { self::assertNull($instance->getExpiresAt()); self::assertNull($instance->expiresAt); self::assertNull($instance->expires_at); } $instance = new PersonalData(); $instance->expiresAt = $options['expires_at']; if (!empty($options['expires_at'])) { self::assertSame($options['expires_at'], $instance->getExpiresAt()->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expiresAt->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expires_at->format(YOOKASSA_DATE)); } else { self::assertNull($instance->getExpiresAt()); self::assertNull($instance->expiresAt); self::assertNull($instance->expires_at); } $instance = new PersonalData(); $instance->expires_at = $options['expires_at']; if (!empty($options['expires_at'])) { self::assertSame($options['expires_at'], $instance->getExpiresAt()->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expiresAt->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expires_at->format(YOOKASSA_DATE)); } else { self::assertNull($instance->getExpiresAt()); self::assertNull($instance->expiresAt); self::assertNull($instance->expires_at); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidExpiresAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PersonalData(); $instance->setExpiresAt($value['expires_at']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidExpiresAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PersonalData(); $instance->expiresAt = $value['expires_at']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeExpiresAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PersonalData(); $instance->expires_at = $value['expires_at']; } /** * @dataProvider validDataProvider */ public function testGetSetCancellationDetails(array $options): void { $instance = new PersonalData(); $instance->setCancellationDetails($options['cancellation_details']); self::assertSame($options['cancellation_details'], $instance->getCancellationDetails()); self::assertSame($options['cancellation_details'], $instance->cancellationDetails); self::assertSame($options['cancellation_details'], $instance->cancellation_details); $instance = new PersonalData(); $instance->cancellationDetails = $options['cancellation_details']; self::assertSame($options['cancellation_details'], $instance->getCancellationDetails()); self::assertSame($options['cancellation_details'], $instance->cancellationDetails); self::assertSame($options['cancellation_details'], $instance->cancellation_details); $instance = new PersonalData(); $instance->cancellation_details = $options['cancellation_details']; self::assertSame($options['cancellation_details'], $instance->getCancellationDetails()); self::assertSame($options['cancellation_details'], $instance->cancellationDetails); self::assertSame($options['cancellation_details'], $instance->cancellation_details); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidCancellationDetails($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PersonalData(); $instance->cancellation_details = $value['cancellation_details']; } /** * @dataProvider validDataProvider */ public function testGetSetMetadata(array $options): void { $instance = new PersonalData(); if (is_array($options['metadata'])) { $instance->setMetadata($options['metadata']); self::assertSame($options['metadata'], $instance->getMetadata()->toArray()); self::assertSame($options['metadata'], $instance->metadata->toArray()); $instance = new PersonalData(); $instance->metadata = $options['metadata']; self::assertSame($options['metadata'], $instance->getMetadata()->toArray()); self::assertSame($options['metadata'], $instance->metadata->toArray()); } elseif ($options['metadata'] instanceof Metadata || empty($options['metadata'])) { $instance->setMetadata($options['metadata']); self::assertSame($options['metadata'], $instance->getMetadata()); self::assertSame($options['metadata'], $instance->metadata); $instance = new PersonalData(); $instance->metadata = $options['metadata']; self::assertSame($options['metadata'], $instance->getMetadata()); self::assertSame($options['metadata'], $instance->metadata); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidMetadata($value): void { $this->expectException(InvalidArgumentException::class); $instance = new PersonalData(); $instance->metadata = $value['metadata']; } public static function validDataProvider(): array { $result = []; $cancellationDetailsParties = PersonalDataCancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); $cancellationDetailsReasons = PersonalDataCancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); $result[] = [ [ 'id' => Random::str(36, 50), 'status' => Random::value(PersonalDataStatus::getValidValues()), 'type' => Random::value(PersonalDataType::getValidValues()), 'created_at' => date(YOOKASSA_DATE, Random::int(111111111, time())), 'expires_at' => null, 'metadata' => ['order_id' => '37'], 'cancellation_details' => new PersonalDataCancellationDetails([ 'party' => Random::value($cancellationDetailsParties), 'reason' => Random::value($cancellationDetailsReasons), ]), ], ]; $result[] = [ [ 'id' => Random::str(36, 50), 'status' => Random::value(PersonalDataStatus::getValidValues()), 'type' => Random::value(PersonalDataType::getValidValues()), 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'metadata' => null, 'cancellation_details' => null, ], ]; for ($i = 0; $i < 20; $i++) { $payment = [ 'id' => Random::str(36, 50), 'type' => Random::value(PersonalDataType::getValidValues()), 'status' => Random::value(PersonalDataStatus::getValidValues()), 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'metadata' => new Metadata(), 'cancellation_details' => new PersonalDataCancellationDetails([ 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons], ]), ]; $result[] = [$payment]; } return $result; } public static function invalidDataProvider(): array { $result = [ [ [ 'id' => '', 'type' => 'null', 'status' => '', 'created_at' => 'null', 'expires_at' => 'null', 'cancellation_details' => new stdClass(), 'metadata' => new stdClass(), ], ], ]; for ($i = 0; $i < 10; $i++) { $personalData = [ 'id' => Random::str($i < 5 ? Random::int(1, 35) : Random::int(51, 64)), 'type' => Random::str(10), 'status' => Random::str(2, 35), 'created_at' => 0 === $i ? '23423-234-32' : -Random::int(), 'expires_at' => 0 === $i ? '23423-234-32' : -Random::int(), 'cancellation_details' => 'null', 'metadata' => 'null', ]; $result[] = [$personalData]; } return $result; } } yookassa-sdk-php/tests/Model/PersonalData/PersonalDataCancellationDetailsTest.php000064400000007301150364342670024304 0ustar00getParty()); self::assertEquals($value['reason'], $instance->getReason()); } /** * @dataProvider validDataProvider * * @param null|mixed $value */ public function testGetSetParty($value): void { $instance = self::getInstance($value); self::assertEquals($value['party'], $instance->getParty()); $instance = self::getInstance([]); $instance->setParty($value['party']); self::assertEquals($value['party'], $instance->getParty()); self::assertEquals($value['party'], $instance->party); } /** * @dataProvider validDataProvider * * @param null $value */ public function testGetSetReason($value = null): void { $instance = self::getInstance($value); self::assertEquals($value['reason'], $instance->getReason()); $instance = self::getInstance([]); $instance->setReason($value['reason']); self::assertEquals($value['reason'], $instance->getReason()); self::assertEquals($value['reason'], $instance->reason); } public static function validDataProvider(): array { $result = []; $cancellationDetailsParties = PersonalDataCancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); $cancellationDetailsReasons = PersonalDataCancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); for ($i = 0; $i < 20; $i++) { $result[] = [ [ 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons], ], ]; } return $result; } public static function invalidValueDataProvider() { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [[], InvalidPropertyValueTypeException::class], [fopen(__FILE__, 'rb'), InvalidPropertyValueTypeException::class], [true, InvalidPropertyValueTypeException::class], [false, InvalidPropertyValueTypeException::class], ]; } /** * @dataProvider validDataProvider * * @param null $value */ public function testJsonSerialize($value = null): void { $instance = new PersonalDataCancellationDetails($value); $expected = [ 'party' => $value['party'], 'reason' => $value['reason'], ]; self::assertEquals($expected, $instance->jsonSerialize()); } /** * @param mixed $value * @return PersonalDataCancellationDetails */ protected static function getInstance(mixed $value): PersonalDataCancellationDetails { return new PersonalDataCancellationDetails($value); } } yookassa-sdk-php/tests/Model/Notification/NotificationWaitingForCaptureTest.php000064400000007047150364342670024130 0ustar00getTestInstance($value); self::assertInstanceOf(PaymentInterface::class, $instance->getObject()); self::assertEquals($value['object']['id'], $instance->getObject()->getId()); } public function validDataProvider(): array { $result = []; $statuses = PaymentStatus::getValidValues(); $receiptRegistrations = ReceiptRegistrationStatus::getValidValues(); $confirmations = [ [ 'type' => ConfirmationType::REDIRECT, 'confirmation_url' => 'https://confirmation.url', 'return_url' => 'https://merchant-site.ru/return_url', 'enforce' => false, ], [ 'type' => ConfirmationType::EXTERNAL, ], ]; for ($i = 0; $i < 10; $i++) { $payment = [ 'id' => Random::str(36), 'status' => Random::value($statuses), 'recipient' => [ 'account_id' => Random::str(1, 64, '0123456789'), 'gateway_id' => Random::str(1, 256), ], 'amount' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'payment_method' => [ 'type' => PaymentMethodType::QIWI, ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'captured_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'confirmation' => Random::value($confirmations), 'refunded' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'paid' => $i % 2 ? true : false, 'refundable' => $i % 2 ? true : false, 'receipt_registration' => Random::value($receiptRegistrations), 'metadata' => [ 'value' => Random::str(1, 256), 'currency' => Random::str(1, 256), ], ]; $result[] = [ [ 'type' => $this->getExpectedType(), 'event' => $this->getExpectedEvent(), 'object' => $payment, ], ]; } return $result; } protected function getTestInstance(array $source): NotificationWaitingForCapture { return new NotificationWaitingForCapture($source); } protected function getExpectedType(): string { return NotificationType::NOTIFICATION; } protected function getExpectedEvent(): string { return NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE; } } yookassa-sdk-php/tests/Model/Notification/AbstractTestNotification.php000064400000007454150364342670022300 0ustar00getTestInstance($value); self::assertEquals($this->getExpectedType(), $instance->getType()); } /** * @dataProvider invalidConstructorTypeDataProvider */ public function testInvalidTypeInConstructor(array $source): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance($source); } /** * @dataProvider validDataProvider */ public function testGetEvent(array $value): void { $instance = $this->getTestInstance($value); self::assertEquals($this->getExpectedEvent(), $instance->getEvent()); } /** * @dataProvider invalidConstructorEventDataProvider */ public function testInvalidEventInConstructor(array $source): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance($source); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testInvalidType($value): void { $this->expectException(InvalidArgumentException::class); new TestNotification($value, $this->getExpectedEvent()); } /** * @dataProvider invalidEventDataProvider * * @param mixed $value */ public function testInvalidEvent($value): void { $this->expectException(InvalidArgumentException::class); new TestNotification($this->getExpectedType(), $value); } public function invalidConstructorTypeDataProvider() { return [ [['event' => $this->getExpectedEvent(), 'type' => 'test']], [['event' => $this->getExpectedEvent(), 'type' => null]], [['event' => $this->getExpectedEvent(), 'type' => '']], [['event' => $this->getExpectedEvent(), 'type' => 1]], [['event' => $this->getExpectedEvent(), 'type' => []]], ]; } public function invalidConstructorEventDataProvider() { return [ [['type' => $this->getExpectedType(), 'event' => 'test']], [['type' => $this->getExpectedType(), 'event' => null]], [['type' => $this->getExpectedType(), 'event' => '']], [['type' => $this->getExpectedType(), 'event' => 1]], [['type' => $this->getExpectedType(), 'event' => []]], ]; } public static function invalidTypeDataProvider() { return [ [''], [null], [Random::str(40)], [0], ]; } public static function invalidEventDataProvider() { return [ [''], [null], [Random::str(40)], [0], ]; } abstract protected function getTestInstance(array $source): AbstractNotification; abstract protected function getExpectedType(): string; abstract protected function getExpectedEvent(): string; } class TestNotification extends AbstractNotification { public function __construct($type, $event) { parent::__construct(); $this->setType($type); $this->setEvent($event); } public function getObject(): PaymentInterface|RefundInterface|PayoutInterface|DealInterface|null { return null; } } yookassa-sdk-php/tests/Model/Notification/NotificationFactoryTest.php000064400000026403150364342670022137 0ustar00expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factory($options); } /** * @dataProvider validArrayDataProvider */ public function testFactory(array $options): void { $instance = $this->getTestInstance(); $event = $options['event']; $notification = $instance->factory($options); self::assertNotNull($notification); self::assertInstanceOf(AbstractNotification::class, $notification); self::assertEquals($event, $notification->getEvent()); foreach ($options as $property => $value) { if ('object' !== $property) { self::assertEquals($notification->{$property}, $value); } else { $this->assertObject($event, $notification->{$property}, $value); } } } /** * @throws Exception */ public function validArrayDataProvider(): array { $result = []; for ($i = 0; $i < 12; $i++) { $eventType = Random::value(NotificationEventType::getEnabledValues()); switch ($eventType) { case NotificationEventType::REFUND_SUCCEEDED: $notification = $this->getRefundNotification(); break; case NotificationEventType::DEAL_CLOSED: $notification = $this->getDealNotification(); break; case NotificationEventType::PAYOUT_SUCCEEDED: case NotificationEventType::PAYOUT_CANCELED: $notification = $this->getPayoutNotification($eventType); break; default: $notification = $this->getPaymentNotification($eventType); } $result[] = $notification; } return $result; } public static function invalidDataArrayDataProvider() { return [ [[]], [['type' => 'test']], [['event' => 'test']], [['event' => new stdClass()]], ]; } protected function getTestInstance(): NotificationFactory { return new NotificationFactory(); } protected function getExpectedType(): string { return NotificationType::NOTIFICATION; } /** * @throws Exception */ protected function getExpectedEvent(): mixed { return Random::value(NotificationEventType::getEnabledValues()); } private function getRefundNotification() { $statuses = RefundStatus::getValidValues(); $receiptRegistrations = ReceiptRegistrationStatus::getValidValues(); $refund = [ 'id' => Random::str(36), 'payment_id' => Random::str(36), 'status' => Random::value($statuses), 'amount' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'receipt_registration' => Random::value($receiptRegistrations), 'description' => Random::str(1, 128), ]; return [ [ 'type' => $this->getExpectedType(), 'event' => NotificationEventType::REFUND_SUCCEEDED, 'object' => $refund, ], ]; } private function getPaymentNotification($type) { $statuses = PaymentStatus::getValidValues(); $receiptRegistrations = ReceiptRegistrationStatus::getValidValues(); $trueFalse = Random::bool(); $confirmations = [ [ 'type' => ConfirmationType::REDIRECT, 'confirmation_url' => 'https://confirmation.url', 'return_url' => 'https://merchant-site.ru/return_url', 'enforce' => false, ], [ 'type' => ConfirmationType::EXTERNAL, ], ]; $payment = [ 'id' => Random::str(36), 'status' => Random::value($statuses), 'recipient' => [ 'account_id' => Random::str(1, 64, '0123456789'), 'gateway_id' => Random::str(1, 256), ], 'amount' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'payment_method' => [ 'type' => PaymentMethodType::QIWI, ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'captured_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'confirmation' => Random::value($confirmations), 'refunded' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'paid' => $trueFalse, 'refundable' => $trueFalse, 'receipt_registration' => Random::value($receiptRegistrations), 'metadata' => [ 'value' => Random::str(1, 256), 'currency' => Random::str(1, 256), ], ]; return [ [ 'type' => $this->getExpectedType(), 'event' => $type, 'object' => $payment, ], ]; } private function getPayoutNotification($type) { $cancellationDetailsParties = PayoutCancellationDetailsPartyCode::getValidValues(); $cancellationDetailsReasons = PayoutCancellationDetailsReasonCode::getValidValues(); $payoutDestinations = [ PaymentMethodType::YOO_MONEY => [ 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => Random::str(11, 33, '1234567890'), ], PaymentMethodType::BANK_CARD => [ 'type' => PaymentMethodType::BANK_CARD, 'card' => [ 'first6' => Random::str(6, 6, '1234567890'), 'last4' => Random::str(4, 4, '1234567890'), 'card_type' => Random::value(BankCardType::getValidValues()) ], ], ]; $payout = [ 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => ['value' => Random::int(1, 10000), 'currency' => 'RUB'], 'description' => Random::str(1, Payout::MAX_LENGTH_DESCRIPTION), 'payout_destination' => $payoutDestinations[Random::value([PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD])], 'created_at' => date(YOOKASSA_DATE, Random::int(111111111, time())), 'test' => true, 'deal' => ['id' => Random::str(36, 50)], 'metadata' => ['order_id' => '37'], 'cancellation_details' => [ 'party' => Random::value($cancellationDetailsParties), 'reason' => Random::value($cancellationDetailsReasons), ], ]; return [ [ 'type' => $this->getExpectedType(), 'event' => $type, 'object' => $payout, ], ]; } private function getDealNotification() { $statuses = DealStatus::getValidValues(); $types = DealType::getValidValues(); $trueFalse = Random::bool(); $deal = [ 'id' => Random::str(36), 'type' => Random::value($types), 'status' => Random::value($statuses), 'description' => Random::str(128), 'balance' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'payout_balance' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'fee_moment' => Random::value(FeeMoment::getEnabledValues()), 'test' => $trueFalse, 'metadata' => [], ]; return [ [ 'type' => $this->getExpectedType(), 'event' => NotificationEventType::DEAL_CLOSED, 'object' => $deal, ], ]; } /** * @param mixed $event * @param mixed $object * @param mixed $value * * @throws Exception */ private function assertObject($event, $object, $value): void { self::assertNotNull($object); switch ($event) { case NotificationEventType::REFUND_SUCCEEDED: self::assertInstanceOf(RefundResponse::class, $object); self::assertEquals($object, new RefundResponse($value)); break; case NotificationEventType::PAYMENT_SUCCEEDED: case NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE: case NotificationEventType::PAYMENT_CANCELED: self::assertInstanceOf(PaymentResponse::class, $object); self::assertEquals($object, new PaymentResponse($value)); break; case NotificationEventType::PAYOUT_SUCCEEDED: case NotificationEventType::PAYOUT_CANCELED: self::assertInstanceOf(PayoutResponse::class, $object); self::assertEquals($object, new PayoutResponse($value)); break; case NotificationEventType::DEAL_CLOSED: self::assertInstanceOf(DealResponse::class, $object); self::assertEquals($object, new DealResponse($value)); break; } } } yookassa-sdk-php/tests/Model/Notification/NotificationCanceledTest.php000064400000010477150364342670022232 0ustar00getTestInstance($value); self::assertTrue($instance->getObject() instanceof PaymentInterface); self::assertEquals($value['object']['id'], $instance->getObject()->getId()); } /** * @dataProvider invalidDataProvider */ public function testInvalidFromArray(array $options): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance($options); } /** * @throws Exception */ public function validDataProvider(): array { $result = []; $statuses = PaymentStatus::getValidValues(); $receiptRegistrations = ReceiptRegistrationStatus::getValidValues(); $confirmations = [ [ 'type' => ConfirmationType::REDIRECT, 'confirmation_url' => 'https://confirmation.url', 'return_url' => 'https://merchant-site.ru/return_url', 'enforce' => false, ], [ 'type' => ConfirmationType::EXTERNAL, ], ]; for ($i = 0; $i < 10; $i++) { $payment = [ 'id' => Random::str(36), 'status' => Random::value($statuses), 'recipient' => [ 'account_id' => Random::str(1, 64, '0123456789'), 'gateway_id' => Random::str(1, 256), ], 'amount' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'payment_method' => [ 'type' => PaymentMethodType::QIWI, ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'captured_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'confirmation' => Random::value($confirmations), 'refunded' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'paid' => $i % 2 ? true : false, 'refundable' => $i % 2 ? true : false, 'receipt_registration' => Random::value($receiptRegistrations), 'metadata' => [ 'value' => Random::str(1, 256), 'currency' => Random::str(1, 256), ], ]; $result[] = [ [ 'type' => $this->getExpectedType(), 'event' => $this->getExpectedEvent(), 'object' => $payment, ], ]; } return $result; } public static function invalidDataProvider() { return [ [ [ 'type' => SettlementType::PREPAYMENT, ], ], [ [ 'event' => SettlementType::PREPAYMENT, ], ], [ [ 'object' => [], ], ], ]; } protected function getTestInstance(array $source): NotificationCanceled { return new NotificationCanceled($source); } protected function getExpectedType(): string { return NotificationType::NOTIFICATION; } protected function getExpectedEvent(): string { return NotificationEventType::PAYMENT_CANCELED; } } yookassa-sdk-php/tests/Model/Notification/NotificationRefundSucceededTest.php000064400000004533150364342670023560 0ustar00getTestInstance($value); self::assertInstanceOf(RefundInterface::class, $instance->getObject()); self::assertEquals($value['object']['id'], $instance->getObject()->getId()); } /** * @throws Exception */ public function validDataProvider(): array { $result = []; $statuses = RefundStatus::getValidValues(); $receiptRegistrations = ReceiptRegistrationStatus::getValidValues(); for ($i = 0; $i < 10; $i++) { $refund = [ 'id' => Random::str(36), 'payment_id' => Random::str(36), 'status' => Random::value($statuses), 'amount' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'receipt_registration' => Random::value($receiptRegistrations), 'description' => Random::str(1, 128), ]; $result[] = [ [ 'type' => $this->getExpectedType(), 'event' => $this->getExpectedEvent(), 'object' => $refund, ], ]; } return $result; } protected function getTestInstance(array $source): NotificationRefundSucceeded { return new NotificationRefundSucceeded($source); } protected function getExpectedType(): string { return NotificationType::NOTIFICATION; } protected function getExpectedEvent(): string { return NotificationEventType::REFUND_SUCCEEDED; } } yookassa-sdk-php/tests/Model/Notification/NotificationSucceededTest.php000064400000011210150364342670022402 0ustar00getTestInstance($value); self::assertInstanceOf(PaymentInterface::class, $instance->getObject()); self::assertEquals($value['object']['id'], $instance->getObject()->getId()); } /** * @throws Exception */ public function validDataProvider(): array { $result = []; $statuses = PaymentStatus::getValidValues(); $receiptRegistrations = ReceiptRegistrationStatus::getValidValues(); $confirmations = [ [ 'type' => ConfirmationType::REDIRECT, 'confirmation_url' => 'https://confirmation.url', 'return_url' => 'https://merchant-site.ru/return_url', 'enforce' => false, ], [ 'type' => ConfirmationType::EXTERNAL, ], ]; $payment_methods = [ [ 'type' => PaymentMethodType::QIWI, ], [ 'type' => PaymentMethodType::TINKOFF_BANK, ], [ 'type' => PaymentMethodType::SBER_LOAN, 'loan_option' => Random::value([ null, 'loan', 'installments_1', 'installments_12', 'installments_36', ]), 'discount_amount' => Random::value([ null, [ 'value' => Random::float(0.01, 100000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ]), ], [ 'type' => 'new_method', 'new_property' => 'new_property_value', ], ]; for ($i = 0; $i < 10; $i++) { $payment = [ 'id' => Random::str(36), 'status' => Random::value($statuses), 'recipient' => [ 'account_id' => Random::str(1, 64, '0123456789'), 'gateway_id' => Random::str(1, 256), ], 'amount' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'payment_method' => Random::value($payment_methods), 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'captured_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'confirmation' => Random::value($confirmations), 'refunded' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'paid' => $i % 2 ? true : false, 'refundable' => $i % 2 ? true : false, 'receipt_registration' => Random::value($receiptRegistrations), 'metadata' => [ 'value' => Random::str(1, 256), 'currency' => Random::str(1, 256), ], ]; $result[] = [ [ 'type' => $this->getExpectedType(), 'event' => $this->getExpectedEvent(), 'object' => $payment, ], ]; } return $result; } protected function getTestInstance(array $source): NotificationSucceeded { return new NotificationSucceeded($source); } protected function getExpectedType(): string { return NotificationType::NOTIFICATION; } protected function getExpectedEvent(): string { return NotificationEventType::PAYMENT_SUCCEEDED; } } yookassa-sdk-php/tests/Model/Notification/NotificationPayoutCanceledTest.php000064400000011656150364342670023434 0ustar00getTestInstance($value); self::assertInstanceOf(PayoutInterface::class, $instance->getObject()); self::assertEquals($value['object']['id'], $instance->getObject()->getId()); } /** * @throws Exception */ public function validDataProvider(): array { $result = []; $cancellationDetailsParties = PayoutCancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); $cancellationDetailsReasons = PayoutCancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); $payoutDestinations = [ PaymentMethodType::YOO_MONEY => [ 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => Random::str(11, 33, '1234567890'), ], PaymentMethodType::BANK_CARD => [ 'type' => PaymentMethodType::BANK_CARD, 'card' => [ 'first6' => Random::str(6, 6, '1234567890'), 'last4' => Random::str(4, 4, '1234567890'), 'card_type' => Random::value(BankCardType::getValidValues()) ], ], ]; $result[] = [ [ 'type' => $this->getExpectedType(), 'event' => $this->getExpectedEvent(), 'object' => [ 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => ['value' => Random::int(1, 10000), 'currency' => 'RUB'], 'description' => Random::str(1, Payout::MAX_LENGTH_DESCRIPTION), 'payout_destination' => $payoutDestinations[Random::value([PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD])], 'created_at' => date(YOOKASSA_DATE, Random::int(111111111, time())), 'test' => true, 'deal' => ['id' => Random::str(36, 50)], 'metadata' => ['order_id' => '37'], 'cancellation_details' => [ 'party' => Random::value($cancellationDetailsParties), 'reason' => Random::value($cancellationDetailsReasons), ], ], ], ]; for ($i = 0; $i < 20; $i++) { $object = [ 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => ['value' => Random::int(1, 10000), 'currency' => 'RUB'], 'description' => (0 === $i ? null : (1 === $i ? '' : (2 === $i ? Random::str(Payout::MAX_LENGTH_DESCRIPTION) : Random::str(1, Payout::MAX_LENGTH_DESCRIPTION)))), 'payout_destination' => $payoutDestinations[Random::value([PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD])], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'test' => (bool) ($i % 2), 'metadata' => [Random::str(3, 128, 'abcdefghijklmnopqrstuvwxyz') => Random::str(1, 512)], 'cancellation_details' => [ 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons], ], ]; $result[] = [ [ 'type' => $this->getExpectedType(), 'event' => $this->getExpectedEvent(), 'object' => $object, ], ]; } return $result; } /** * @throws Exception */ protected function getTestInstance(array $source): NotificationPayoutCanceled { return new NotificationPayoutCanceled($source); } protected function getExpectedType(): string { return NotificationType::NOTIFICATION; } protected function getExpectedEvent(): string { return NotificationEventType::PAYOUT_CANCELED; } } yookassa-sdk-php/tests/Model/Notification/NotificationDealClosedTest.php000064400000007763150364342670022537 0ustar00getTestInstance($value); self::assertInstanceOf(DealInterface::class, $instance->getObject()); self::assertEquals($value['object']['id'], $instance->getObject()->getId()); } /** * @throws Exception */ public function validDataProvider(): array { $result = []; $statuses = DealStatus::getValidValues(); $types = DealType::getValidValues(); for ($i = 0; $i < 10; $i++) { $deal = [ 'id' => Random::str(36), 'type' => Random::value($types), 'status' => Random::value($statuses), 'description' => Random::str(128), 'balance' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getEnabledValues()), ], 'payout_balance' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'fee_moment' => Random::value(FeeMoment::getEnabledValues()), 'test' => (bool) ($i % 2), 'metadata' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::str(1, 256), ], ]; $result[] = [ [ 'type' => $this->getExpectedType(), 'event' => $this->getExpectedEvent(), 'object' => $deal, ], ]; } $trueFalse = Random::bool(); $result[] = [ [ 'type' => $this->getExpectedType(), 'event' => $this->getExpectedEvent(), 'object' => [ 'id' => Random::str(36), 'type' => Random::value($types), 'status' => Random::value($statuses), 'description' => Random::str(128), 'balance' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'payout_balance' => [ 'value' => Random::float(0.01, 1000000.0), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'fee_moment' => Random::value(FeeMoment::getEnabledValues()), 'test' => $trueFalse, 'metadata' => [], ], ], ]; return $result; } /** * @throws Exception */ protected function getTestInstance(array $source): NotificationDealClosed { return new NotificationDealClosed($source); } protected function getExpectedType(): string { return NotificationType::NOTIFICATION; } protected function getExpectedEvent(): string { return NotificationEventType::DEAL_CLOSED; } } yookassa-sdk-php/tests/Model/Notification/NotificationPayoutSucceededTest.php000064400000007763150364342670023626 0ustar00getTestInstance($value); self::assertInstanceOf(PayoutInterface::class, $instance->getObject()); self::assertEquals($value['object']['id'], $instance->getObject()->getId()); } /** * @throws Exception */ public function validDataProvider(): array { $result = []; $payoutDestinations = [ PaymentMethodType::YOO_MONEY => [ 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => Random::str(11, 33, '1234567890'), ], PaymentMethodType::BANK_CARD => [ 'type' => PaymentMethodType::BANK_CARD, 'card' => [ 'first6' => Random::str(6, 6, '1234567890'), 'last4' => Random::str(4, 4, '1234567890'), 'card_type' => Random::value(BankCardType::getValidValues()) ], ], ]; $result[] = [ [ 'type' => $this->getExpectedType(), 'event' => $this->getExpectedEvent(), 'object' => [ 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => ['value' => Random::int(1, 10000), 'currency' => 'RUB'], 'description' => Random::str(1, Payout::MAX_LENGTH_DESCRIPTION), 'payout_destination' => $payoutDestinations[Random::value([PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD])], 'created_at' => date(YOOKASSA_DATE, Random::int(111111111, time())), 'test' => true, 'deal' => ['id' => Random::str(36, 50)], 'metadata' => ['order_id' => '37'], ], ], ]; for ($i = 0; $i < 20; $i++) { $object = [ 'id' => Random::str(36, 50), 'status' => Random::value(PayoutStatus::getValidValues()), 'amount' => ['value' => Random::int(1, 10000), 'currency' => 'RUB'], 'description' => (0 === $i ? null : (1 === $i ? '' : (2 === $i ? Random::str(Payout::MAX_LENGTH_DESCRIPTION) : Random::str(1, Payout::MAX_LENGTH_DESCRIPTION)))), 'payout_destination' => $payoutDestinations[Random::value([PaymentMethodType::YOO_MONEY, PaymentMethodType::BANK_CARD])], 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'test' => (bool) ($i % 2), 'metadata' => [Random::str(3, 128, 'abcdefghijklmnopqrstuvwxyz') => Random::str(1, 512)], ]; $result[] = [ [ 'type' => $this->getExpectedType(), 'event' => $this->getExpectedEvent(), 'object' => $object, ], ]; } return $result; } /** * @throws Exception */ protected function getTestInstance(array $source): NotificationPayoutSucceeded { return new NotificationPayoutSucceeded($source); } protected function getExpectedType(): string { return NotificationType::NOTIFICATION; } protected function getExpectedEvent(): string { return NotificationEventType::PAYOUT_SUCCEEDED; } } yookassa-sdk-php/tests/Model/SelfEmployed/AbstractTestConfirmation.php000064400000002301150364342670022226 0ustar00getTestInstance(); self::assertEquals($this->getExpectedType(), $instance->getType()); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testInvalidType($value): void { $this->expectException(InvalidArgumentException::class); new TestConfirmation($value); } /** * @throws Exception */ public static function invalidTypeDataProvider(): array { return [ [''], [Random::str(40)], ]; } abstract protected function getTestInstance(): SelfEmployedConfirmation; abstract protected function getExpectedType(): string; } class TestConfirmation extends SelfEmployedConfirmation { public function __construct($type) { parent::__construct(); $this->setType($type); } } yookassa-sdk-php/tests/Model/SelfEmployed/SelfEmployedTest.php000064400000026420150364342670020512 0ustar00setId($options['id']); self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); $instance = new SelfEmployed(); $instance->id = $options['id']; self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployed(); $instance->setId($value['id']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployed(); $instance->id = $value['id']; } /** * @dataProvider validDataProvider */ public function testGetSetStatus(array $options): void { $instance = new SelfEmployed(); $instance->setStatus($options['status']); self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); $instance = new SelfEmployed(); $instance->status = $options['status']; self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployed(); $instance->setStatus($value['status']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployed(); $instance->status = $value['status']; } /** * @dataProvider validDataProvider */ public function testGetSetTest(array $options): void { $instance = new SelfEmployed(); $instance->setTest($options['test']); self::assertSame($options['test'], $instance->getTest()); self::assertSame($options['test'], $instance->test); $instance = new SelfEmployed(); $instance->test = $options['test']; self::assertSame($options['test'], $instance->getTest()); self::assertSame($options['test'], $instance->test); } /** * @dataProvider validDataProvider */ public function testGetSetPhone(array $options): void { $instance = new SelfEmployed(); $instance->setPhone($options['phone']); self::assertSame($options['phone'], $instance->getPhone()); self::assertSame($options['phone'], $instance->phone); $instance = new SelfEmployed(); $instance->phone = $options['phone']; self::assertSame($options['phone'], $instance->getPhone()); self::assertSame($options['phone'], $instance->phone); } /** * @dataProvider validDataProvider */ public function testGetSetItn(array $options): void { $instance = new SelfEmployed(); $instance->setItn($options['itn']); self::assertSame($options['itn'], $instance->getItn()); self::assertSame($options['itn'], $instance->itn); $instance = new SelfEmployed(); $instance->itn = $options['itn']; self::assertSame($options['itn'], $instance->getItn()); self::assertSame($options['itn'], $instance->itn); } /** * @dataProvider validDataProvider */ public function testGetSetCreatedAt(array $options): void { $instance = new SelfEmployed(); $instance->setCreatedAt($options['created_at']); self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); $instance = new SelfEmployed(); $instance->createdAt = $options['created_at']; self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); $instance = new SelfEmployed(); $instance->created_at = $options['created_at']; self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployed(); $instance->setCreatedAt($value['created_at']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployed(); $instance->createdAt = $value['created_at']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployed(); $instance->created_at = $value['created_at']; } /** * @dataProvider validDataProvider */ public function testGetSetConfirmation(array $options): void { $instance = new SelfEmployed(); $instance->setConfirmation($options['confirmation']); if (is_array($options['confirmation'])) { self::assertSame($options['confirmation'], $instance->getConfirmation()->toArray()); self::assertSame($options['confirmation'], $instance->confirmation->toArray()); } else { self::assertSame($options['confirmation'], $instance->getConfirmation()); self::assertSame($options['confirmation'], $instance->confirmation); } $instance = new SelfEmployed(); $instance->confirmation = $options['confirmation']; if (is_array($options['confirmation'])) { self::assertSame($options['confirmation'], $instance->getConfirmation()->toArray()); self::assertSame($options['confirmation'], $instance->confirmation->toArray()); } else { self::assertSame($options['confirmation'], $instance->getConfirmation()); self::assertSame($options['confirmation'], $instance->confirmation); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidConfirmation($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SelfEmployed(); $instance->confirmation = $value['confirmation']; } public static function validDataProvider(): array { $result = []; $confirmTypes = SelfEmployedConfirmationType::getValidValues(); $confirmFactory = new SelfEmployedConfirmationFactory(); $result[] = [ [ 'id' => Random::str(36, 50), 'status' => Random::value(SelfEmployedStatus::getValidValues()), 'test' => Random::bool(), 'itn' => null, 'phone' => Random::str(11, 11, '0123456789'), 'created_at' => date(YOOKASSA_DATE, Random::int(111111111, time())), 'confirmation' => ['type' => Random::value($confirmTypes)], ], ]; $result[] = [ [ 'id' => Random::str(36, 50), 'status' => Random::value(SelfEmployedStatus::getValidValues()), 'test' => Random::bool(), 'itn' => Random::str(12, '0123456789'), 'phone' => null, 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'confirmation' => null, ], ]; for ($i = 0; $i < 20; $i++) { $payment = [ 'id' => Random::str(36, 50), 'status' => Random::value(SelfEmployedStatus::getValidValues()), 'test' => Random::bool(), 'itn' => Random::str(12, '0123456789'), 'phone' => Random::str(11, 11, '0123456789'), 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'confirmation' => $confirmFactory->factory(Random::value($confirmTypes)), ]; $result[] = [$payment]; } return $result; } public static function invalidDataProvider(): array { $result = [ [ [ 'id' => Random::str(60), 'test' => null, 'status' => Random::str(10), 'itn' => new stdClass(), 'phone' => [], 'created_at' => null, 'confirmation' => new stdClass(), ], ], [ [ 'id' => '', 'test' => 'null', 'status' => '', 'itn' => [], 'phone' => new stdClass(), 'created_at' => Random::str(10), 'confirmation' => new stdClass(), ], ], ]; for ($i = 0; $i < 10; $i++) { $selfEmployed = [ 'id' => Random::str($i < 5 ? Random::int(1, 35) : Random::int(51, 64)), 'test' => $i % 2 ? Random::str(10) : new stdClass(), 'status' => Random::str(1, 35), 'phone' => $i % 2 ? new stdClass() : [], 'itn' => $i % 2 ? new stdClass() : [], 'created_at' => 0 === $i ? '23423-234-32' : -Random::int(), 'confirmation' => Random::value([ new DateTime(), new stdClass(), ]), ]; $result[] = [$selfEmployed]; } return $result; } } yookassa-sdk-php/tests/Model/SelfEmployed/ConfirmationRedirectTest.php000064400000005564150364342670022242 0ustar00getTestInstance(); $instance->setConfirmationUrl($value); if (null === $value || '' === $value) { self::assertNull($instance->getConfirmationUrl()); self::assertNull($instance->confirmationUrl); self::assertNull($instance->confirmation_url); } else { self::assertEquals($value, $instance->getConfirmationUrl()); self::assertEquals($value, $instance->confirmationUrl); self::assertEquals($value, $instance->confirmation_url); } $instance->confirmationUrl = $value; if (null === $value || '' === $value) { self::assertNull($instance->getConfirmationUrl()); self::assertNull($instance->confirmationUrl); self::assertNull($instance->confirmation_url); } else { self::assertEquals($value, $instance->getConfirmationUrl()); self::assertEquals($value, $instance->confirmationUrl); self::assertEquals($value, $instance->confirmation_url); } $instance->confirmation_url = $value; if (null === $value || '' === $value) { self::assertNull($instance->getConfirmationUrl()); self::assertNull($instance->confirmationUrl); self::assertNull($instance->confirmation_url); } else { self::assertEquals($value, $instance->getConfirmationUrl()); self::assertEquals($value, $instance->confirmationUrl); self::assertEquals($value, $instance->confirmation_url); } } public function validEnforceDataProvider() { return [ [true], [false], [null], [''], [0], [1], [100], ]; } public static function validUrlDataProvider() { return [ ['https://test.ru'], ['https://' . Random::str(1, 10, 'abcdefghijklmnopqrstuvwxyz') . '.ru',], ]; } public static function invalidUrlDataProvider() { return [ [true], [false], [[]], [new stdClass()], ]; } protected function getTestInstance(): SelfEmployedConfirmationRedirect { return new SelfEmployedConfirmationRedirect(); } protected function getExpectedType(): string { return SelfEmployedConfirmationType::REDIRECT; } } yookassa-sdk-php/tests/Model/SelfEmployed/ConfirmationFactoryTest.php000064400000011331150364342670022075 0ustar00getTestInstance(); $confirmation = $instance->factory($type); self::assertNotNull($confirmation); self::assertInstanceOf(SelfEmployedConfirmation::class, $confirmation); self::assertEquals($type, $confirmation->getType()); } /** * @dataProvider invalidFactoryDataProvider * * @param mixed $type */ public function testInvalidFactory($type): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factory($type); } /** * @dataProvider validArrayDataProvider */ public function testFactoryFromArray(array $options): void { $instance = $this->getTestInstance(); $confirmation = $instance->factoryFromArray($options); self::assertNotNull($confirmation); self::assertInstanceOf(SelfEmployedConfirmation::class, $confirmation); foreach ($options as $property => $value) { self::assertEquals($confirmation->{$property}, $value); } $type = $options['type']; unset($options['type']); $confirmation = $instance->factoryFromArray($options, $type); self::assertNotNull($confirmation); self::assertInstanceOf(SelfEmployedConfirmation::class, $confirmation); self::assertEquals($type, $confirmation->getType()); foreach ($options as $property => $value) { self::assertEquals($confirmation->{$property}, $value); } } /** * @dataProvider invalidDataArrayDataProvider * * @param mixed $options */ public function testInvalidFactoryFromArray($options): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } public static function validTypeDataProvider(): array { $result = []; foreach (SelfEmployedConfirmationType::getValidValues() as $value) { $result[] = [$value]; } return $result; } public static function invalidFactoryDataProvider(): array { return [ [''], ['123'], ['test'], ]; } public static function invalidTypeDataProvider(): array { return [ [''], [null], [0], [1], [-1], ['5'], [[]], [new stdClass()], [Random::str(10)], ]; } public static function validArrayDataProvider(): array { $result = [ [ [ 'type' => SelfEmployedConfirmationType::REDIRECT, 'confirmationUrl' => 'https://' . Random::str(1, 10, 'abcdefghijklmnopqrstuvwxyz') . '.com', ] ], [ [ 'type' => SelfEmployedConfirmationType::REDIRECT, 'confirmationUrl' => 'https://' . Random::str(1, 10, 'abcdefghijklmnopqrstuvwxyz') . '.ru', ], ], [ [ 'type' => SelfEmployedConfirmationType::REDIRECT, 'confirmationUrl' => 'https://' . Random::str(1, 10, 'abcdefghijklmnopqrstuvwxyz') . '.en', ], ], [ [ 'type' => SelfEmployedConfirmationType::REDIRECT, ], ], [ [ 'type' => SelfEmployedConfirmationType::REDIRECT, ], ], [ [ 'type' => SelfEmployedConfirmationType::REDIRECT, ], ], ]; foreach (SelfEmployedConfirmationType::getValidValues() as $value) { $result[] = [['type' => $value]]; } return $result; } public static function invalidDataArrayDataProvider(): array { return [ [[]], [['type' => 'test']], ]; } protected function getTestInstance(): SelfEmployedConfirmationFactory { return new SelfEmployedConfirmationFactory(); } } yookassa-sdk-php/tests/Model/Payment/CancellationDetailsTest.php000064400000010061150364342670021043 0ustar00getParty()); self::assertEquals($data['reason'], $instance->getReason()); } /** * @dataProvider validDataProvider * * @param mixed|null $data */ public function testGetSetParty(mixed $data = null): void { $instance = self::getInstance($data); self::assertEquals($data['party'], $instance->getParty()); $instance = self::getInstance(); $instance->setParty($data['party']); self::assertEquals($data['party'], $instance->getParty()); self::assertEquals($data['party'], $instance->party); } /** * @dataProvider validDataProvider * * @param mixed|null $data */ public function testGetSetReason(mixed $data = null): void { $instance = self::getInstance($data); self::assertEquals($data['reason'], $instance->getReason()); $instance = self::getInstance(); $instance->setReason($data['reason']); self::assertEquals($data['reason'], $instance->getReason()); self::assertEquals($data['reason'], $instance->reason); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetInvalidParty($value, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->setParty($value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetterInvalidReason($value, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->reason = $value; } public static function validDataProvider(): array { $result = []; $cancellationDetailsParties = CancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); $cancellationDetailsReasons = CancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); for ($i = 0; $i < 20; $i++) { $result[] = [ [ 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons], ] ]; } return $result; } public static function invalidValueDataProvider() { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [[], TypeError::class], [fopen(__FILE__, 'r'), TypeError::class], [true, InvalidPropertyValueException::class], [false, EmptyPropertyValueException::class], ]; } /** * @dataProvider validDataProvider * * @param mixed|null $data */ public function testJsonSerialize(mixed $data = null): void { $instance = new CancellationDetails($data); $expected = $data; self::assertEquals($expected, $instance->jsonSerialize()); } /** * @param mixed|null $data */ protected static function getInstance(mixed $data = null): CancellationDetails { return new CancellationDetails($data); } } yookassa-sdk-php/tests/Model/Payment/PaymentMethod/PaymentMethodFactoryTest.php000064400000021742150364342670024035 0ustar00getTestInstance(); $paymentData = $instance->factory($type); self::assertNotNull($paymentData); self::assertInstanceOf(AbstractPaymentMethod::class, $paymentData); self::assertEquals($type, $paymentData->getType()); } /** * @dataProvider validArrayDataProvider */ public function testFactoryFromArray(array $options): void { $instance = $this->getTestInstance(); $paymentData = $instance->factoryFromArray($options); self::assertNotNull($paymentData); self::assertInstanceOf(AbstractPaymentMethod::class, $paymentData); foreach ($options as $property => $value) { if (is_object($paymentData->{$property})) { self::assertEquals($paymentData->{$property}->toArray(), $value); } else { self::assertEquals($paymentData->{$property}, $value); } } $type = $options['type']; unset($options['type']); $paymentData = $instance->factoryFromArray($options, $type); self::assertNotNull($paymentData); self::assertInstanceOf(AbstractPaymentMethod::class, $paymentData); self::assertEquals($type, $paymentData->getType()); foreach ($options as $property => $value) { if (is_object($paymentData->{$property})) { self::assertEquals($paymentData->{$property}->toArray(), $value); } else { self::assertEquals($paymentData->{$property}, $value); } } } /** * @dataProvider invalidDataArrayDataProvider * * @param mixed $options */ public function testInvalidFactoryFromArray($options): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } public static function validTypeDataProvider() { $result = []; foreach (PaymentMethodType::getValidValues() as $value) { $result[] = [$value]; } return $result; } public static function invalidTypeDataProvider() { return [ [''], [0], [1], [-1], ['5'], [Random::str(10)], ]; } public static function validArrayDataProvider() { $result = [ [ [ 'type' => PaymentMethodType::ALFABANK, 'login' => Random::str(10, 20), 'id' => Random::str(2, 64), 'saved' => Random::bool(), 'title' => Random::str(10, 20), ], ], [ [ 'type' => PaymentMethodType::GOOGLE_PAY, 'id' => Random::str(2, 64), 'saved' => Random::bool(), 'title' => Random::str(10, 20), ], ], [ [ 'type' => PaymentMethodType::APPLE_PAY, 'id' => Random::str(2, 64), 'saved' => Random::bool(), 'title' => Random::str(10, 20), ], ], [ [ 'type' => PaymentMethodType::BANK_CARD, 'id' => Random::str(2, 64), 'saved' => Random::bool(), 'title' => Random::str(10, 20), 'card' => [ 'last4' => Random::str(4, '0123456789'), 'first6' => Random::str(6, '0123456789'), 'expiry_year' => Random::int(2000, 2200), 'expiry_month' => Random::value(['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12']), 'card_type' => Random::value(BankCardType::getValidValues()), ], ], ], [ [ 'type' => PaymentMethodType::BANK_CARD, 'id' => Random::str(2, 64), 'saved' => Random::bool(), 'title' => Random::str(10, 20), 'card' => [ 'last4' => Random::str(4, '0123456789'), 'first6' => Random::str(6, '0123456789'), 'expiry_year' => Random::int(2000, 2200), 'expiry_month' => Random::value(['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12']), 'card_type' => Random::value(BankCardType::getValidValues()), ], ], ], [ [ 'type' => PaymentMethodType::SBERBANK, 'id' => Random::str(2, 64), 'saved' => Random::bool(), 'title' => Random::str(10, 20), 'card' => [ 'last4' => Random::str(4, '0123456789'), 'first6' => Random::str(6, '0123456789'), 'expiry_year' => Random::int(2000, 2200), 'expiry_month' => Random::value(['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12']), 'card_type' => Random::value(BankCardType::getValidValues()), ], 'phone' => Random::str(4, 15, '0123456789'), ], ], [ [ 'type' => PaymentMethodType::CASH, 'id' => Random::str(2, 64), 'saved' => Random::bool(), 'title' => Random::str(10, 20), ], ], [ [ 'type' => PaymentMethodType::MOBILE_BALANCE, 'id' => Random::str(2, 64), 'saved' => Random::bool(), 'title' => Random::str(10, 20), 'phone' => Random::str(4, 15, '0123456789'), ], ], [ [ 'type' => PaymentMethodType::SBERBANK, 'phone' => Random::str(4, 15, '0123456789'), 'id' => Random::str(2, 64), 'saved' => Random::bool(), 'title' => Random::str(10, 20), ], ], [ [ 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => Random::str(31, '0123456789'), 'id' => Random::str(2, 64), 'saved' => Random::bool(), 'title' => Random::str(10, 20), ], ], [ [ 'type' => PaymentMethodType::YOO_MONEY, 'account_number' => Random::str(31, '0123456789'), 'id' => Random::str(2, 64), 'saved' => Random::bool(), 'title' => Random::str(10, 20), ], ], [ [ 'type' => PaymentMethodType::INSTALLMENTS, 'id' => Random::str(2, 64), 'saved' => Random::bool(), 'title' => Random::str(10, 20), ], ], [ [ 'type' => PaymentMethodType::B2B_SBERBANK, 'id' => Random::str(2, 64), 'saved' => Random::bool(), ], ], [ [ 'type' => PaymentMethodType::TINKOFF_BANK, 'id' => Random::str(2, 64), 'saved' => Random::bool(), ], ], [ [ 'type' => PaymentMethodType::SBP, 'id' => Random::str(2, 64), 'saved' => Random::bool(), 'title' => Random::str(10, 20), ], ], ]; foreach (PaymentMethodType::getValidValues() as $value) { $result[] = [['type' => $value]]; } return $result; } public static function invalidDataArrayDataProvider() { return [ [[]], ]; } protected function getTestInstance(): PaymentMethodFactory { return new PaymentMethodFactory(); } } yookassa-sdk-php/tests/Model/Payment/PaymentMethod/PaymentMethodWechatTest.php000064400000000740150364342670023634 0ustar00getTestInstance(); $instance->setAccountNumber($value); self::assertEquals($value, $instance->getAccountNumber()); self::assertEquals($value, $instance->accountNumber); self::assertEquals($value, $instance->account_number); $instance = $this->getTestInstance(); $instance->accountNumber = $value; self::assertEquals($value, $instance->getAccountNumber()); self::assertEquals($value, $instance->accountNumber); self::assertEquals($value, $instance->account_number); $instance = $this->getTestInstance(); $instance->account_number = $value; self::assertEquals($value, $instance->getAccountNumber()); self::assertEquals($value, $instance->accountNumber); self::assertEquals($value, $instance->account_number); } /** * @dataProvider invalidAccountNumberDataProvider * * @param mixed $value */ public function testSetInvalidAccountNumber($value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->setAccountNumber($value); } /** * @dataProvider invalidAccountNumberDataProvider * * @param mixed $value */ public function testSetterInvalidAccountNumber($value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->accountNumber = $value; } /** * @dataProvider invalidAccountNumberDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeAccountNumber($value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->account_number = $value; } public static function validAccountNumberDataProvider() { return [ [Random::str(11, '0123456789')], [Random::str(12, '0123456789')], [Random::str(13, '0123456789')], [Random::str(31, '0123456789')], [Random::str(32, '0123456789')], [Random::str(33, '0123456789')], ]; } public static function invalidAccountNumberDataProvider() { return [ [true], [Random::str(10, '0123456789')], [Random::str(34, '0123456789')], ]; } protected function getTestInstance(): PaymentMethodYooMoney { return new PaymentMethodYooMoney(); } protected function getExpectedType(): string { return PaymentMethodType::YOO_MONEY; } } yookassa-sdk-php/tests/Model/Payment/PaymentMethod/PaymentMethodGooglePayTest.php000064400000000760150364342670024311 0ustar00getTestInstance(); $instance->setLogin($value); self::assertEquals($value, $instance->getLogin()); self::assertEquals($value, $instance->login); $instance = $this->getTestInstance(); $instance->login = $value; self::assertEquals($value, $instance->getLogin()); self::assertEquals($value, $instance->login); } public static function validLoginDataProvider() { return [ [null], [''], ['123'], [Random::str(256)], [Random::str(1024)], ]; } protected function getTestInstance(): PaymentMethodAlfaBank { return new PaymentMethodAlfaBank(); } protected function getExpectedType(): string { return PaymentMethodType::ALFABANK; } } yookassa-sdk-php/tests/Model/Payment/PaymentMethod/PaymentMethodSberbankTest.php000064400000004423150364342670024152 0ustar00getTestInstance(); $instance->setPhone($value); self::assertEquals($value, $instance->getPhone()); self::assertEquals($value, $instance->phone); $instance = $this->getTestInstance(); $instance->phone = $value; self::assertEquals($value, $instance->getPhone()); self::assertEquals($value, $instance->phone); } /** * @dataProvider invalidPhoneDataProvider * * @param mixed $value */ public function testSetInvalidPhone($value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->setPhone($value); } /** * @dataProvider invalidPhoneDataProvider * * @param mixed $value */ public function testSetterInvalidPhone($value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->phone = $value; } public static function validPhoneDataProvider() { return [ ['0123'], ['45678'], ['901234'], ['5678901'], ['23456789'], ['012345678'], ['9012345678'], ['90123456789'], ['012345678901'], ['5678901234567'], ['89012345678901'], ['234567890123456'], ]; } public static function invalidPhoneDataProvider() { return [ [null], [''], [true], [false], ['2345678901234567'], ]; } protected function getTestInstance(): PaymentMethodSberbank { return new PaymentMethodSberbank(); } protected function getExpectedType(): string { return PaymentMethodType::SBERBANK; } } yookassa-sdk-php/tests/Model/Payment/PaymentMethod/PaymentMethodUnknownTest.php000064400000001046150364342670024060 0ustar00getAndSetTest($value, 'last4'); } /** * @dataProvider invalidLast4DataProvider * * @param mixed $value */ public function testSetInvalidLast4($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setLast4($value); } /** * @dataProvider invalidLast4DataProvider * * @param mixed $value */ public function testSetterInvalidLast4($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->last4 = $value; } /** * @dataProvider validFirst6DataProvider */ public function testGetSetFirst6(string $value): void { $this->getAndSetTest($value, 'first6'); } /** * @dataProvider invalidFirst6DataProvider * * @param mixed $value */ public function testSetFirst6Invalid($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setFirst6($value); } /** * @dataProvider invalidFirst6DataProvider * * @param mixed $value */ public function testSetterFirst6Invalid($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->first6 = $value; } /** * @dataProvider validExpiryYearDataProvider * * @param mixed $value */ public function testGetSetExpiryYear($value): void { $this->getAndSetTest($value, 'expiryYear', 'expiry_year'); } /** * @dataProvider invalidYearDataProvider * * @param mixed $value */ public function testSetInvalidYear($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setExpiryYear($value); } /** * @dataProvider invalidYearDataProvider * * @param mixed $value */ public function testSetterInvalidYear($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->expiryYear = $value; } /** * @dataProvider invalidYearDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeYear($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->expiry_year = $value; } /** * @dataProvider invalidMonthDataProvider * * @param mixed $value */ public function testSetterInvalidMonth($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->expiryMonth = $value; } /** * @dataProvider invalidMonthDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeMonth($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->expiry_month = $value; } /** * @dataProvider validExpiryMonthDataProvider * * @param mixed $value */ public function testGetSetExpiryMonth($value): void { $this->getAndSetTest($value, 'expiryMonth', 'expiry_month'); } /** * @dataProvider invalidMonthDataProvider * * @param mixed $value */ public function testSetInvalidMonth($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setExpiryMonth($value); } /** * @dataProvider validCardTypeDataProvider * * @param mixed $value */ public function testGetSetCardType($value): void { $this->getAndSetTest($value, 'cardType', 'card_type'); } /** * @dataProvider validIssuerCountryDataProvider * * @param mixed $value */ public function testGetSetIssuerCountry($value): void { $this->getAndSetTest($value, 'issuerCountry', 'issuer_country'); } /** * @dataProvider validIssuerNameDataProvider * * @param mixed $value */ public function testGetSetIssuerName($value): void { $this->getAndSetTest($value, 'issuerName', 'issuer_name'); } /** * @dataProvider validSourceDataProvider * * @param mixed $value */ public function testGetSetSource($value): void { $this->getAndSetTest($value, 'source', 'source'); } /** * @dataProvider invalidCardTypeDataProvider * * @param mixed $value */ public function testSetInvalidCardType($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCardType($value); } /** * @dataProvider invalidCardTypeDataProvider * * @param mixed $value */ public function testSetterInvalidCardType($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->cardType = $value; } /** * @dataProvider invalidCardTypeDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeCardType($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->card_type = $value; } /** * @dataProvider invalidIssuerCountryDataProvider * * @param mixed $value */ public function testSetInvalidIssuerCountry($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setIssuerCountry($value); } /** * @dataProvider invalidIssuerCountryDataProvider * * @param mixed $value */ public function testSetterInvalidIssuerCountry($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->issuerCountry = $value; } /** * @dataProvider invalidIssuerCountryDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeIssuerCountry($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->issuer_country = $value; } /** * @dataProvider invalidSourceDataProvider * * @param mixed $value */ public function testSetInvalidSource($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setSource($value); } /** * @dataProvider invalidSourceDataProvider * * @param mixed $value */ public function testSetterInvalidSource($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->source = $value; } public static function validLast4DataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [Random::str(4, '0123456789')]; } return $result; } public static function validFirst6DataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [Random::str(6, '0123456789')]; } return $result; } public static function validExpiryYearDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [Random::int(2000, 2200)]; } return $result; } public static function validExpiryMonthDataProvider(): array { return [ ['01'], ['02'], ['03'], ['04'], ['05'], ['06'], ['07'], ['08'], ['09'], ['10'], ['11'], ['12'], ]; } public static function validCardTypeDataProvider() { $result = []; foreach (BankCardType::getValidValues() as $value) { $result[] = [$value]; } return $result; } public static function validIssuerCountryDataProvider() { return [ ['RU'], ['EN'], ['UK'], ['AU'], [null], [''], ]; } public static function validIssuerNameDataProvider() { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [Random::str(3, 35)]; } $result[] = ['']; $result[] = [null]; return $result; } public static function validSourceDataProvider() { $result = []; foreach (BankCardSource::getValidValues() as $value) { $result[] = [$value]; } $result[] = [null]; return $result; } public static function invalidLast4DataProvider() { return [ [null], [0], [1], [-1], [Random::str(3, '0123456789')], [Random::str(5, '0123456789')], ]; } public static function invalidFirst6DataProvider() { return [ ['null'], [1], [-1], [Random::str(5, '0123456789')], [Random::str(7, '0123456789')], ]; } public static function invalidYearDataProvider() { return [ [null], [0], [1], [-1], ['5'], [Random::str(1, '0123456789')], [Random::str(2, '0123456789')], [Random::str(3, '0123456789')], ]; } public static function invalidMonthDataProvider() { return [ [null], [0], [-1], [Random::str(3, '0123456789')], ['13'], ['16'], ]; } public static function invalidCardTypeDataProvider() { return [ [''], [null], [false], ]; } public static function invalidIssuerCountryDataProvider() { return [ [Random::str(3, 4)], ]; } public static function invalidSourceDataProvider() { return [ [Random::str(3, 6)], [Random::int(1, 2)], [true], ]; } protected function getTestInstance(): BankCard { return new BankCard(); } protected function getAndSetTest($value, $property, $snakeCase = null): void { $getter = 'get' . ucfirst($property); $setter = 'set' . ucfirst($property); $instance = $this->getTestInstance(); self::assertNull($instance->{$getter}()); self::assertNull($instance->{$property}); if (null !== $snakeCase) { self::assertNull($instance->{$snakeCase}); } $instance->{$setter}($value); self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); if (null !== $snakeCase) { self::assertEquals($value, $instance->{$snakeCase}); } $instance = $this->getTestInstance(); $instance->{$property} = $value; self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); if (null !== $snakeCase) { self::assertEquals($value, $instance->{$snakeCase}); } if (null !== $snakeCase) { $instance = $this->getTestInstance(); $instance->{$snakeCase} = $value; self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); self::assertEquals($value, $instance->{$snakeCase}); } } } yookassa-sdk-php/tests/Model/Payment/PaymentMethod/AbstractTestPaymentMethodPhone.php000064400000004237150364342670025163 0ustar00getTestInstance(); $instance->setPhone($value); self::assertEquals($value, $instance->getPhone()); self::assertEquals($value, $instance->phone); $instance = $this->getTestInstance(); $instance->phone = $value; self::assertEquals($value, $instance->getPhone()); self::assertEquals($value, $instance->phone); } /** * @dataProvider invalidPhoneDataProvider * * @param mixed $value */ public function testSetInvalidPhone($value): void { $this->expectException(InvalidArgumentException::class); /** @var PaymentMethodMobileBalance $instance */ $instance = $this->getTestInstance(); $instance->setPhone($value); } /** * @dataProvider invalidPhoneDataProvider * * @param mixed $value */ public function testSetterInvalidPhone($value): void { $this->expectException(InvalidArgumentException::class); /** @var PaymentMethodMobileBalance $instance */ $instance = $this->getTestInstance(); $instance->phone = $value; } public function validPhoneDataProvider() { return [ ['0123'], ['45678'], ['901234'], ['5678901'], ['23456789'], ['012345678'], ['9012345678'], ['90123456789'], ['012345678901'], ['5678901234567'], ['89012345678901'], ['234567890123456'], ]; } public function invalidPhoneDataProvider() { return [ [null], [''], [true], [false], ['2345678901234567'], ]; } } yookassa-sdk-php/tests/Model/Payment/PaymentMethod/PaymentMethodInstallmentsTest.php000064400000000776150364342670025107 0ustar00getTestInstance(); self::assertEquals($this->getExpectedType(), $instance->getType()); } /** * @dataProvider invalidTypeDataProvider */ public function testInvalidType(mixed $value): void { $this->expectException(InvalidArgumentException::class); new TestPaymentData($value); } /** * @dataProvider validSavedDataProvider */ public function testGetSetSaved(mixed $value): void { $instance = $this->getTestInstance(); self::assertFalse($instance->getSaved()); self::assertFalse($instance->saved); $instance->setSaved($value); if ($value) { self::assertTrue($instance->getSaved()); self::assertTrue($instance->saved); } else { self::assertFalse($instance->getSaved()); self::assertFalse($instance->saved); } $instance = $this->getTestInstance(); $instance->saved = $value; if ($value) { self::assertTrue($instance->getSaved()); self::assertTrue($instance->saved); } else { self::assertFalse($instance->getSaved()); self::assertFalse($instance->saved); } } /** * @dataProvider validIdDataProvider */ public function testGetSetId(mixed $value): void { $instance = $this->getTestInstance(); $instance->setId($value); if (empty($value)) { self::assertNull($instance->getId()); self::assertNull($instance->id); } else { self::assertEquals($value, $instance->getId()); self::assertEquals($value, $instance->id); } $instance = $this->getTestInstance(); $instance->id = $value; if (empty($value)) { self::assertNull($instance->getId()); self::assertNull($instance->id); } else { self::assertEquals($value, $instance->getId()); self::assertEquals($value, $instance->id); } } /** * @dataProvider validTitleDataProvider */ public function testGetSetTitle(mixed $value): void { $instance = $this->getTestInstance(); $instance->setTitle($value); if (empty($value)) { self::assertNull($instance->getTitle()); self::assertNull($instance->title); } else { self::assertEquals($value, $instance->getTitle()); self::assertEquals($value, $instance->title); } $instance = $this->getTestInstance(); $instance->title = $value; if (empty($value)) { self::assertNull($instance->getTitle()); self::assertNull($instance->title); } else { self::assertEquals($value, $instance->getTitle()); self::assertEquals($value, $instance->title); } } public static function invalidTypeDataProvider() { return [ [''], [null], [Random::str(40)], [0], ]; } public static function validSavedDataProvider() { return [ [true], [false], ]; } public static function validIdDataProvider() { return [ [null], [Random::str(2)], [Random::str(10)], [Random::str(100)], ]; } public static function validTitleDataProvider() { return [ [null], [Random::str(2, 2, '123456789ABCDEF')], [Random::str(2)], [Random::str(10)], [Random::str(100)], ]; } abstract protected function getTestInstance(): AbstractPaymentMethod; abstract protected function getExpectedType(): string; } class TestPaymentData extends AbstractPaymentMethod { public function __construct($type) { parent::__construct([]); $this->setType($type); } } yookassa-sdk-php/tests/Model/Payment/PaymentMethod/PaymentMethodBankCardTest.php000064400000011607150364342670024072 0ustar00getAndSetTest($value, 'card'); } /** * @dataProvider invalidCardDataProvider * * @param mixed $value */ public function testSetInvalidCard($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setCard($value); } public function validCardProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [ [ 'type' => PaymentMethodType::BANK_CARD, 'card' => [ 'first6' => Random::str(6, '0123456789'), 'last4' => Random::str(4, '0123456789'), 'expiry_year' => Random::int(2000, 2200), 'expiry_month' => Random::value($this->validExpiryMonth()), 'card_type' => Random::value(BankCardType::getValidValues()), 'issuer_country' => Random::value($this->validIssuerCountry()), 'issuer_name' => Random::str(3, 35), 'source' => Random::value(BankCardSource::getValidValues()), ], ], ]; } return $result; } public static function invalidCardDataProvider() { return [ ['null'], [0], [1], [-1], [new stdClass()], [Random::str(3, '0123456789')], [Random::str(5, '0123456789')], ]; } protected function getTestInstance(): PaymentMethodBankCard { return new PaymentMethodBankCard(); } protected function getExpectedType(): string { return PaymentMethodType::BANK_CARD; } protected function getAndSetTest($value, $property, $snakeCase = null): void { $getter = 'get' . ucfirst($property); $setter = 'set' . ucfirst($property); $instance = $this->getTestInstance(); self::assertNull($instance->{$getter}()); self::assertNull($instance->{$property}); if (null !== $snakeCase) { self::assertNull($instance->{$snakeCase}); } $instance->{$setter}($value[$property]); self::assertEquals($value[$property], $instance->{$getter}()->toArray()); self::assertEquals($value[$property], $instance->{$property}->toArray()); if (null !== $snakeCase) { self::assertEquals($value[$property], $instance->{$snakeCase}->toArray()); } $instance = $this->getTestInstance(); $instance->{$property} = $value[$property]; self::assertEquals($value[$property], $instance->{$getter}()->toArray()); self::assertEquals($value[$property], $instance->{$property}->toArray()); if (null !== $snakeCase) { self::assertEquals($value[$property], $instance->{$snakeCase}->toArray()); } if (null !== $snakeCase) { $instance = $this->getTestInstance(); $instance->{$snakeCase} = $value[$property]; self::assertEquals($value[$property], $instance->{$getter}()->toArray()); self::assertEquals($value[$property], $instance->{$property}->toArray()); self::assertEquals($value[$property], $instance->{$snakeCase}->toArray()); } } protected function getOnlyTest($instance, $value, $property, $snakeCase = null): void { $getter = 'get' . ucfirst($property); if (null !== $snakeCase) { self::assertEquals($value[$snakeCase], $instance->{$getter}()); self::assertEquals($value[$snakeCase], $instance->{$property}); self::assertEquals($value[$snakeCase], $instance->{$snakeCase}); } else { self::assertEquals($value[$property], $instance->{$getter}()); self::assertEquals($value[$property], $instance->{$property}); } } private function validExpiryMonth(): array { return [ '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', ]; } private function validIssuerCountry() { return [ 'RU', 'EN', 'UK', 'AU', ]; } } yookassa-sdk-php/tests/Model/Payment/PaymentMethod/PaymentMethodB2bSberbankTest.php000064400000012725150364342670024504 0ustar00getTestInstance(); $instance->setPaymentPurpose($value); self::assertNotNull($instance->getPaymentPurpose()); self::assertEquals($value, $instance->getPaymentPurpose()); } /** * @dataProvider validVatDataProvider */ public function testSetGetValidVatData(mixed $value): void { $instance = $this->getTestInstance(); $instance->setVatData($value); self::assertNotNull($instance->getVatData()); self::assertInstanceOf(VatData::class, $instance->getVatData()); } /** * @dataProvider invalidVatDataProvider */ public function testSetGetInvalidVatData(mixed $value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->setVatData($value); } /** * @dataProvider validPayerBankDetailsDataProvider */ public function testSetGetValidPayerBankDetails(mixed $value): void { $instance = $this->getTestInstance(); $instance->setPayerBankDetails($value); self::assertNotNull($instance->getPayerBankDetails()); self::assertInstanceOf(PayerBankDetails::class, $instance->getPayerBankDetails()); } /** * @dataProvider invalidPayerBankDetailsDataProvider */ public function testSetGetInvalidPayerBankDetails(mixed $value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->setPayerBankDetails($value); } public static function validPaymentPurposeDataProvider(): array { return [ [Random::str(16)], ]; } public static function validVatDataProvider(): array { return [ [ new CalculatedVatData([ 'type' => Random::value(VatDataType::getValidValues()), 'rate' => Random::value(VatDataRate::getValidValues()), 'amount' => new MonetaryAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::EUR]), ]), ], [ [ 'type' => VatDataType::CALCULATED, 'rate' => VatDataRate::RATE_20, 'amount' => new MonetaryAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::RUB]) ], ], [ [ 'type' => VatDataType::UNTAXED, ], ], [ [ 'type' => VatDataType::MIXED, 'amount' => new MonetaryAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::RUB]) ], ], ]; } public static function invalidVatDataProvider(): array { return [ [new stdClass()], ]; } public static function validPayerBankDetailsDataProvider(): array { return [ [ [ 'fullName' => Random::str(2, 256), 'shortName' => Random::str(2, 100), 'address' => Random::str(2, 100), 'inn' => Random::str(12, 12, '1234567890'), 'kpp' => Random::str(9, 9, '0123456789'), 'bankName' => Random::str(2, 100), 'bankBranch' => Random::str(2, 100), 'bankBik' => Random::str(9, 9, '0123456789'), 'account' => Random::str(20, 20, '0123456789'), ], ], [ new PayerBankDetails([ 'fullName' => Random::str(2, 256), 'shortName' => Random::str(2, 100), 'address' => Random::str(2, 100), 'inn' => Random::str(12, 12, '1234567890'), 'kpp' => Random::str(9, 9, '0123456789'), 'bankName' => Random::str(2, 100), 'bankBranch' => Random::str(2, 100), 'bankBik' => Random::str(9, 9, '0123456789'), 'account' => Random::str(20, 20, '0123456789'), ]), ], ]; } public static function invalidPayerBankDetailsDataProvider(): array { return [ [new stdClass()], ]; } protected function getTestInstance(): PaymentMethodB2bSberbank { return new PaymentMethodB2bSberbank(); } protected function getExpectedType(): string { return PaymentMethodType::B2B_SBERBANK; } } yookassa-sdk-php/tests/Model/Payment/PaymentMethod/PaymentMethodMobileBalanceTest.php000064400000001011150364342670025066 0ustar00getTestInstance(); $instance->setLoanOption($value); self::assertEquals($value, $instance->getLoanOption()); self::assertEquals($value, $instance->loan_option); $instance = $this->getTestInstance(); $instance->loan_option = $value; self::assertEquals($value, $instance->getLoanOption()); self::assertEquals($value, $instance->loan_option); } /** * @dataProvider invalidLoanOptionDataProvider * * @param mixed $value */ public function testSetInvalidLoanOption(mixed $value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->setLoanOption($value); } /** * @dataProvider invalidLoanOptionDataProvider * * @param mixed $value */ public function testSetterInvalidLoanOption(mixed $value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->loan_option = $value; } /** * @dataProvider validDiscountAmountDataProvider */ public function testGetSetDiscountAmount(mixed $value): void { $instance = $this->getTestInstance(); $instance->setDiscountAmount($value); self::assertSame($value, $instance->getDiscountAmount()); self::assertSame($value, $instance->discount_amount); self::assertSame($value, $instance->discountAmount); $instance = $this->getTestInstance(); $instance->discount_amount = $value; self::assertSame($value, $instance->getDiscountAmount()); self::assertSame($value, $instance->discount_amount); self::assertSame($value, $instance->discountAmount); $instance = $this->getTestInstance(); $instance->discountAmount = $value; self::assertSame($value, $instance->getDiscountAmount()); self::assertSame($value, $instance->discount_amount); self::assertSame($value, $instance->discountAmount); } /** * @dataProvider invalidDiscountAmountDataProvider * * @param mixed $value */ public function testSetInvalidDiscountAmount(mixed $value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->setDiscountAmount($value); } /** * @dataProvider invalidDiscountAmountDataProvider * * @param mixed $value */ public function testSetterInvalidDiscountAmount(mixed $value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->discount_amount = $value; } public function validLoanOptionDataProvider(): array { return [ [null], [''], ['loan'], ['installments_1'], ['installments_12'], ['installments_36'], ]; } public function invalidLoanOptionDataProvider(): array { return [ [true], ['2345678901234567'], ['installments_'], ]; } public function validDiscountAmountDataProvider(): array { $result = [ [null], ]; for ($i = 0; $i < 10; $i++) { $result[] = [new MonetaryAmount(['value' => Random::int(1, 10000), 'currency' => Random::value(CurrencyCode::getEnabledValues())])]; } return $result; } public function invalidDiscountAmountDataProvider(): array { return [ [true], ['2345678901234567'], ['installments_'], ]; } } yookassa-sdk-php/tests/Model/Payment/PaymentMethod/B2b/Sberbank/PayerBankDetailsTest.php000064400000010403150364342670025235 0ustar00getAndSetTest($value, 'fullName'); } /** * @dataProvider validStringDataProvider */ public function testGetSetShortName(string $value): void { $this->getAndSetTest($value, 'shortName'); } /** * @dataProvider validStringDataProvider */ public function testGetSetAddress(string $value): void { $this->getAndSetTest($value, 'address'); } /** * @dataProvider validInnDataProvider */ public function testGetSetInn(string $value): void { $this->getAndSetTest($value, 'inn'); } /** * @dataProvider validKppDataProvider */ public function testGetSetKpp(string $value): void { $this->getAndSetTest($value, 'kpp'); } /** * @dataProvider validStringDataProvider */ public function testGetSetBankName(string $value): void { $this->getAndSetTest($value, 'bankName'); } /** * @dataProvider validStringDataProvider */ public function testGetSetBankBranch(string $value): void { $this->getAndSetTest($value, 'bankBranch'); } /** * @dataProvider validBikDataProvider */ public function testGetSetBankBik(string $value): void { $this->getAndSetTest($value, 'bankBik'); } /** * @dataProvider validAccountDataProvider */ public function testGetSetAccount(string $value): void { $this->getAndSetTest($value, 'account'); } /** * @throws Exception */ public static function validStringDataProvider(): array { return [[Random::str(10)]]; } /** * @throws Exception */ public static function validAccountDataProvider(): array { return [[Random::str(20, 20, '0123456789')]]; } /** * @throws Exception */ public static function validBikDataProvider(): array { return [[Random::str(9, 9, '0123456789')]]; } /** * @throws Exception */ public static function validInnDataProvider(): array { return [ [Random::str(10, 10, '0123456789')], [Random::str(12, 12, '0123456789')], ]; } /** * @throws Exception */ public static function validKppDataProvider(): array { return [[Random::str(9, 9, '0123456789')]]; } protected function getTestInstance(): PayerBankDetails { return new PayerBankDetails(); } /** * @param null $snakeCase * @param mixed $value */ protected function getAndSetTest($value, string $property, $snakeCase = null): void { $getter = 'get' . ucfirst($property); $setter = 'set' . ucfirst($property); $instance = $this->getTestInstance(); self::assertNull($instance->{$getter}()); self::assertNull($instance->{$property}); if (null !== $snakeCase) { self::assertNull($instance->{$snakeCase}); } $instance->{$setter}($value); self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); if (null !== $snakeCase) { self::assertEquals($value, $instance->{$snakeCase}); } $instance = $this->getTestInstance(); $instance->{$property} = $value; self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); if (null !== $snakeCase) { self::assertEquals($value, $instance->{$snakeCase}); } if (null !== $snakeCase) { $instance = $this->getTestInstance(); $instance->{$snakeCase} = $value; self::assertEquals($value, $instance->{$getter}()); self::assertEquals($value, $instance->{$property}); self::assertEquals($value, $instance->{$snakeCase}); } } } yookassa-sdk-php/tests/Model/Payment/AuthorizationDetailsTest.php000064400000014772150364342670021324 0ustar00getRrn()); self::assertEquals($authorizationDetails['auth_code'], $instance->getAuthCode()); self::assertInstanceOf(ThreeDSecure::class, $instance->getThreeDSecure()); } /** * @dataProvider validDataProvider */ public function testGetSetRrn(array $authorizationDetails): void { $instance = self::getInstance($authorizationDetails); self::assertEquals($authorizationDetails['rrn'], $instance->getRrn()); $instance = self::getInstance($authorizationDetails); $instance->setRrn($authorizationDetails['rrn']); self::assertEquals($authorizationDetails['rrn'], $instance->getRrn()); self::assertEquals($authorizationDetails['rrn'], $instance->rrn); } /** * @dataProvider validDataProvider */ public function testGetSetAuthCode(array $authorizationDetails): void { $instance = self::getInstance($authorizationDetails); self::assertEquals($authorizationDetails['auth_code'], $instance->getAuthCode()); $instance = self::getInstance($authorizationDetails); $instance->setAuthCode($authorizationDetails['auth_code']); self::assertEquals($authorizationDetails['auth_code'], $instance->getAuthCode()); self::assertEquals($authorizationDetails['auth_code'], $instance->authCode); } /** * @dataProvider validDataProvider */ public function testGetSetThreeDSecure(array $authorizationDetails): void { $instance = self::getInstance($authorizationDetails); self::assertInstanceOf(ThreeDSecure::class, $instance->getThreeDSecure()); $instance = self::getInstance($authorizationDetails); $instance->setThreeDSecure($authorizationDetails['three_d_secure']); if (is_object($authorizationDetails['three_d_secure'])) { $threeDSecureObj = $authorizationDetails['three_d_secure']; $threeDSecureExpect = $threeDSecureObj->getApplied(); } else { $threeDSecureExpect = $authorizationDetails['three_d_secure']['applied']; } self::assertInstanceOf(ThreeDSecure::class, $instance->getThreeDSecure()); self::assertInstanceOf(ThreeDSecure::class, $instance->threeDSecure); self::assertEquals($threeDSecureExpect, $instance->getThreeDSecure()->getApplied()); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetInvalidRrn($value, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->setRrn($value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetterInvalidAuthCode($value, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->setAuthCode($value); } /** * @dataProvider invalidThreeDSecureDataProvider * * @param mixed $value */ public function testSetterInvalidThreeDSecure($value, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->setThreeDSecure($value); } /** * @throws Exception */ public static function validDataProvider(): array { return [ [ 'authorizationDetails' => [ 'rrn' => null, 'auth_code' => null, 'three_d_secure' => [ 'applied' => false, ], ], ], [ 'authorizationDetails' => [ 'rrn' => Random::str(32), 'auth_code' => Random::str(32), 'three_d_secure' => [ 'applied' => true, ], ], ], [ 'authorizationDetails' => [ 'rrn' => Random::str(32), 'auth_code' => Random::str(32), 'three_d_secure' => new ThreeDSecure([ 'applied' => true, ]), ], ], ]; } public static function invalidValueDataProvider() { return [ [[-1], TypeError::class], [new stdClass(), TypeError::class], [new DateTime(), TypeError::class], ]; } public static function invalidThreeDSecureDataProvider() { return [ [-1, ValidatorParameterException::class], [-0.01, ValidatorParameterException::class], [0.0, ValidatorParameterException::class], [true, ValidatorParameterException::class], [false, ValidatorParameterException::class], ]; } /** * @dataProvider validDataProvider */ public function testJsonSerialize(array $authorizationDetails): void { $instance = new AuthorizationDetails($authorizationDetails); $expected = [ 'three_d_secure' => is_object($authorizationDetails['three_d_secure']) ? $authorizationDetails['three_d_secure']->jsonSerialize() : $authorizationDetails['three_d_secure'], ]; if (!empty($authorizationDetails['rrn'])) { $expected['rrn'] = $authorizationDetails['rrn']; } if (!empty($authorizationDetails['auth_code'])) { $expected['auth_code'] = $authorizationDetails['auth_code']; } self::assertEquals($expected, $instance->jsonSerialize()); } protected static function getInstance(array $authorizationDetails = ['three_d_secure' => ['applied' => false]]): AuthorizationDetails { return new AuthorizationDetails($authorizationDetails); } } yookassa-sdk-php/tests/Model/Payment/TransferTest.php000064400000033022150364342670016727 0ustar00getTestInstance(); $instance->fromArray($value); self::assertSame($value['account_id'], $instance->getAccountId()); self::assertSame($value['account_id'], $instance->accountId); self::assertSame($value['amount'], $instance->getAmount()->jsonSerialize()); self::assertSame($value['amount'], $instance->amount->jsonSerialize()); self::assertSame($value['platform_fee_amount'], $instance->getPlatformFeeAmount()->jsonSerialize()); self::assertSame($value['platform_fee_amount'], $instance->platform_fee_amount->jsonSerialize()); self::assertSame($value['status'], $instance->getStatus()); self::assertSame($value['status'], $instance->status); self::assertSame($value['description'], $instance->getDescription()); self::assertSame($value['description'], $instance->description); if (!empty($value['metadata'])) { self::assertSame($value['metadata'], $instance->getMetadata()->toArray()); self::assertSame($value['metadata'], $instance->metadata->toArray()); self::assertSame($value, $instance->jsonSerialize()); } self::assertSame($value['release_funds'], $instance->releaseFunds); self::assertSame($value['release_funds'], $instance->release_funds); self::assertSame($value['connected_account_id'], $instance->connectedAccountId); self::assertSame($value['connected_account_id'], $instance->connected_account_id); self::assertInstanceOf(Transfer::class, $instance); } /** * @dataProvider validDataProvider */ public function testGetSetAccountId(array $value): void { $instance = $this->getTestInstance(); $instance->setAccountId($value['account_id']); self::assertSame($value['account_id'], $instance->getAccountId()); self::assertSame($value['account_id'], $instance->accountId); } /** * @dataProvider validDataProvider */ public function testSetterAccountId(mixed $value): void { $instance = $this->getTestInstance(); $instance->accountId = $value['account_id']; self::assertSame($value['account_id'], $instance->getAccountId()); self::assertSame($value['account_id'], $instance->accountId); } /** * @throws Exception */ public static function validDataProvider(): array { $result = [ [ 'account_id' => '123', 'amount' => [ 'value' => '10.00', 'currency' => 'RUB', ], 'platform_fee_amount' => [ 'value' => '10.00', 'currency' => 'RUB', ], 'status' => TransferStatus::PENDING, 'description' => 'Заказ маркетплейса №1', 'metadata' => null, 'release_funds' => false, 'connected_account_id' => null, ], ]; for ($i = 0; $i < 10; $i++) { $result[] = [ 'account_id' => (string) Random::int(11111111, 99999999), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'platform_fee_amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], 'status' => Random::value(TransferStatus::getValidValues()), 'description' => Random::str(2, Transfer::MAX_LENGTH_DESCRIPTION), 'metadata' => [ Random::str(2, 16) => Random::str(2, 512), ], 'release_funds' => Random::bool(), 'connected_account_id' => Random::str(0, 100), ]; } return [$result]; } /** * @dataProvider invalidAccountIdProvider * * @param mixed $value */ public function testGetSetInvalidAccountId($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setAccountId($value); } /** * @dataProvider invalidAccountIdProvider * * @param mixed $value */ public function testSetterInvalidAccountId($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->accountId = $value; } /** * @dataProvider invalidMetadataProvider * * @param mixed $value */ public function testInvalidMetadata($value): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->setMetadata($value); } public static function invalidAccountIdProvider(): array { return [ [null], ]; } /** * @dataProvider validAmountDataProvider * * @param mixed $value */ public function testGetSetAmount($value): void { $instance = $this->getTestInstance(); $instance->setAmount($value); self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } /** * @dataProvider validAmountDataProvider */ public function testSetterAmount(AmountInterface $value): void { $instance = $this->getTestInstance(); $instance->amount = $value; self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } /** * @dataProvider validAmountDataProvider * * @param mixed $value */ public function testGetSetPlatformFeeAmount($value): void { $instance = $this->getTestInstance(); $instance->setPlatformFeeAmount($value); self::assertSame($value, $instance->getPlatformFeeAmount()); self::assertSame($value, $instance->platform_fee_amount); } /** * @dataProvider validAmountDataProvider */ public function testSetterPlatformFeeAmount(AmountInterface $value): void { $instance = $this->getTestInstance(); $instance->platform_fee_amount = $value; self::assertSame($value, $instance->getPlatformFeeAmount()); self::assertSame($value, $instance->platform_fee_amount); } /** * @return MonetaryAmount[][] * * @throws Exception */ public static function validAmountDataProvider(): array { return [ [ new MonetaryAmount( Random::int(1, 100), Random::value(CurrencyCode::getValidValues()) ), ], [ new MonetaryAmount(), ], ]; } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setAmount($value); } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetterInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->amount = $value; } /** * @dataProvider invalidAmountWithoutNullDataProvider * * @param mixed $value */ public function testSetInvalidPlatformFeeAmount($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setPlatformFeeAmount($value); } /** * @dataProvider invalidAmountWithoutNullDataProvider * * @param mixed $value */ public function testSetterInvalidPlatformFeeAmount($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->platform_fee_amount = $value; } public static function invalidAmountDataProvider(): array { return [ [null], [new stdClass()], ]; } public static function invalidAmountWithoutNullDataProvider(): array { return [ [new stdClass()], ]; } /** * @dataProvider validStatusProvider * * @param mixed $value */ public function testSetStatus($value): void { $instance = $this->getTestInstance(); $instance->setStatus($value); self::assertEquals($value, $instance->getStatus()); } /** * @dataProvider validStatusProvider * * @param mixed $value */ public function testSetterStatus($value): void { $instance = $this->getTestInstance(); self::assertEquals($instance->status, TransferStatus::PENDING); self::assertEquals($instance->getStatus(), TransferStatus::PENDING); $instance->status = $value; self::assertEquals($value, $instance->status); self::assertEquals($value, $instance->getStatus()); } /** * @return array[] */ public static function validStatusProvider(): array { return [ [TransferStatus::SUCCEEDED], [TransferStatus::CANCELED], [TransferStatus::WAITING_FOR_CAPTURE], [TransferStatus::PENDING], ]; } /** * @dataProvider invalidStatusProvider * * @param mixed $value */ public function testGetSetInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->setStatus($value); } /** * @dataProvider invalidStatusProvider * * @param mixed $value */ public function testSetterInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $this->getTestInstance()->status = $value; } public function testSetInvalidLengthDescription(): void { $this->expectException(InvalidArgumentException::class); $instance = new Transfer(); $description = Random::str(Transfer::MAX_LENGTH_DESCRIPTION + 1); $instance->setDescription($description); } /** * @dataProvider validDataProvider */ public function testGetSetMetadata(array $options): void { $instance = $this->getTestInstance(); $instance->setMetadata($options['metadata']); self::assertSame($options['metadata'], $instance->getMetadata()); self::assertSame($options['metadata'], $instance->metadata); $instance = $this->getTestInstance(); $instance->metadata = $options['metadata']; self::assertSame($options['metadata'], $instance->getMetadata()); self::assertSame($options['metadata'], $instance->metadata); } /** * @dataProvider validDataProvider */ public function testGetSetConnectedAccountId(array $value): void { $instance = $this->getTestInstance(); $instance->setConnectedAccountId($value['connected_account_id']); self::assertSame($value['connected_account_id'], $instance->getConnectedAccountId()); self::assertSame($value['connected_account_id'], $instance->connected_account_id); self::assertSame($value['connected_account_id'], $instance->connectedAccountId); } /** * @dataProvider validDataProvider */ public function testSetterConnectedAccountId(mixed $value): void { $instance = $this->getTestInstance(); $instance->connected_account_id = $value['connected_account_id']; self::assertSame($value['connected_account_id'], $instance->getConnectedAccountId()); self::assertSame($value['connected_account_id'], $instance->connected_account_id); self::assertSame($value['connected_account_id'], $instance->connectedAccountId); } /** * @dataProvider validDataProvider */ public function testGetSetReleaseFunds(array $options): void { $instance = $this->getTestInstance(); $instance->setReleaseFunds($options['release_funds']); self::assertSame($options['release_funds'], $instance->getReleaseFunds()); self::assertSame($options['release_funds'], $instance->release_funds); $instance = $this->getTestInstance(); $instance->release_funds = $options['release_funds']; self::assertSame($options['release_funds'], $instance->getReleaseFunds()); self::assertSame($options['release_funds'], $instance->release_funds); } /** * @throws Exception */ public static function invalidStatusProvider(): array { return [ [null], [''], [Random::str(15, 100)], ]; } /** * @throws Exception */ public static function invalidMetadataProvider(): array { return [ [[new stdClass()]], ]; } protected function getTestInstance(): Transfer { return new Transfer(); } } yookassa-sdk-php/tests/Model/Payment/RecipientTest.php000064400000007216150364342670017073 0ustar00setAccountId($value); self::assertEquals((string) $value, $instance->getAccountId()); self::assertEquals((string) $value, $instance->accountId); self::assertEquals((string) $value, $instance->account_id); $instance = new Recipient(); $instance->accountId = $value; self::assertEquals((string) $value, $instance->getAccountId()); self::assertEquals((string) $value, $instance->accountId); self::assertEquals((string) $value, $instance->account_id); $instance = new Recipient(); $instance->account_id = $value; self::assertEquals((string) $value, $instance->getAccountId()); self::assertEquals((string) $value, $instance->accountId); self::assertEquals((string) $value, $instance->account_id); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidAccountId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Recipient(); $instance->setAccountId($value); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidAccountId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Recipient(); $instance->accountId = $value; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeAccountId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Recipient(); $instance->account_id = $value; } /** * @dataProvider validDataProvider * * @param mixed $value */ public function testGetSetGatewayId($value): void { $instance = new Recipient(); self::assertEquals(null, $instance->getGatewayId()); self::assertEquals(null, $instance->gatewayId); self::assertEquals(null, $instance->gateway_id); $instance->setGatewayId($value); self::assertEquals((string) $value, $instance->getGatewayId()); self::assertEquals((string) $value, $instance->gatewayId); self::assertEquals((string) $value, $instance->gateway_id); $instance = new Recipient(); $instance->gatewayId = $value; self::assertEquals((string) $value, $instance->getGatewayId()); self::assertEquals((string) $value, $instance->gatewayId); self::assertEquals((string) $value, $instance->gateway_id); $instance = new Recipient(); $instance->gateway_id = $value; self::assertEquals((string) $value, $instance->getGatewayId()); self::assertEquals((string) $value, $instance->gatewayId); self::assertEquals((string) $value, $instance->gateway_id); } public static function validDataProvider() { return [ [Random::str(1)], [Random::str(2, 64)], [new StringObject(Random::str(2, 32))], [123], ]; } public static function invalidDataProvider() { return [ [null], ]; } } yookassa-sdk-php/tests/Model/Payment/Confirmation/AbstractTestConfirmation.php000064400000003036150364342670023711 0ustar00getTestInstance(); self::assertEquals($this->getExpectedType(), $instance->getType()); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testInvalidType($value, $exception): void { $this->expectException($exception); new TestConfirmation($value); } /** * @throws Exception */ public static function invalidTypeDataProvider(): array { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [Random::str(40), InvalidPropertyValueException::class], ['test', InvalidPropertyValueException::class], [new \stdClass(), TypeError::class], ]; } abstract protected function getTestInstance(): AbstractConfirmation; abstract protected function getExpectedType(): string; } class TestConfirmation extends AbstractConfirmation { public function __construct($type) { parent::__construct([]); $this->setType($type); } } yookassa-sdk-php/tests/Model/Payment/Confirmation/ConfirmationMobileApplicationTest.php000064400000005457150364342670025552 0ustar00getTestInstance(); $instance->setConfirmationUrl($value); if (null === $value || '' === $value) { self::assertNull($instance->getConfirmationUrl()); self::assertNull($instance->confirmationUrl); self::assertNull($instance->confirmation_url); } else { self::assertEquals($value, $instance->getConfirmationUrl()); self::assertEquals($value, $instance->confirmationUrl); self::assertEquals($value, $instance->confirmation_url); } $instance->confirmationUrl = $value; if (null === $value || '' === $value) { self::assertNull($instance->getConfirmationUrl()); self::assertNull($instance->confirmationUrl); self::assertNull($instance->confirmation_url); } else { self::assertEquals($value, $instance->getConfirmationUrl()); self::assertEquals($value, $instance->confirmationUrl); self::assertEquals($value, $instance->confirmation_url); } $instance->confirmation_url = $value; if (null === $value || '' === $value) { self::assertNull($instance->getConfirmationUrl()); self::assertNull($instance->confirmationUrl); self::assertNull($instance->confirmation_url); } else { self::assertEquals($value, $instance->getConfirmationUrl()); self::assertEquals($value, $instance->confirmationUrl); self::assertEquals($value, $instance->confirmation_url); } } public function validEnforceDataProvider() { return [ [true], [false], [null], [''], [0], [1], [100], ]; } public function invalidEnforceDataProvider() { return [ ['true'], ['false'], [[]], [new stdClass()], ]; } public static function validUrlDataProvider() { return [ ['wechat://pay/testurl?pr=xXxXxX'], ['https://test.ru'], ]; } protected function getTestInstance(): ConfirmationMobileApplication { return new ConfirmationMobileApplication(); } protected function getExpectedType(): string { return ConfirmationType::MOBILE_APPLICATION; } } yookassa-sdk-php/tests/Model/Payment/Confirmation/ConfirmationRedirectTest.php000064400000012347150364342670023714 0ustar00getTestInstance(); $instance->setEnforce($value); if (null === $value || '' === $value) { self::assertNull($instance->getEnforce()); self::assertNull($instance->enforce); } else { self::assertEquals((bool) $value, $instance->getEnforce()); self::assertEquals((bool) $value, $instance->enforce); } $instance = $this->getTestInstance(); $instance->enforce = $value; if (null === $value || '' === $value) { self::assertNull($instance->getEnforce()); self::assertNull($instance->enforce); } else { self::assertEquals((bool) $value, $instance->getEnforce()); self::assertEquals((bool) $value, $instance->enforce); } } /** * @dataProvider validUrlDataProvider * * @param mixed $value */ public function testGetSetReturnUrl($value): void { $instance = $this->getTestInstance(); $instance->setReturnUrl($value); if (null === $value || '' === $value) { self::assertNull($instance->getReturnUrl()); self::assertNull($instance->returnUrl); self::assertNull($instance->return_url); } else { self::assertEquals($value, $instance->getReturnUrl()); self::assertEquals($value, $instance->returnUrl); self::assertEquals($value, $instance->return_url); } $instance->setReturnUrl(null); self::assertNull($instance->getReturnUrl()); self::assertNull($instance->returnUrl); self::assertNull($instance->return_url); $instance->returnUrl = $value; if (null === $value || '' === $value) { self::assertNull($instance->getReturnUrl()); self::assertNull($instance->returnUrl); self::assertNull($instance->return_url); } else { self::assertEquals($value, $instance->getReturnUrl()); self::assertEquals($value, $instance->returnUrl); self::assertEquals($value, $instance->return_url); } $instance->return_url = $value; if (null === $value || '' === $value) { self::assertNull($instance->getReturnUrl()); self::assertNull($instance->returnUrl); self::assertNull($instance->return_url); } else { self::assertEquals($value, $instance->getReturnUrl()); self::assertEquals($value, $instance->returnUrl); self::assertEquals($value, $instance->return_url); } } /** * @dataProvider validUrlDataProvider * * @param mixed $value */ public function testGetSetConfirmationUrl($value): void { $instance = $this->getTestInstance(); $instance->setConfirmationUrl($value); if (null === $value || '' === $value) { self::assertNull($instance->getConfirmationUrl()); self::assertNull($instance->confirmationUrl); self::assertNull($instance->confirmation_url); } else { self::assertEquals($value, $instance->getConfirmationUrl()); self::assertEquals($value, $instance->confirmationUrl); self::assertEquals($value, $instance->confirmation_url); } $instance->confirmationUrl = $value; if (null === $value || '' === $value) { self::assertNull($instance->getConfirmationUrl()); self::assertNull($instance->confirmationUrl); self::assertNull($instance->confirmation_url); } else { self::assertEquals($value, $instance->getConfirmationUrl()); self::assertEquals($value, $instance->confirmationUrl); self::assertEquals($value, $instance->confirmation_url); } $instance->confirmation_url = $value; if (null === $value || '' === $value) { self::assertNull($instance->getConfirmationUrl()); self::assertNull($instance->confirmationUrl); self::assertNull($instance->confirmation_url); } else { self::assertEquals($value, $instance->getConfirmationUrl()); self::assertEquals($value, $instance->confirmationUrl); self::assertEquals($value, $instance->confirmation_url); } } public static function validEnforceDataProvider() { return [ [true], [false], [0], [1], [100], ]; } public static function validUrlDataProvider() { return [ ['https://test.ru'], ['https://shop.store'], ]; } protected function getTestInstance(): ConfirmationRedirect { return new ConfirmationRedirect(); } protected function getExpectedType(): string { return ConfirmationType::REDIRECT; } } yookassa-sdk-php/tests/Model/Payment/Confirmation/ConfirmationEmbeddedTest.php000064400000003257150364342670023644 0ustar00getTestInstance(); $instance->setConfirmationToken($value); if (null === $value || '' === $value) { self::assertNull($instance->getConfirmationToken()); self::assertNull($instance->confirmationToken); } else { self::assertEquals($value, $instance->getConfirmationToken()); self::assertEquals($value, $instance->confirmationToken); } $instance = $this->getTestInstance(); $instance->confirmationToken = $value; if (null === $value || '' === $value) { self::assertNull($instance->getConfirmationToken()); self::assertNull($instance->confirmationToken); } else { self::assertEquals($value, $instance->getConfirmationToken()); self::assertEquals($value, $instance->confirmationToken); } } public static function validConfirmationTokenDataProvider(): array { return [ ['ct-2454fc2d-000f-5000-9000-12a816bfbb35'], ]; } protected function getTestInstance(): ConfirmationEmbedded { return new ConfirmationEmbedded(); } protected function getExpectedType(): string { return ConfirmationType::EMBEDDED; } } yookassa-sdk-php/tests/Model/Payment/Confirmation/ConfirmationCodeVerificationTest.php000064400000001012150364342670025353 0ustar00getTestInstance(); $instance->setConfirmationData($value); if (null === $value || '' === $value) { self::assertNull($instance->getConfirmationData()); self::assertNull($instance->confirmationData); self::assertNull($instance->confirmation_data); } else { self::assertEquals($value, $instance->getConfirmationData()); self::assertEquals($value, $instance->confirmationData); self::assertEquals($value, $instance->confirmation_data); } $instance->confirmationData = $value; if (null === $value || '' === $value) { self::assertNull($instance->getConfirmationData()); self::assertNull($instance->confirmationData); self::assertNull($instance->confirmation_data); } else { self::assertEquals($value, $instance->getConfirmationData()); self::assertEquals($value, $instance->confirmationData); self::assertEquals($value, $instance->confirmation_data); } $instance->confirmation_data = $value; if (null === $value || '' === $value) { self::assertNull($instance->getConfirmationData()); self::assertNull($instance->confirmationData); self::assertNull($instance->confirmation_data); } else { self::assertEquals($value, $instance->getConfirmationData()); self::assertEquals($value, $instance->confirmationData); self::assertEquals($value, $instance->confirmation_data); } } public function validEnforceDataProvider() { return [ [true], [false], [null], [''], [0], [1], [100], ]; } public static function validUrlDataProvider() { return [ ['wechat://pay/testurl?pr=xXxXxX'], ['https://test.ru'], ]; } protected function getTestInstance(): ConfirmationQr { return new ConfirmationQr(); } protected function getExpectedType(): string { return ConfirmationType::QR; } } yookassa-sdk-php/tests/Model/Payment/Confirmation/ConfirmationFactoryTest.php000064400000011635150364342670023561 0ustar00getTestInstance(); $confirmation = $instance->factory($type); self::assertNotNull($confirmation); self::assertInstanceOf(AbstractConfirmation::class, $confirmation); self::assertEquals($type, $confirmation->getType()); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $type */ public function testInvalidFactory($type): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factory($type); } /** * @dataProvider validArrayDataProvider */ public function testFactoryFromArray(array $options): void { $instance = $this->getTestInstance(); $confirmation = $instance->factoryFromArray($options); self::assertNotNull($confirmation); self::assertInstanceOf(AbstractConfirmation::class, $confirmation); foreach ($options as $property => $value) { self::assertEquals($confirmation->{$property}, $value); } $type = $options['type']; unset($options['type']); $confirmation = $instance->factoryFromArray($options, $type); self::assertNotNull($confirmation); self::assertInstanceOf(AbstractConfirmation::class, $confirmation); self::assertEquals($type, $confirmation->getType()); foreach ($options as $property => $value) { self::assertEquals($confirmation->{$property}, $value); } } /** * @dataProvider invalidDataArrayDataProvider * * @param mixed $options */ public function testInvalidFactoryFromArray($options): void { $this->expectException(InvalidArgumentException::class); $instance = $this->getTestInstance(); $instance->factoryFromArray($options); } public static function validTypeDataProvider() { $result = []; foreach (ConfirmationType::getValidValues() as $value) { $result[] = [$value]; } return $result; } public static function invalidTypeDataProvider() { return [ [''], [0], [1], [-1], ['5'], [Random::str(10)], ]; } public static function validArrayDataProvider() { $url = [ 'https://shop.store/testurl?pr=xXxXxX', 'https://test.ru', ]; $result = [ [ [ 'type' => ConfirmationType::REDIRECT, 'enforce' => false, 'returnUrl' => Random::value($url), 'confirmationUrl' => Random::value($url), ], ], [ [ 'type' => ConfirmationType::REDIRECT, 'enforce' => true, 'returnUrl' => Random::value($url), ], ], [ [ 'type' => ConfirmationType::REDIRECT, 'returnUrl' => Random::value($url), 'confirmationUrl' => Random::value($url), ], ], [ [ 'type' => ConfirmationType::REDIRECT, 'confirmationUrl' => Random::value($url), ], ], [ [ 'type' => ConfirmationType::REDIRECT, 'returnUrl' => Random::value($url), ], ], [ [ 'type' => ConfirmationType::REDIRECT, 'enforce' => Random::bool(), ], ], [ [ 'type' => ConfirmationType::REDIRECT, ], ], [ [ 'type' => ConfirmationType::QR, 'confirmation_data' => Random::str(30), ], ], ]; foreach (ConfirmationType::getValidValues() as $value) { $result[] = [['type' => $value]]; } return $result; } public static function invalidDataArrayDataProvider() { return [ [[]], [['type' => 'test']], ]; } protected function getTestInstance(): ConfirmationFactory { return new ConfirmationFactory(); } } yookassa-sdk-php/tests/Model/Payment/ThreeDSecureTest.php000064400000004356150364342670017475 0ustar00getApplied()); } /** * @dataProvider validDataProvider * * @param mixed $threeDSecure */ public function testGetSetApplied($threeDSecure): void { $instance = new ThreeDSecure($threeDSecure); self::assertEquals($threeDSecure['applied'], $instance->getApplied()); $instance = new ThreeDSecure(); $instance->setApplied($threeDSecure['applied']); self::assertEquals($threeDSecure['applied'], $instance->getApplied()); self::assertEquals($threeDSecure['applied'], $instance->applied); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetInvalidApplied($value, string $exceptionClassName): void { $instance = new ThreeDSecure(); $this->expectException($exceptionClassName); $instance->setApplied($value); } public static function validDataProvider(): array { return [ [ 'threeDSecure' => [ 'applied' => true, ], ], [ 'threeDSecure' => [ 'applied' => false, ], ], ]; } public static function invalidValueDataProvider() { return [ ['', EmptyPropertyValueException::class], ]; } /** * @dataProvider validDataProvider */ public function testJsonSerialize(mixed $threeDSecure): void { if (is_object($threeDSecure)) { $threeDSecure = $threeDSecure->jsonSerialize(); } $instance = new ThreeDSecure($threeDSecure); self::assertEquals($threeDSecure, $instance->jsonSerialize()); } } yookassa-sdk-php/tests/Model/Payment/PaymentTest.php000064400000117103150364342670016563 0ustar00setId($options['id']); self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); $instance = new Payment(); $instance->id = $options['id']; self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setId($value['id']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidId($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->id = $value['id']; } /** * @dataProvider validDataProvider */ public function testGetSetStatus(array $options): void { $instance = new Payment(); $instance->setStatus($options['status']); self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); $instance = new Payment(); $instance->status = $options['status']; self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setStatus($value['status']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidStatus($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->status = $value['status']; } /** * @dataProvider validDataProvider */ public function testGetSetRecipient(array $options): void { $instance = new Payment(); $instance->setRecipient($options['recipient']); self::assertSame($options['recipient'], $instance->getRecipient()); self::assertSame($options['recipient'], $instance->recipient); $instance = new Payment(); $instance->recipient = $options['recipient']; self::assertSame($options['recipient'], $instance->getRecipient()); self::assertSame($options['recipient'], $instance->recipient); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidRecipient($value): void { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new Payment(); $instance->setRecipient($value['recipient']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidRecipient($value): void { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new Payment(); $instance->setRecipient($value['recipient']); } /** * @dataProvider validDataProvider */ public function testGetSetAmount(array $options): void { $instance = new Payment(); $instance->setAmount($options['amount']); self::assertSame($options['amount'], $instance->getAmount()); self::assertSame($options['amount'], $instance->amount); $instance = new Payment(); $instance->amount = $options['amount']; self::assertSame($options['amount'], $instance->getAmount()); self::assertSame($options['amount'], $instance->amount); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setAmount($value['amount']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidAmount($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->amount = $value['amount']; } /** * @dataProvider validDataProvider */ public function testGetSetPaymentMethod(array $options): void { $instance = new Payment(); $instance->setPaymentMethod($options['payment_method']); if (is_array($options['payment_method'])) { self::assertSame($options['payment_method'], $instance->getPaymentMethod()->toArray()); self::assertSame($options['payment_method'], $instance->paymentMethod->toArray()); self::assertSame($options['payment_method'], $instance->payment_method->toArray()); } else { self::assertSame($options['payment_method'], $instance->getPaymentMethod()); self::assertSame($options['payment_method'], $instance->paymentMethod); self::assertSame($options['payment_method'], $instance->payment_method); } $instance = new Payment(); $instance->paymentMethod = $options['payment_method']; if (is_array($options['payment_method'])) { self::assertSame($options['payment_method'], $instance->getPaymentMethod()->toArray()); self::assertSame($options['payment_method'], $instance->paymentMethod->toArray()); self::assertSame($options['payment_method'], $instance->payment_method->toArray()); } else { self::assertSame($options['payment_method'], $instance->getPaymentMethod()); self::assertSame($options['payment_method'], $instance->paymentMethod); self::assertSame($options['payment_method'], $instance->payment_method); } $instance = new Payment(); $instance->payment_method = $options['payment_method']; if (is_array($options['payment_method'])) { self::assertSame($options['payment_method'], $instance->getPaymentMethod()->toArray()); self::assertSame($options['payment_method'], $instance->paymentMethod->toArray()); self::assertSame($options['payment_method'], $instance->payment_method->toArray()); } else { self::assertSame($options['payment_method'], $instance->getPaymentMethod()); self::assertSame($options['payment_method'], $instance->paymentMethod); self::assertSame($options['payment_method'], $instance->payment_method); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidPaymentMethod($value): void { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new Payment(); $instance->setPaymentMethod($value['payment_method']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidPaymentMethod($value): void { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new Payment(); $instance->paymentMethod = $value['payment_method']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakePaymentMethod($value): void { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new Payment(); $instance->payment_method = $value['payment_method']; } /** * @dataProvider validDataProvider */ public function testGetSetCreatedAt(array $options): void { $instance = new Payment(); $instance->setCreatedAt($options['created_at']); self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); $instance = new Payment(); $instance->createdAt = $options['created_at']; self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); $instance = new Payment(); $instance->created_at = $options['created_at']; self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setCreatedAt($value['created_at']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->createdAt = $value['created_at']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->created_at = $value['created_at']; } /** * @dataProvider validDataProvider */ public function testGetSetCapturedAt(array $options): void { $instance = new Payment(); $instance->setCapturedAt($options['captured_at']); if (null === $options['captured_at'] || '' === $options['captured_at']) { self::assertNull($instance->getCapturedAt()); self::assertNull($instance->capturedAt); self::assertNull($instance->captured_at); } else { self::assertSame($options['captured_at'], $instance->getCapturedAt()->format(YOOKASSA_DATE)); self::assertSame($options['captured_at'], $instance->capturedAt->format(YOOKASSA_DATE)); self::assertSame($options['captured_at'], $instance->captured_at->format(YOOKASSA_DATE)); } $instance = new Payment(); $instance->capturedAt = $options['captured_at']; if (null === $options['captured_at'] || '' === $options['captured_at']) { self::assertNull($instance->getCapturedAt()); self::assertNull($instance->capturedAt); self::assertNull($instance->captured_at); } else { self::assertSame($options['captured_at'], $instance->getCapturedAt()->format(YOOKASSA_DATE)); self::assertSame($options['captured_at'], $instance->capturedAt->format(YOOKASSA_DATE)); self::assertSame($options['captured_at'], $instance->captured_at->format(YOOKASSA_DATE)); } $instance = new Payment(); $instance->captured_at = $options['captured_at']; if (null === $options['captured_at'] || '' === $options['captured_at']) { self::assertNull($instance->getCapturedAt()); self::assertNull($instance->capturedAt); self::assertNull($instance->captured_at); } else { self::assertSame($options['captured_at'], $instance->getCapturedAt()->format(YOOKASSA_DATE)); self::assertSame($options['captured_at'], $instance->capturedAt->format(YOOKASSA_DATE)); self::assertSame($options['captured_at'], $instance->captured_at->format(YOOKASSA_DATE)); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidCapturedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setCapturedAt($value['captured_at']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidCapturedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->capturedAt = $value['captured_at']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeCapturedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->captured_at = $value['captured_at']; } /** * @dataProvider validDataProvider */ public function testGetSetConfirmation(array $options): void { $instance = new Payment(); $instance->setConfirmation($options['confirmation']); self::assertSame($options['confirmation'], $instance->getConfirmation()); self::assertSame($options['confirmation'], $instance->confirmation); $instance = new Payment(); $instance->confirmation = $options['confirmation']; self::assertSame($options['confirmation'], $instance->getConfirmation()); self::assertSame($options['confirmation'], $instance->confirmation); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidConfirmation($value): void { $this->expectException(ValidatorParameterException::class); $instance = new Payment(); $instance->confirmation = $value['confirmation']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidConfirmation($value): void { $this->expectException(ValidatorParameterException::class); $instance = new Payment(); $instance->confirmation = $value['confirmation']; } /** * @dataProvider validDataProvider */ public function testGetSetRefundedAmount(array $options): void { $instance = new Payment(); $instance->setRefundedAmount($options['refunded_amount']); self::assertSame($options['refunded_amount'], $instance->getRefundedAmount()); self::assertSame($options['refunded_amount'], $instance->refundedAmount); self::assertSame($options['refunded_amount'], $instance->refunded_amount); $instance = new Payment(); $instance->refundedAmount = $options['refunded_amount']; self::assertSame($options['refunded_amount'], $instance->getRefundedAmount()); self::assertSame($options['refunded_amount'], $instance->refundedAmount); self::assertSame($options['refunded_amount'], $instance->refunded_amount); $instance = new Payment(); $instance->refunded_amount = $options['refunded_amount']; self::assertSame($options['refunded_amount'], $instance->getRefundedAmount()); self::assertSame($options['refunded_amount'], $instance->refundedAmount); self::assertSame($options['refunded_amount'], $instance->refunded_amount); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidRefundedAmount($value): void { $this->expectException(ValidatorParameterException::class); $instance = new Payment(); $instance->refundedAmount = $value['refunded_amount']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidRefundedAmount($value): void { $this->expectException(ValidatorParameterException::class); $instance = new Payment(); $instance->refundedAmount = $value['refunded_amount']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeRefundedAmount($value): void { $this->expectException(ValidatorParameterException::class); $instance = new Payment(); $instance->refundedAmount = $value['refunded_amount']; } /** * @dataProvider validDataProvider */ public function testGetSetPaid(array $options): void { $instance = new Payment(); $instance->setPaid($options['paid']); self::assertSame($options['paid'], $instance->getPaid()); self::assertSame($options['paid'], $instance->paid); $instance = new Payment(); $instance->paid = $options['paid']; self::assertSame($options['paid'], $instance->getPaid()); self::assertSame($options['paid'], $instance->paid); } /** * @dataProvider validDataProvider */ public function testGetSetTest(array $options): void { $instance = new Payment(); $instance->setTest($options['test']); self::assertSame($options['test'], $instance->getTest()); self::assertSame($options['test'], $instance->test); $instance = new Payment(); $instance->test = $options['test']; self::assertSame($options['test'], $instance->getTest()); self::assertSame($options['test'], $instance->test); } /** * @dataProvider validDataProvider */ public function testGetSetRefundable(array $options): void { $instance = new Payment(); $instance->setRefundable($options['refundable']); self::assertSame($options['refundable'], $instance->getRefundable()); self::assertSame($options['refundable'], $instance->refundable); $instance = new Payment(); $instance->refundable = $options['refundable']; self::assertSame($options['refundable'], $instance->getRefundable()); self::assertSame($options['refundable'], $instance->refundable); } /** * @dataProvider validDataProvider */ public function testGetSetReceiptRegistration(array $options): void { $instance = new Payment(); $instance->setReceiptRegistration($options['receipt_registration']); if (null === $options['receipt_registration'] || '' === $options['receipt_registration']) { self::assertNull($instance->getReceiptRegistration()); self::assertNull($instance->receiptRegistration); self::assertNull($instance->receipt_registration); } else { self::assertSame($options['receipt_registration'], $instance->getReceiptRegistration()); self::assertSame($options['receipt_registration'], $instance->receiptRegistration); self::assertSame($options['receipt_registration'], $instance->receipt_registration); } $instance = new Payment(); $instance->receiptRegistration = $options['receipt_registration']; if (null === $options['receipt_registration'] || '' === $options['receipt_registration']) { self::assertNull($instance->getReceiptRegistration()); self::assertNull($instance->receiptRegistration); self::assertNull($instance->receipt_registration); } else { self::assertSame($options['receipt_registration'], $instance->getReceiptRegistration()); self::assertSame($options['receipt_registration'], $instance->receiptRegistration); self::assertSame($options['receipt_registration'], $instance->receipt_registration); } $instance = new Payment(); $instance->receipt_registration = $options['receipt_registration']; if (null === $options['receipt_registration'] || '' === $options['receipt_registration']) { self::assertNull($instance->getReceiptRegistration()); self::assertNull($instance->receiptRegistration); self::assertNull($instance->receipt_registration); } else { self::assertSame($options['receipt_registration'], $instance->getReceiptRegistration()); self::assertSame($options['receipt_registration'], $instance->receiptRegistration); self::assertSame($options['receipt_registration'], $instance->receipt_registration); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidReceiptRegistration($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setReceiptRegistration($value['receipt_registration']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidReceiptRegistration($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->receiptRegistration = $value['receipt_registration']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeReceiptRegistration($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->receipt_registration = $value['receipt_registration']; } /** * @dataProvider validDataProvider */ public function testGetSetMetadata(array $options): void { $instance = new Payment(); $instance->setMetadata($options['metadata']); self::assertSame($options['metadata'], $instance->getMetadata()); self::assertSame($options['metadata'], $instance->metadata); $instance = new Payment(); $instance->metadata = $options['metadata']; self::assertSame($options['metadata'], $instance->getMetadata()); self::assertSame($options['metadata'], $instance->metadata); } /** * @dataProvider validDataProvider */ public function testGetSetAddTransfers(array $options): void { $instance = new Payment(); self::assertEmpty($instance->getTransfers()); self::assertEmpty($instance->transfers); $instance->setTransfers($options['transfers']); foreach ($options['transfers'] as $key => $transfer) { if (is_array($transfer)) { self::assertSame($transfer, $instance->getTransfers()->get($key)->toArray()); self::assertSame($transfer, $instance->getTransfers()[$key]->toArray()); } else { self::assertSame($transfer, $instance->getTransfers()->get($key)); self::assertSame($transfer, $instance->getTransfers()[$key]); } } $instance = new Payment(); $instance->transfers = $options['transfers']; foreach ($options['transfers'] as $key => $transfer) { if (is_array($transfer)) { self::assertSame($transfer, $instance->getTransfers()->get($key)->toArray()); self::assertSame($transfer, $instance->getTransfers()[$key]->toArray()); } else { self::assertSame($transfer, $instance->getTransfers()->get($key)); self::assertSame($transfer, $instance->getTransfers()[$key]); } } } /** * @dataProvider invalidDataProvider */ public function testInvalidTransfers(array $options): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setTransfers($options['transfers']); } /** * @dataProvider validDataProvider */ public function testGetSetIncomeAmount(array $options): void { $instance = new Payment(); $instance->setIncomeAmount($options['amount']); self::assertEquals($options['amount'], $instance->getIncomeAmount()); } public static function validDataProvider() { $result = []; $cancellationDetailsParties = CancellationDetailsPartyCode::getValidValues(); $countCancellationDetailsParties = count($cancellationDetailsParties); $cancellationDetailsReasons = CancellationDetailsReasonCode::getValidValues(); $countCancellationDetailsReasons = count($cancellationDetailsReasons); for ($i = 0; $i < 20; $i++) { $payment = [ 'id' => Random::str(36), 'status' => Random::value(PaymentStatus::getValidValues()), 'recipient' => new Recipient([ 'account_id' => Random::str(2, 15), ]), 'amount' => new MonetaryAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::RUB]), 'description' => (0 === $i ? null : (1 === $i ? '' : (2 === $i ? Random::str(Payment::MAX_LENGTH_DESCRIPTION) : Random::str(2, Payment::MAX_LENGTH_DESCRIPTION)))), 'payment_method' => (0 === $i ? new PaymentMethodQiwi() : [ 'type' => Random::value(PaymentMethodType::getValidValues()), 'id' => Random::str(10), 'saved' => Random::bool(), 'title' => Random::str(10), ]), 'reference_id' => (0 === $i ? null : (1 === $i ? '' : Random::str(10, 20, 'abcdef0123456789'))), 'created_at' => date(YOOKASSA_DATE, Random::int(1, time())), 'captured_at' => (0 === $i ? null : date(YOOKASSA_DATE, Random::int(1, time()))), 'expires_at' => (0 === $i ? null : date(YOOKASSA_DATE, Random::int(1, time()))), 'confirmation' => new ConfirmationRedirect([ 'confirmation_url' => 'https://test.com', ]), 'charge' => new MonetaryAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::EUR]), 'income' => new MonetaryAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::EUR]), 'refunded_amount' => new ReceiptItemAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::EUR]), 'paid' => Random::bool(), 'test' => Random::bool(), 'refundable' => Random::bool(), 'receipt_registration' => 0 === $i ? null : Random::value(ReceiptRegistrationStatus::getValidValues()), 'metadata' => new Metadata(), 'cancellation_details' => new CancellationDetails([ 'party' => $cancellationDetailsParties[$i % $countCancellationDetailsParties], 'reason' => $cancellationDetailsReasons[$i % $countCancellationDetailsReasons], ]), 'authorization_details' => (0 === $i ? null : new AuthorizationDetails([ 'rrn' => Random::str(10), 'auth_code' => Random::str(10), 'three_d_secure' => ['applied' => Random::bool()], ])), 'deal' => (0 === $i ? null : new PaymentDealInfo([ 'id' => Random::str(36, 50), 'settlements' => [ [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => round(Random::float(1.00, 100.00), 2), 'currency' => 'RUB', ], ], ], ])), 'transfers' => [ [ 'account_id' => Random::str(36), 'amount' => ['value' => '123.00', 'currency' => CurrencyCode::EUR], 'status' => TransferStatus::PENDING, 'description' => Random::str(2, Transfer::MAX_LENGTH_DESCRIPTION), 'release_funds' => false ], new Transfer([ 'account_id' => Random::str(36), 'amount' => new MonetaryAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::EUR]), 'platform_fee_amount' => new MonetaryAmount(['value' => Random::int(1, 10000), 'currency' => CurrencyCode::EUR]), 'description' => Random::str(2, Transfer::MAX_LENGTH_DESCRIPTION), ]), ], 'merchant_customer_id' => (0 === $i ? null : Random::str(2, Payment::MAX_LENGTH_MERCHANT_CUSTOMER_ID)) ]; $result[] = [$payment]; } return $result; } public static function invalidDataProvider() { $result = [ [ [ 'id' => '', 'status' => '', 'recipient' => new stdClass(), 'amount' => '', 'payment_method' => 1, 'reference_id' => [], 'confirmation' => 2, 'charge' => '', 'income' => '', 'refunded_amount' => 3, 'paid' => '', 'refundable' => '', 'created_at' => -Random::int(), 'captured_at' => '23423-234-234', 'receipt_registration' => Random::str(5), 'transfers' => Random::str(5), 'test' => '', ], ], ]; for ($i = 0; $i < 10; $i++) { $payment = [ 'id' => Random::str($i < 5 ? Random::int(1, 35) : Random::int(37, 64)), 'status' => Random::str(2, 35), 'recipient' => new stdClass(), 'amount' => 'test', 'payment_method' => 'test', 'reference_id' => Random::str(66, 128), 'confirmation' => 'test', 'charge' => 'test', 'income' => 'test', 'refunded_amount' => 'test', 'paid' => 0 === $i ? [] : new stdClass(), 'refundable' => 0 === $i ? [] : new stdClass(), 'created_at' => 0 === $i ? '23423-234-32' : -Random::int(), 'captured_at' => -Random::int(), 'receipt_registration' => 0 === $i ? true : Random::str(5), 'transfers' => $i % 2 ? Random::str(2, 35) : new stdClass(), 'test' => [], ]; $result[] = [$payment]; } return $result; } /** * @dataProvider validDataProvider */ public function testGetSetExpiresAt(array $options): void { $instance = new Payment(); $instance->setExpiresAt($options['expires_at']); if (null === $options['expires_at'] || '' === $options['expires_at']) { self::assertNull($instance->getExpiresAt()); self::assertNull($instance->expiresAt); self::assertNull($instance->expires_at); } else { self::assertSame($options['expires_at'], $instance->getExpiresAt()->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expiresAt->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expires_at->format(YOOKASSA_DATE)); } $instance = new Payment(); $instance->expiresAt = $options['expires_at']; if (null === $options['expires_at'] || '' === $options['expires_at']) { self::assertNull($instance->getExpiresAt()); self::assertNull($instance->expiresAt); self::assertNull($instance->expires_at); } else { self::assertSame($options['expires_at'], $instance->getExpiresAt()->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expiresAt->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expires_at->format(YOOKASSA_DATE)); } $instance = new Payment(); $instance->expires_at = $options['expires_at']; if (null === $options['expires_at'] || '' === $options['expires_at']) { self::assertNull($instance->getExpiresAt()); self::assertNull($instance->expiresAt); self::assertNull($instance->expires_at); } else { self::assertSame($options['expires_at'], $instance->getExpiresAt()->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expiresAt->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expires_at->format(YOOKASSA_DATE)); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidExpiresAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->setExpiresAt($value['captured_at']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidExpiresAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->expiresAt = $value['captured_at']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeExpiresAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $instance->expires_at = $value['captured_at']; } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetDescription($options): void { $instance = new Payment(); $instance->setDescription($options['description']); if (empty($options['description']) && ('0' !== $options['description'])) { self::assertEmpty($instance->getDescription()); } else { self::assertEquals($options['description'], $instance->getDescription()); } } public function testSetInvalidLengthDescription(): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $description = Random::str(Payment::MAX_LENGTH_DESCRIPTION + 1); $instance->setDescription($description); } /** * @dataProvider validDataProvider * * @param mixed $options */ public function testSetMerchantCustomerId($options): void { $instance = new Payment(); $instance->setMerchantCustomerId($options['merchant_customer_id']); if (empty($options['merchant_customer_id'])) { self::assertEmpty($instance->getMerchantCustomerId()); } else { self::assertEquals($options['merchant_customer_id'], $instance->getMerchantCustomerId()); } } public function testSetInvalidLengthMerchantCustomerId(): void { $this->expectException(InvalidArgumentException::class); $instance = new Payment(); $merchant_customer_id = Random::str(Payment::MAX_LENGTH_MERCHANT_CUSTOMER_ID + 1); $instance->setMerchantCustomerId($merchant_customer_id); } /** * @dataProvider validDataProvider */ public function testGetSetDeal(array $options): void { $instance = new Payment(); $instance->setDeal($options['deal']); self::assertSame($options['deal'], $instance->getDeal()); self::assertSame($options['deal'], $instance->deal); $instance = new Payment(); $instance->deal = $options['deal']; self::assertSame($options['deal'], $instance->getDeal()); self::assertSame($options['deal'], $instance->deal); } /** * @dataProvider validDataProvider */ public function testGetSetAuthorizationDetails(array $options): void { $instance = new Payment(); $instance->setAuthorizationDetails($options['authorization_details']); self::assertSame($options['authorization_details'], $instance->getAuthorizationDetails()); self::assertSame($options['authorization_details'], $instance->authorizationDetails); self::assertSame($options['authorization_details'], $instance->authorization_details); $instance = new Payment(); $instance->authorizationDetails = $options['authorization_details']; self::assertSame($options['authorization_details'], $instance->getAuthorizationDetails()); self::assertSame($options['authorization_details'], $instance->authorizationDetails); self::assertSame($options['authorization_details'], $instance->authorization_details); $instance = new Payment(); $instance->authorization_details = $options['authorization_details']; self::assertSame($options['authorization_details'], $instance->getAuthorizationDetails()); self::assertSame($options['authorization_details'], $instance->authorizationDetails); self::assertSame($options['authorization_details'], $instance->authorization_details); } /** * @dataProvider validDataProvider */ public function testGetSetCancellationDetails(array $options): void { $instance = new Payment(); $instance->setCancellationDetails($options['cancellation_details']); self::assertSame($options['cancellation_details'], $instance->getCancellationDetails()); self::assertSame($options['cancellation_details'], $instance->cancellationDetails); self::assertSame($options['cancellation_details'], $instance->cancellation_details); $instance = new Payment(); $instance->cancellationDetails = $options['cancellation_details']; self::assertSame($options['cancellation_details'], $instance->getCancellationDetails()); self::assertSame($options['cancellation_details'], $instance->cancellationDetails); self::assertSame($options['cancellation_details'], $instance->cancellation_details); $instance = new Payment(); $instance->cancellation_details = $options['cancellation_details']; self::assertSame($options['cancellation_details'], $instance->getCancellationDetails()); self::assertSame($options['cancellation_details'], $instance->cancellationDetails); self::assertSame($options['cancellation_details'], $instance->cancellation_details); } } yookassa-sdk-php/tests/Model/MetadataTest.php000064400000004412150364342670015247 0ustar00 $value) { $instance->offsetSet($key, $value); } self::assertEquals($source, $instance->toArray()); } /** * @dataProvider dataProvider */ public function testCount(array $source): void { $instance = new Metadata(); $count = 0; self::assertEquals($count, $instance->count()); foreach ($source as $key => $value) { $instance->offsetSet($key, $value); ++$count; self::assertEquals($count, $instance->count()); } } /** * @dataProvider dataProvider */ public function testGetIterator(array $source): void { $instance = new Metadata(); foreach ($source as $key => $value) { $instance->offsetSet($key, $value); } $iterator = $instance->getIterator(); $tmp = $source; for ($iterator->rewind(); $iterator->valid(); $iterator->next()) { self::assertArrayHasKey($iterator->key(), $source); self::assertEquals($source[$iterator->key()], $iterator->current()); unset($tmp[$iterator->key()]); } self::assertCount(0, $tmp); $tmp = $source; foreach ($instance as $key => $value) { self::assertArrayHasKey($key, $source); self::assertEquals($source[$key], $value); unset($tmp[$key]); } self::assertCount(0, $tmp); } public static function dataProvider() { return [ [ ['testKey' => 'testValue'], ], [ [ 'testKey1' => 'testValue1', 'testKey2' => 'testValue2', ], ], [ [ 'testKey1' => 'testValue1', 'testKey2' => 'testValue2', 'testKey3' => 'testValue3', ], ], ]; } } yookassa-sdk-php/tests/Model/Deal/PaymentDealInfoTest.php000064400000010074150364342670017414 0ustar00setId($options['id']); self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); $instance = new PaymentDealInfo(); $instance->id = $options['id']; self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); } /** * @dataProvider fromArrayDataProvider */ public function testFromArray(array $source, PaymentDealInfo $expected): void { $deal = new PaymentDealInfo($source); $dealArray = $expected->toArray(); if (!empty($deal)) { foreach ($deal->toArray() as $property => $value) { self::assertEquals($value, $dealArray[$property]); } } } public function validDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $payment = [ 'id' => Random::str(36, 50), 'settlements' => $this->generateSettlements(), ]; $result[] = [$payment]; } return $result; } public function invalidDataProvider(): array { $result = [ [ [ 'id' => null, 'settlements' => null, ], ], [ [ 'id' => '', 'settlements' => '', ], ], ]; $invalidData = [ [null], [''], [new stdClass()], ['invalid_value'], [0], [3234], [true], [false], [0.43], ]; for ($i = 0; $i < 9; $i++) { $payment = [ 'id' => Random::str($i < 5 ? Random::int(1, 35) : Random::int(51, 64)), 'settlements' => Random::value($invalidData), ]; $result[] = [$payment]; } return $result; } public static function fromArrayDataProvider(): array { $deal = new PaymentDealInfo(); $deal->setId('dl-285e5ee7-0022-5000-8000-01516a44b147'); $settlements = []; $settlements[] = new SettlementPayoutPayment([ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => 123.00, 'currency' => 'RUB', ], ]); $deal->setSettlements($settlements); return [ [ [ 'id' => 'dl-285e5ee7-0022-5000-8000-01516a44b147', 'settlements' => [ [ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => 123.00, 'currency' => 'RUB', ], ], ], ], $deal, ], ]; } private function generateSettlements(): array { $return = []; $count = Random::int(1, 10); for ($i = 0; $i < $count; $i++) { $return[] = $this->generateSettlement(); } return $return; } private function generateSettlement(): array { return [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => round(Random::float(1.00, 100.00), 2), 'currency' => 'RUB', ], ]; } } yookassa-sdk-php/tests/Model/Deal/SafeDealTest.php000064400000051045150364342670016044 0ustar00setId($options['id']); self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); $instance = new SafeDeal(); $instance->id = $options['id']; self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); } /** * @dataProvider validDataProvider */ public function testGetSetType(array $options): void { $instance = new SafeDeal(); $instance->setType($options['type']); self::assertEquals($options['type'], $instance->getType()); self::assertEquals($options['type'], $instance->type); $instance = new SafeDeal(); $instance->type = $options['type']; self::assertEquals($options['type'], $instance->getType()); self::assertEquals($options['type'], $instance->type); } /** * @dataProvider validDataProvider */ public function testGetSetStatus(array $options): void { $instance = new SafeDeal(); $instance->setStatus($options['status']); self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); $instance = new SafeDeal(); $instance->status = $options['status']; self::assertEquals($options['status'], $instance->getStatus()); self::assertEquals($options['status'], $instance->status); } /** * @dataProvider validDataProvider */ public function testGetSetBalance(array $options): void { $instance = new SafeDeal(); $instance->setBalance($options['balance']); self::assertSame($options['balance'], $instance->getBalance()); self::assertSame($options['balance'], $instance->balance); $instance = new SafeDeal(); $instance->balance = $options['balance']; self::assertSame($options['balance'], $instance->getBalance()); self::assertSame($options['balance'], $instance->balance); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidBalance($value): void { if (empty($value['balance'])) { $this->expectException(EmptyPropertyValueException::class); $instance = new SafeDeal(); $instance->setBalance($value['balance']); } elseif (!is_array($value['balance']) && !($value['balance'] instanceof DealBalanceAmount)) { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new SafeDeal(); $instance->setBalance($value['balance']); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidBalance($value): void { if (empty($value['balance'])) { $this->expectException(EmptyPropertyValueException::class); $instance = new SafeDeal(); $instance->balance = $value['balance']; } elseif (!is_array($value['balance']) && !($value['balance'] instanceof DealBalanceAmount)) { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new SafeDeal(); $instance->balance = $value['balance']; } } /** * @dataProvider validDataProvider */ public function testGetSetPayoutBalance(array $options): void { $instance = new SafeDeal(); $instance->setPayoutBalance($options['payout_balance']); self::assertSame($options['payout_balance'], $instance->getPayoutBalance()); self::assertSame($options['payout_balance'], $instance->payout_balance); self::assertSame($options['payout_balance'], $instance->payoutBalance); $instance = new SafeDeal(); $instance->payout_balance = $options['payout_balance']; self::assertSame($options['payout_balance'], $instance->getPayoutBalance()); self::assertSame($options['payout_balance'], $instance->payout_balance); self::assertSame($options['payout_balance'], $instance->payoutBalance); $instance = new SafeDeal(); $instance->payoutBalance = $options['payout_balance']; self::assertSame($options['payout_balance'], $instance->getPayoutBalance()); self::assertSame($options['payout_balance'], $instance->payout_balance); self::assertSame($options['payout_balance'], $instance->payoutBalance); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidPayoutBalance($value): void { if (empty($value['payout_balance'])) { $this->expectException(EmptyPropertyValueException::class); $instance = new SafeDeal(); $instance->setPayoutBalance($value['payout_balance']); } elseif (!is_array($value['payout_balance']) && !($value['payout_balance'] instanceof DealBalanceAmount)) { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new SafeDeal(); $instance->setPayoutBalance($value['payout_balance']); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidPayoutBalance($value): void { if (empty($value['payout_balance'])) { $this->expectException(EmptyPropertyValueException::class); $instance = new SafeDeal(); $instance->payout_balance = $value['payout_balance']; } elseif (!is_array($value['payout_balance']) && !($value['payout_balance'] instanceof DealBalanceAmount)) { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new SafeDeal(); $instance->payout_balance = $value['payout_balance']; } } /** * @dataProvider invalidMetaDataProvider * * @param mixed $value */ public function testSetInvalidMetadata($value): void { if (!is_array($value) && !($value instanceof Metadata)) { $this->expectException(InvalidPropertyValueTypeException::class); $instance = new SafeDeal(); $instance->setMetadata($value); } } /** * @dataProvider validDataProvider */ public function testGetSetDescription(array $options): void { $instance = new SafeDeal(); $instance->setDescription($options['description']); if (is_null($options['description']) && ('0' !== $options['description'])) { self::assertNull($instance->getDescription()); } else { self::assertEquals($options['description'], $instance->getDescription()); } } public function testSetInvalidLengthDescription(): void { $this->expectException(InvalidArgumentException::class); $instance = new SafeDeal(); $description = Random::str(SafeDeal::MAX_LENGTH_DESCRIPTION + 1); $instance->setDescription($description); } /** * @dataProvider validDataProvider */ public function testGetSetFeeMoment(array $options): void { $instance = new SafeDeal(); $instance->setFeeMoment($options['fee_moment']); self::assertEquals($options['fee_moment'], $instance->getFeeMoment()); self::assertEquals($options['fee_moment'], $instance->fee_moment); self::assertEquals($options['fee_moment'], $instance->feeMoment); $instance = new SafeDeal(); $instance->fee_moment = $options['fee_moment']; self::assertEquals($options['fee_moment'], $instance->getFeeMoment()); self::assertEquals($options['fee_moment'], $instance->fee_moment); self::assertEquals($options['fee_moment'], $instance->feeMoment); $instance = new SafeDeal(); $instance->feeMoment = $options['fee_moment']; self::assertEquals($options['fee_moment'], $instance->getFeeMoment()); self::assertEquals($options['fee_moment'], $instance->fee_moment); self::assertEquals($options['fee_moment'], $instance->feeMoment); } /** * @dataProvider validDataProvider */ public function testGetSetCreatedAt(array $options): void { $instance = new SafeDeal(); $instance->setCreatedAt($options['created_at']); self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); $instance = new SafeDeal(); $instance->createdAt = $options['created_at']; self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); $instance = new SafeDeal(); $instance->created_at = $options['created_at']; self::assertSame($options['created_at'], $instance->getCreatedAt()->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->createdAt->format(YOOKASSA_DATE)); self::assertSame($options['created_at'], $instance->created_at->format(YOOKASSA_DATE)); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SafeDeal(); $instance->setCreatedAt($value['created_at']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SafeDeal(); $instance->createdAt = $value['created_at']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeCreatedAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SafeDeal(); $instance->created_at = $value['created_at']; } /** * @dataProvider validDataProvider */ public function testGetSetExpiresAt(array $options): void { $instance = new SafeDeal(); $instance->setExpiresAt($options['expires_at']); if (null === $options['expires_at'] || '' === $options['expires_at']) { self::assertNull($instance->getExpiresAt()); self::assertNull($instance->expiresAt); self::assertNull($instance->expires_at); } else { self::assertSame($options['expires_at'], $instance->getExpiresAt()->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expiresAt->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expires_at->format(YOOKASSA_DATE)); } $instance = new SafeDeal(); $instance->expiresAt = $options['expires_at']; if (null === $options['expires_at'] || '' === $options['expires_at']) { self::assertNull($instance->getExpiresAt()); self::assertNull($instance->expiresAt); self::assertNull($instance->expires_at); } else { self::assertSame($options['expires_at'], $instance->getExpiresAt()->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expiresAt->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expires_at->format(YOOKASSA_DATE)); } $instance = new SafeDeal(); $instance->expires_at = $options['expires_at']; if (null === $options['expires_at'] || '' === $options['expires_at']) { self::assertNull($instance->getExpiresAt()); self::assertNull($instance->expiresAt); self::assertNull($instance->expires_at); } else { self::assertSame($options['expires_at'], $instance->getExpiresAt()->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expiresAt->format(YOOKASSA_DATE)); self::assertSame($options['expires_at'], $instance->expires_at->format(YOOKASSA_DATE)); } } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetInvalidExpiresAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SafeDeal(); $instance->setExpiresAt($value['expires_at']); } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidExpiresAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SafeDeal(); $instance->expiresAt = $value['expires_at']; } /** * @dataProvider invalidDataProvider * * @param mixed $value */ public function testSetterInvalidSnakeExpiresAt($value): void { $this->expectException(InvalidArgumentException::class); $instance = new SafeDeal(); $instance->expires_at = $value['expires_at']; } /** * @dataProvider validDataProvider */ public function testGetSetTest(array $options): void { $instance = new SafeDeal(); $instance->setTest($options['test']); self::assertSame($options['test'], $instance->getTest()); self::assertSame($options['test'], $instance->test); $instance = new SafeDeal(); $instance->test = $options['test']; self::assertSame($options['test'], $instance->getTest()); self::assertSame($options['test'], $instance->test); } /** * @dataProvider validDataProvider */ public function testGetSetMetadata(array $options): void { $instance = new SafeDeal(); $instance->setMetadata($options['metadata']); self::assertSame($options['metadata'], $instance->getMetadata()); self::assertSame($options['metadata'], $instance->metadata); $instance = new SafeDeal(); $instance->metadata = $options['metadata']; self::assertSame($options['metadata'], $instance->getMetadata()); self::assertSame($options['metadata'], $instance->metadata); } /** * @dataProvider fromArrayDataProvider */ public function testFromArray(array $source, SafeDeal $expected): void { $dealArray = $expected->toArray(); if (!empty($source)) { foreach ($source as $property => $value) { self::assertEquals($value, $dealArray[$property]); } } } /** * @return array * @throws Exception */ public static function validDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $payment = [ 'id' => Random::str(36), 'type' => Random::value(DealType::getValidValues()), 'fee_moment' => Random::value(FeeMoment::getValidValues()), 'status' => Random::value(DealStatus::getValidValues()), 'balance' => new DealBalanceAmount(Random::int(1, 10000), 'RUB'), 'payout_balance' => new DealBalanceAmount(Random::int(1, 10000), 'RUB'), 'description' => (0 === $i ? null : (1 === $i ? '' : (2 === $i ? Random::str(SafeDeal::MAX_LENGTH_DESCRIPTION) : Random::str(1, SafeDeal::MAX_LENGTH_DESCRIPTION)))), 'created_at' => date(YOOKASSA_DATE, Random::int(1000000, time())), 'expires_at' => date(YOOKASSA_DATE, Random::int(1111111, time())), 'test' => (bool) ($i % 2), 'metadata' => (($i % 2) ? null : new Metadata()), ]; $result[] = [$payment]; } return $result; } /** * @return \array[][] * @throws Exception */ public static function invalidDataProvider(): array { $result = [ [ [ 'id' => null, 'status' => null, 'balance' => null, 'payout_balance' => null, 'test' => null, 'created_at' => null, 'expires_at' => null, 'metadata' => new stdClass(), ], ], [ [ 'id' => '', 'status' => '', 'balance' => '', 'payout_balance' => '', 'test' => '', 'created_at' => '23423-234-234', 'expires_at' => '23423-234-234', 'metadata' => true, ], ], ]; $invalidDateTimeData = [ null, '', 'invalid_value', Random::str(5, 10), ]; $invalidData = [ null, '', new stdClass(), 'invalid_value', new Metadata(), Random::str(5, 10), ]; $invalidObjectData = [ null, '', new stdClass(), new Metadata(), new DateTime(), new MonetaryAmount(['value' => Random::float(0.01, 99.99)]) ]; for ($i = 0; $i < 6; $i++) { $payment = [ 'id' => Random::str($i < 5 ? Random::int(1, 35) : Random::int(37, 64)), 'status' => $invalidData[$i], 'balance' => $invalidObjectData[$i], 'payout_balance' => $invalidObjectData[$i], 'test' => $invalidData[$i], 'created_at' => $invalidDateTimeData[Random::int(0, 3)], 'expires_at' => $invalidDateTimeData[Random::int(0, 3)], ]; $result[] = [$payment]; } return $result; } /** * @return array * @throws Exception */ public static function fromArrayDataProvider(): array { $customer = new SafeDeal(); $customer->setId('dl-285e5ee7-0022-5000-8000-01516a44b147'); $customer->setStatus(DealStatus::OPENED); $customer->setBalance(new DealBalanceAmount(1000, 'RUB')); $customer->setPayoutBalance(new DealBalanceAmount(1000, 'RUB')); $customer->setDescription('Выплата по заказу №17'); $customer->setCreatedAt(new DateTime(date(YOOKASSA_DATE))); $customer->setExpiresAt(date(YOOKASSA_DATE)); $customer->setTest(true); $customer->setMetadata(['order_id' => 'Заказ №17']); $customer->setType(DealType::SAFE_DEAL); return [ [ [ 'id' => 'dl-285e5ee7-0022-5000-8000-01516a44b147', 'type' => DealType::SAFE_DEAL, 'status' => DealStatus::OPENED, 'balance' => ['value' => 1000, 'currency' => 'RUB'], 'payout_balance' => ['value' => 1000, 'currency' => 'RUB'], 'description' => 'Выплата по заказу №17', 'created_at' => date(YOOKASSA_DATE), 'expires_at' => date(YOOKASSA_DATE), 'test' => true, 'metadata' => [ 'order_id' => 'Заказ №17', ], ], $customer, ], ]; } /** * @return array */ public static function invalidMetaDataProvider(): array { return [ [new stdClass()], ['invalid_value'], [0], [3234], [true], [false], [0.43], ]; } } yookassa-sdk-php/tests/Model/Deal/SettlementPayoutPaymentTest.php000064400000010372150364342670021262 0ustar00getTestInstance(); $instance->fromArray($value); self::assertSame($value['type'], $instance->getType()); self::assertSame($value['type'], $instance->type); self::assertSame($value['amount'], $instance->getAmount()->jsonSerialize()); self::assertSame($value['amount'], $instance->amount->jsonSerialize()); self::assertSame($value, $instance->jsonSerialize()); } /** * @dataProvider validDataProvider */ public function testGetSetType(array $value): void { $instance = $this->getTestInstance(); $instance->setType($value['type']); self::assertSame($value['type'], $instance->getType()); self::assertSame($value['type'], $instance->type); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testSetInvalidType($value): void { $this->expectException(InvalidPropertyException::class); $this->getTestInstance()->setType($value); } /** * @throws Exception */ public static function validDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ]; } return [$result]; } /** * @dataProvider validAmountDataProvider */ public function testGetSetAmount(AmountInterface $value): void { $instance = $this->getTestInstance(); $instance->setAmount($value); self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } /** * @dataProvider validAmountDataProvider */ public function testSetterAmount(AmountInterface $value): void { $instance = $this->getTestInstance(); $instance->amount = $value; self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } public static function validAmountDataProvider(): array { return [ [ new MonetaryAmount( Random::int(1, 100), Random::value(CurrencyCode::getValidValues()) ), ], [ new MonetaryAmount(['value' => Random::float(0.01, 99.99)]), ], ]; } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidPropertyException::class); $this->getTestInstance()->setAmount($value); } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetterInvalidAmount($value): void { $this->expectException(InvalidPropertyException::class); $this->getTestInstance()->amount = $value; } public static function invalidAmountDataProvider(): array { return [ [null], [''], [false], [new stdClass()], ]; } public static function invalidTypeDataProvider(): array { return [ [null], [''], [false], [Random::str(1, 10)], ]; } protected function getTestInstance(): SettlementPayoutPayment { return new SettlementPayoutPayment(); } } yookassa-sdk-php/tests/Model/Deal/SettlementPayoutRefundTest.php000064400000010366150364342670021073 0ustar00getTestInstance(); $instance->fromArray($value); self::assertSame($value['type'], $instance->getType()); self::assertSame($value['type'], $instance->type); self::assertSame($value['amount'], $instance->getAmount()->jsonSerialize()); self::assertSame($value['amount'], $instance->amount->jsonSerialize()); self::assertSame($value, $instance->jsonSerialize()); } /** * @dataProvider validDataProvider */ public function testGetSetType(array $value): void { $instance = $this->getTestInstance(); $instance->setType($value['type']); self::assertSame($value['type'], $instance->getType()); self::assertSame($value['type'], $instance->type); } /** * @dataProvider invalidTypeDataProvider * * @param mixed $value */ public function testSetInvalidType($value): void { $this->expectException(InvalidPropertyException::class); $this->getTestInstance()->setType($value); } /** * @throws Exception */ public static function validDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $result[] = [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => sprintf('%.2f', round(Random::float(0.1, 99.99), 2)), 'currency' => Random::value(CurrencyCode::getValidValues()), ], ]; } return [$result]; } /** * @dataProvider validAmountDataProvider */ public function testGetSetAmount(AmountInterface $value): void { $instance = $this->getTestInstance(); $instance->setAmount($value); self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } /** * @dataProvider validAmountDataProvider */ public function testSetterAmount(AmountInterface $value): void { $instance = $this->getTestInstance(); $instance->amount = $value; self::assertSame($value, $instance->getAmount()); self::assertSame($value, $instance->amount); } public static function validAmountDataProvider(): array { return [ [ new MonetaryAmount( Random::int(1, 100), Random::value(CurrencyCode::getValidValues()) ), ], [ new MonetaryAmount(['value' => Random::float(0.01, 99.99)]), ], ]; } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetInvalidAmount($value): void { $this->expectException(InvalidPropertyException::class); $this->getTestInstance()->setAmount($value); } /** * @dataProvider invalidAmountDataProvider * * @param mixed $value */ public function testSetterInvalidAmount($value): void { $this->expectException(InvalidPropertyException::class); $this->getTestInstance()->amount = $value; } public static function invalidAmountDataProvider(): array { return [ [null], [''], [false], [new stdClass()], ]; } public static function invalidTypeDataProvider(): array { return [ [null], [''], [false], [Random::str(1, 10)], ]; } protected function getTestInstance(): SettlementPayoutRefund { return new SettlementPayoutRefund(); } } yookassa-sdk-php/tests/Model/Deal/CaptureDealDataTest.php000064400000006322150364342670017361 0ustar00toArray(); if (!empty($deal)) { foreach ($deal->toArray() as $property => $value) { self::assertEquals($value, $dealArray[$property]); } } } public function validDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $payment = [ 'settlements' => $this->generateSettlements(), ]; $result[] = [$payment]; } return $result; } public function invalidDataProvider(): array { $result = [ [ [ 'settlements' => null, ], ], [ [ 'settlements' => '', ], ], ]; $invalidData = [ [null], [''], [new stdClass()], ['invalid_value'], [0], [3234], [true], [false], [0.43], ]; for ($i = 0; $i < 9; $i++) { $payment = [ 'settlements' => Random::value($invalidData), ]; $result[] = [$payment]; } return $result; } public static function fromArrayDataProvider(): array { $deal = new CaptureDealData(); $settlements = []; $settlements[] = new SettlementPayoutPayment([ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => 123.00, 'currency' => 'RUB', ], ]); $deal->setSettlements($settlements); return [ [ [ 'settlements' => [ [ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => 123.00, 'currency' => 'RUB', ], ], ], ], $deal, ], ]; } private function generateSettlements(): array { $return = []; $count = Random::int(1, 10); for ($i = 0; $i < $count; $i++) { $return[] = $this->generateSettlement(); } return $return; } private function generateSettlement(): array { return [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => round(Random::float(1.00, 100.00), 2), 'currency' => 'RUB', ], ]; } } yookassa-sdk-php/tests/Model/Deal/RefundDealInfoTest.php000064400000010164150364342670017222 0ustar00setId($options['id']); self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); $instance = new RefundDealInfo(); $instance->id = $options['id']; self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); } /** * @dataProvider fromArrayDataProvider */ public function testFromArray(array $source, RefundDealInfo $expected): void { $deal = new RefundDealInfo($source); $dealArray = $expected->toArray(); if (!empty($deal)) { foreach ($deal->toArray() as $property => $value) { self::assertEquals($value, $dealArray[$property]); } } } public function validDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $payment = [ 'id' => Random::str(36, 50), 'refund_settlements' => $this->generateRefundSettlements(), ]; $result[] = [$payment]; } return $result; } public function invalidDataProvider(): array { $result = [ [ [ 'id' => null, 'refund_settlements' => null, ], ], [ [ 'id' => '', 'refund_settlements' => '', ], ], ]; $invalidData = [ [null], [''], [new stdClass()], ['invalid_value'], [0], [3234], [true], [false], [0.43], ]; for ($i = 0; $i < 9; $i++) { $payment = [ 'id' => Random::str($i < 5 ? Random::int(1, 35) : Random::int(51, 64)), 'refund_settlements' => Random::value($invalidData), ]; $result[] = [$payment]; } return $result; } public static function fromArrayDataProvider(): array { $deal = new RefundDealInfo(); $deal->setId('dl-285e5ee7-0022-5000-8000-01516a44b147'); $settlements = []; $settlements[] = new SettlementPayoutRefund([ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => 123.00, 'currency' => 'RUB', ], ]); $deal->setRefundSettlements($settlements); return [ [ [ 'id' => 'dl-285e5ee7-0022-5000-8000-01516a44b147', 'refund_settlements' => [ [ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => 123.00, 'currency' => 'RUB', ], ], ], ], $deal, ], ]; } private function generateRefundSettlements(): array { $return = []; $count = Random::int(1, 10); for ($i = 0; $i < $count; $i++) { $return[] = $this->generateRefundSettlement(); } return $return; } private function generateRefundSettlement(): array { return [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => round(Random::float(1.00, 100.00), 2), 'currency' => 'RUB', ], ]; } } yookassa-sdk-php/tests/Model/Deal/RefundDealDataTest.php000064400000006543150364342670017206 0ustar00toArray(); if (!empty($deal)) { foreach ($deal->toArray() as $property => $value) { self::assertEquals($value, $dealArray[$property]); } } } public function validDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $payment = [ 'refund_settlements' => $this->generateRefundSettlements(), ]; $result[] = [$payment]; } return $result; } public function invalidDataProvider(): array { $result = [ [ [ 'refund_settlements' => null, ], ], [ [ 'refund_settlements' => '', ], ], ]; $invalidData = [ [null], [''], [new stdClass()], ['invalid_value'], [0], [3234], [true], [false], [0.43], ]; for ($i = 0; $i < 9; $i++) { $payment = [ 'refund_settlements' => Random::value($invalidData), ]; $result[] = [$payment]; } return $result; } public static function fromArrayDataProvider(): array { $deal = new RefundDealData(); $settlements = []; $settlements[] = new SettlementPayoutRefund([ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => 123.00, 'currency' => 'RUB', ], ]); $deal->setRefundSettlements($settlements); return [ [ [ 'refund_settlements' => [ [ 'type' => SettlementPayoutPaymentType::PAYOUT, 'amount' => [ 'value' => 123.00, 'currency' => 'RUB', ], ], ], ], $deal, ], ]; } private function generateRefundSettlements(): array { $return = []; $count = Random::int(1, 10); for ($i = 0; $i < $count; $i++) { $return[] = $this->generateRefundSettlement(); } return $return; } private function generateRefundSettlement(): array { return [ 'type' => Random::value(SettlementPayoutPaymentType::getValidValues()), 'amount' => [ 'value' => round(Random::float(1.00, 100.00), 2), 'currency' => 'RUB', ], ]; } } yookassa-sdk-php/tests/Model/Deal/DealBalanceAmountTest.php000064400000015267150364342670017705 0ustar00getValue()); self::assertEquals(strtoupper($currency), $instance->getCurrency()); self::assertNotNull($instance->getIntegerValue()); } /** * @dataProvider validArrayDataProvider * * @param mixed $data */ public function testArrayConstructor($data): void { $instance = new DealBalanceAmount(); self::assertEquals(self::DEFAULT_VALUE, $instance->getValue()); self::assertEquals(self::DEFAULT_CURRENCY, $instance->getCurrency()); $instance = new DealBalanceAmount($data); self::assertEquals(number_format($data['value'], 2, '.', ''), $instance->getValue()); self::assertEquals(strtoupper($data['currency']), $instance->getCurrency()); } /** * @dataProvider validValueDataProvider * * @param mixed $value */ public function testGetSetValue($value): void { $expected = number_format($value, 2, '.', ''); $instance = self::getInstance(); self::assertEquals(self::DEFAULT_VALUE, $instance->getValue()); self::assertEquals(self::DEFAULT_VALUE, $instance->value); $instance->setValue($value); self::assertEquals($expected, $instance->getValue()); self::assertEquals($expected, $instance->value); $instance = self::getInstance(); $instance->value = $value; self::assertEquals($expected, $instance->getValue()); self::assertEquals($expected, $instance->value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetInvalidValue($value, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->setValue($value); } /** * @dataProvider invalidValueDataProvider * * @param mixed $value */ public function testSetterInvalidValue($value, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->value = $value; } /** * @dataProvider validCurrencyDataProvider */ public function testGetSetCurrency(string $currency): void { $instance = self::getInstance(); self::assertEquals(self::DEFAULT_CURRENCY, $instance->getCurrency()); self::assertEquals(self::DEFAULT_CURRENCY, $instance->currency); $instance->setCurrency($currency); self::assertEquals(strtoupper($currency), $instance->getCurrency()); self::assertEquals(strtoupper($currency), $instance->currency); } /** * @dataProvider invalidCurrencyDataProvider */ public function testSetInvalidCurrency(mixed $currency, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->setCurrency($currency); } /** * @dataProvider invalidCurrencyDataProvider */ public function testSetterInvalidCurrency(mixed $currency, string $exceptionClassName): void { $instance = self::getInstance(); $this->expectException($exceptionClassName); $instance->currency = $currency; } public function validDataProvider(): array { $result = $this->validValueDataProvider(); foreach ($this->validCurrencyDataProvider() as $index => $tmp) { if (isset($result[$index])) { $result[$index][] = $tmp[0]; } } return $result; } public static function validArrayDataProvider(): array { $result = []; foreach (range(1, 10) as $i) { $result[$i][] = [ 'value' => Random::value(['-', '']) . Random::float(0, 9999.99), 'currency' => Random::value(CurrencyCode::getValidValues()), ]; } return $result; } public static function validValueDataProvider(): array { return [ [0.01], [0.1], [0.11], [0.1111], [0.1166], ['0.01'], [1], [0], [-1], ['100'], ['-100'], ]; } public static function validCurrencyDataProvider(): array { $result = []; foreach (CurrencyCode::getValidValues() as $value) { $result[] = [$value]; } return $result; } public static function invalidValueDataProvider(): array { return [ [null, EmptyPropertyValueException::class], ['', EmptyPropertyValueException::class], [[], EmptyPropertyValueException::class], [fopen(__FILE__, 'r'), InvalidPropertyValueTypeException::class], ['invalid_value', InvalidPropertyValueTypeException::class], [true, InvalidPropertyValueTypeException::class], [false, EmptyPropertyValueException::class], ]; } public static function invalidCurrencyDataProvider(): array { return [ [null, EmptyPropertyValueException::class], ['invalid_value', InvalidPropertyValueException::class], ['III', InvalidPropertyValueException::class], ]; } /** * @dataProvider validDataProvider * * @param mixed $value * @param mixed $currency */ public function testJsonSerialize($value, $currency): void { $instance = new DealBalanceAmount($value, $currency); $expected = [ 'value' => number_format($value, 2, '.', ''), 'currency' => strtoupper($currency), ]; self::assertEquals($expected, $instance->jsonSerialize()); } protected static function getInstance($value = null, $currency = null): DealBalanceAmount { return new DealBalanceAmount($value, $currency); } } yookassa-sdk-php/tests/Model/Deal/PayoutDealInfoTest.php000064400000004463150364342670017265 0ustar00setId($options['id']); self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); $instance = new PayoutDealInfo(); $instance->id = $options['id']; self::assertEquals($options['id'], $instance->getId()); self::assertEquals($options['id'], $instance->id); } /** * @dataProvider fromArrayDataProvider */ public function testFromArray(array $source, PayoutDealInfo $expected): void { $deal = new PayoutDealInfo($source); $dealArray = $expected->toArray(); if (!empty($source)) { foreach ($source as $property => $value) { self::assertEquals($value, $dealArray[$property]); } } } public static function validDataProvider(): array { $result = []; for ($i = 0; $i < 10; $i++) { $payment = [ 'id' => Random::str(36, 50), ]; $result[] = [$payment]; } return $result; } public function invalidDataProvider(): array { $result = [ [ [ 'id' => null, ], ], [ [ 'id' => '', ], ], ]; for ($i = 0; $i < 9; $i++) { $payment = [ 'id' => Random::str($i < 5 ? Random::int(1, 35) : Random::int(51, 64)), ]; $result[] = [$payment]; } return $result; } public static function fromArrayDataProvider(): array { $customer = new PayoutDealInfo(); $customer->setId('dl-285e5ee7-0022-5000-8000-01516a44b147'); return [ [ [ 'id' => 'dl-285e5ee7-0022-5000-8000-01516a44b147', ], $customer, ], ]; } } yookassa-sdk-php/tests/Common/Exceptions/TooManyRequestsExceptionTest.php000064400000000775150364342670023051 0ustar00getMessage()); } public static function messageDataProvider() { $result = []; foreach (JsonException::$errorLabels as $code => $message) { $result[] = [$message, $code]; } $result[] = ['Test error', -1]; return $result; } } yookassa-sdk-php/tests/Common/Exceptions/InvalidPropertyValueExceptionTest.php000064400000002057150364342670024052 0ustar00getTestInstance('', '', $value); if (null !== $value) { self::assertEquals($value, $instance->getValue()); } else { self::assertNull($instance->getValue()); } } public static function validValueDataProvider() { return [ [null], [''], ['value'], [['test']], [new stdClass()], [new DateTime()], ]; } protected function getTestInstance($message, $property, $value = null): InvalidPropertyValueException { return new InvalidPropertyValueException($message, 0, $property, $value); } } yookassa-sdk-php/tests/Common/Exceptions/InvalidPropertyExceptionTest.php000064400000001626150364342670023056 0ustar00getTestInstance('', $property); self::assertEquals((string) $property, $instance->getProperty()); } public static function validPropertyDataProvider() { return [ [''], ['property'], [new StringObject('property')], ]; } protected function getTestInstance(string $message, string $property): InvalidPropertyException { return new InvalidPropertyException($message, 0, $property); } } yookassa-sdk-php/tests/Common/Exceptions/InvalidRequestExceptionTest.php000064400000002305150364342670022655 0ustar00getRequestObject()); $message = 'Failed to build request "' . $requestObject::class . '": ""'; self::assertEquals($message, $instance->getMessage()); } else { self::assertNull($instance->getRequestObject()); self::assertEquals($requestObject, $instance->getMessage()); } } public static function requestObjectDataProvider() { return [ [new PaymentsRequest()], [new CreatePaymentRequest()], ]; } } yookassa-sdk-php/tests/Common/Exceptions/EmptyPropertyValueExceptionTest.php000064400000000620150364342670023554 0ustar00getTestInstance('', 0, [], $body); $tmp = json_decode($body, true); if (empty($tmp['description'])) { self::assertEquals('', $instance->getMessage()); } else { self::assertEquals($tmp['description'] . '.', $instance->getMessage()); } } public static function descriptionDataProvider() { return [ ['{}'], ['{"description":"test"}'], ['{"description":"У попа была собака"}'], ]; } /** * @dataProvider codeDataProvider */ public function testCode(string $body): void { $instance = $this->getTestInstance('', 0, [], $body); $tmp = json_decode($body, true); if (empty($tmp['code'])) { self::assertEquals('', $instance->getMessage()); } else { self::assertEquals('Error code: ' . $tmp['code'] . '.', $instance->getMessage()); } } public static function codeDataProvider() { return [ ['{}'], ['{"code":"123"}'], ['{"code":"server_error"}'], ]; } /** * @dataProvider parameterDataProvider */ public function testParameter(string $body): void { $instance = $this->getTestInstance('', 0, [], $body); $tmp = json_decode($body, true); if (empty($tmp['parameter'])) { self::assertEquals('', $instance->getMessage()); } else { self::assertEquals('Parameter name: ' . $tmp['parameter'] . '.', $instance->getMessage()); } } public static function parameterDataProvider() { return [ ['{}'], ['{"parameter":"parameter_name"}'], ['{"parameter":null}'], ]; } /** * @dataProvider retryAfterDataProvider */ public function testRetryAfter(string $body): void { $instance = $this->getTestInstance('', 0, [], $body); $tmp = json_decode($body, true); if (empty($tmp['retry_after'])) { self::assertNull($instance->retryAfter); } else { self::assertEquals($tmp['retry_after'], $instance->retryAfter); } } public static function retryAfterDataProvider() { return [ ['{}'], ['{"retry_after":-20}'], ['{"retry_after":123}'], ]; } /** * @dataProvider typeDataProvider */ public function testType(string $body): void { $instance = $this->getTestInstance('', 0, [], $body); $tmp = json_decode($body, true); if (empty($tmp['type'])) { self::assertNull($instance->type); } else { self::assertEquals($tmp['type'], $instance->type); } } public static function typeDataProvider() { return [ ['{}'], ['{"type":"server_error"}'], ['{"type":"error"}'], ]; } /** * @dataProvider messageDataProvider * * @param mixed $body */ public function testMessage($body): void { $instance = $this->getTestInstance('', 0, [], $body); $tmp = json_decode($body, true); $message = ''; if (!empty($tmp['description'])) { $message = $tmp['description'] . '. '; } if (!empty($tmp['code'])) { $message .= 'Error code: ' . $tmp['code'] . '. '; } if (!empty($tmp['parameter'])) { $message .= 'Parameter name: ' . $tmp['parameter'] . '. '; } self::assertEquals(trim($message), $instance->getMessage()); if (empty($tmp['retry_after'])) { self::assertNull($instance->retryAfter); } else { self::assertEquals($tmp['retry_after'], $instance->retryAfter); } if (empty($tmp['type'])) { self::assertNull($instance->type); } else { self::assertEquals($tmp['type'], $instance->type); } } public static function messageDataProvider() { return [ ['{}'], ['{"code":"server_error","description":"Internal server error"}'], ['{"code":"server_error","description":"Invalid parameter value","parameter":"shop_id"}'], ['{"code":"server_error","description":"Invalid parameter value","parameter":"shop_id","type":"test"}'], ['{"code":"server_error","description":"Invalid parameter value","parameter":"shop_id","retry_after":333}'], ]; } abstract public function expectedHttpCode(); public function testExceptionCode(): void { $instance = $this->getTestInstance(); self::assertEquals($this->expectedHttpCode(), $instance->getCode()); } } yookassa-sdk-php/tests/Common/Exceptions/ApiExceptionTest.php000064400000003325150364342670020432 0ustar00getTestInstance('', 0, $headers); self::assertEquals($headers, $instance->getResponseHeaders()); } public static function responseHeadersDataProvider() { return [ [ [], ], [ ['HTTP/1.1 200 Ok'], ], [ [ 'HTTP/1.1 200 Ok', 'Content-length: 0', ], ], [ [ 'HTTP/1.1 200 Ok', 'Content-length: 0', 'Connection: close', ], ], ]; } /** * @dataProvider responseBodyDataProvider */ public function testGetResponseBody(string $body): void { $instance = $this->getTestInstance('', 0, [], $body); self::assertEquals($body, $instance->getResponseBody()); } public static function responseBodyDataProvider() { return [ [ '', ], [ '{"success":true}', ], [ '', ], ]; } } yookassa-sdk-php/tests/Common/Exceptions/ResponseProcessingExceptionTest.php000064400000007461150364342670023561 0ustar00getTestInstance('', 0, [], $body); $tmp = json_decode($body, true); if (empty($tmp['description'])) { self::assertEquals('', $instance->getMessage()); } else { self::assertEquals($tmp['description'] . '.', $instance->getMessage()); } } public static function descriptionDataProvider() { return [ ['{}'], ['{"description":"test"}'], ['{"description":"У попа была собака"}'], ]; } /** * @dataProvider retryAfterDataProvider */ public function testRetryAfter(string $body): void { $instance = $this->getTestInstance('', 0, [], $body); $tmp = json_decode($body, true); if (empty($tmp['retry_after'])) { self::assertNull($instance->retryAfter); } else { self::assertEquals($tmp['retry_after'], $instance->retryAfter); } } public static function retryAfterDataProvider() { return [ ['{}'], ['{"retry_after":-20}'], ['{"retry_after":123}'], ]; } /** * @dataProvider typeDataProvider */ public function testType(string $body): void { $instance = $this->getTestInstance('', 0, [], $body); $tmp = json_decode($body, true); if (empty($tmp['type'])) { self::assertNull($instance->type); } else { self::assertEquals($tmp['type'], $instance->type); } } public static function typeDataProvider() { return [ ['{}'], ['{"type":"server_error"}'], ['{"type":"error"}'], ]; } /** * @dataProvider messageDataProvider * * @param mixed $body */ public function testMessage($body): void { $instance = $this->getTestInstance('', 0, [], $body); $tmp = json_decode($body, true); $message = ''; if (!empty($tmp['description'])) { $message = $tmp['description'] . '.'; } self::assertEquals($message, $instance->getMessage()); if (empty($tmp['retry_after'])) { self::assertNull($instance->retryAfter); } else { self::assertEquals($tmp['retry_after'], $instance->retryAfter); } if (empty($tmp['type'])) { self::assertNull($instance->type); } else { self::assertEquals($tmp['type'], $instance->type); } } public static function messageDataProvider() { return [ ['{}'], ['{"code":"server_error","description":"Internal server error"}'], ['{"code":"server_error","description":"Invalid parameter value","parameter":"shop_id"}'], ['{"code":"server_error","description":"Invalid parameter value","parameter":"shop_id","type":"test"}'], ['{"code":"server_error","description":"Invalid parameter value","parameter":"shop_id","retry_after":333}'], ]; } public function testExceptionCode(): void { $instance = $this->getTestInstance(); self::assertEquals($this->expectedHttpCode(), $instance->getCode()); } } yookassa-sdk-php/tests/Common/Exceptions/InvalidPropertyValueTypeExceptionTest.php000064400000002625150364342670024715 0ustar00getTestInstance('', '', $value); self::assertEquals($type, $instance->getType()); } public static function validTypeDataProvider() { return [ [null, 'null'], ['', 'string'], ['value', 'string'], [['test'], 'array'], [new stdClass(), 'stdClass'], [new DateTime(), 'DateTime'], [new InvalidPropertyException(), 'YooKassa\\Common\\Exceptions\\InvalidPropertyException'], [fopen(__FILE__, 'rb'), 'resource'], [true, 'boolean'], [false, 'boolean'], [0, 'integer'], [0.01, 'double'], ]; } /** * @param null $value */ protected function getTestInstance(string $message, string $property, $value = null): InvalidPropertyValueTypeException { return new InvalidPropertyValueTypeException($message, 0, $property, $value); } } yookassa-sdk-php/tests/Common/Exceptions/NotFoundExceptionTest.php000064400000000741150364342670021454 0ustar00getTestInstance($name); self::assertEquals($excepted, $instance->getMessage()); } public static function messageDataProvider() { return [ ['json', 'json extension is not loaded!'], ['curl', 'curl extension is not loaded!'], ['gd', 'gd extension is not loaded!'], ]; } protected function getTestInstance(string $name, int $code = 0): ExtensionNotFoundException { return new ExtensionNotFoundException($name, $code); } } yookassa-sdk-php/tests/Common/Exceptions/InternalServerErrorTest.php000064400000000751150364342670022017 0ustar00assertEquals($type, $instance->getType()); $this->assertCount(is_array($data) ? count($data) : 0, $instance->getItems()); $this->assertEquals(is_array($data) ? count($data) : 0, $instance->count()); if (is_array($data) && count($data) > 0) { $cnt = count($data); $instance->remove(0); $this->assertCount($cnt - 1, $instance->getItems()); $this->assertEquals($cnt - 1, $instance->count()); } $instance = new ListObject($type, $data); if (is_array($data) && count($data) > 0) { $instance->clear(); $this->assertCount(0, $instance->getItems()); $this->assertEquals(0, $instance->count()); } } /** * @return void */ public function testChangeType(): void { $data = [ ['first_name' => 'Michail', 'last_name' => 'Sidorov'], new Passenger(['first_name' => 'Alex', 'last_name' => 'Lutor']), ]; $instance = new ListObject(Passenger::class); $this->assertEquals(Passenger::class, $instance->getType()); $this->assertCount(0, $instance->getItems()); $this->assertEquals(0, $instance->count()); $instance->merge($data); $this->assertEquals(Passenger::class, $instance->getType()); $this->assertCount(count($data), $instance->getItems()); $this->assertEquals(count($data), $instance->count()); $this->expectException(InvalidArgumentException::class); $instance->setType(Leg::class); $this->assertEquals(Passenger::class, $instance->getType()); } /** * @return void */ public function testOffsets(): void { $data = [ ['first_name' => 'Michail', 'last_name' => 'Sidorov'], new Passenger(['first_name' => 'Alex', 'last_name' => 'Lutor']), ]; $instance = new ListObject(Passenger::class, $data); $this->assertEquals($data[0], $instance->get(0)->toArray()); $this->assertEquals($data[0], $instance[0]->toArray()); $this->assertTrue(isset($instance[1])); unset($instance[1]); $this->assertCount(count($data) - 1, $instance->getItems()); $this->assertEquals(count($data) - 1, $instance->count()); $instance[] = ['first_name' => 'Alex', 'last_name' => 'Lutor']; $this->assertCount(count($data), $instance->getItems()); $this->assertEquals(count($data), $instance->count()); } /** * @dataProvider invalidDataProvider * @param string $type * @param mixed $data * @param string $exception * @return void */ public function testSetInvalid(string $type, mixed $data, string $exception): void { $this->expectException($exception); new ListObject($type, $data); } public function validDataProvider(): array { return [ [ Airline::class, [ [ 'booking_reference' => 'IIIKRV', 'ticket_number' => '12342123413', 'passengers' => [ [ 'first_name' => 'SERGEI', 'last_name' => 'IVANOV', ], ], 'legs' => [ [ 'departure_airport' => 'LED', 'destination_airport' => 'AMS', 'departure_date' => '2023-01-20', ], ], ], ] ], [ Passenger::class, [ ['first_name' => 'Michail', 'last_name' => 'Sidorov'], new Passenger(['first_name' => 'Alex', 'last_name' => 'Lutor']), ] ], [ Passenger::class, null ], ]; } public function invalidDataProvider(): array { return [ [ Passenger::class, [ new stdClass(), ], InvalidArgumentException::class ], [ Passenger::class, [ ['first_name' => null, 'last_name' => 'Sidorov'], ], EmptyPropertyValueException::class ], [ Passenger::class, [ ['first_name' => 'Michail', 'last_name' => Random::str(65)], ], InvalidPropertyValueException::class ], [ AbstractObject::class, [ [], ], InvalidArgumentException::class ], [ BaseDeal::class, [ [], ], InvalidArgumentException::class ], ]; } } yookassa-sdk-php/tests/Common/AbstractRequestBuilderTest.php000064400000007027150364342670020347 0ustar00build([]); } catch (InvalidRequestException $e) { $request = $builder->build([ 'isValid' => true, ]); self::assertTrue($request->isValid()); $mess = 'test message'; try { $builder->build([ 'throwException' => new Exception($mess), ]); } catch (Exception $e) { self::assertEquals($mess, $e->getPrevious()->getMessage()); return; } self::fail('Exception not thrown in setThrowException method'); return; } self::fail('Exception not thrown in build method'); } public function testSetOptions(): void { $builder = new TestAbstractRequestBuilder(); $builder->setOptions([]); try { $builder->build(); } catch (InvalidRequestException $e) { $builder->setOptions([ 'is_valid' => true, ]); self::assertTrue($builder->build()->isValid()); try { $builder->setOptions('test'); } catch (Exception $e) { self::assertInstanceOf(InvalidArgumentException::class, $e); return; } self::fail('Exception not thrown in setOptions method'); } self::fail('Exception not thrown in build method'); } } class TestAbstractRequestBuilder extends AbstractRequestBuilder { public function setIsValid($value) { $this->currentObject->setIsValid($value); return $this; } /** * @throws Exception */ public function setThrowException(Exception $e): TestAbstractRequestBuilder { $this->currentObject->setThrowException($e); return $this; } /** * Инициализирует пустой запрос * * @return TestAbstractRequestClass Инстанс запроса, который будем собирать */ protected function initCurrentObject(): TestAbstractRequestClass { return new TestAbstractRequestClass(); } } class TestAbstractRequestClass extends AbstractRequest { private bool $valid = false; private ?Exception $exception = null; /** * @throws Exception */ public function setThrowException(Exception $e): void { $this->exception = $e; } public function setIsValid(bool $value): void { $this->valid = $value; } public function isValid(): bool { return $this->valid; } /** * Валидирует текущий запрос, проверяет все ли нужные свойства установлены. * * @return bool True если запрос валиден, false если нет * * @throws Exception */ public function validate(): bool { if (null !== $this->exception) { $this->setValidationError($this->exception->getMessage()); throw $this->exception; } return $this->valid; } } yookassa-sdk-php/tests/Common/AbstractEnumTest.php000064400000003771150364342670016316 0ustar00 true, self::ENUM_VALUE_2 => true, self::ENUM_DISABLED_VALUE_1 => false, self::ENUM_DISABLED_VALUE_2 => false, ]; } yookassa-sdk-php/tests/Common/AbstractObjectTest.php000064400000016400150364342670016611 0ustar00getTestInstance(); if (!$exists) { self::assertFalse($instance->offsetExists($value)); self::assertFalse(isset($instance[$value])); self::assertFalse(isset($instance->{$value})); $instance->offsetSet($value, $value); } self::assertTrue($instance->offsetExists($value)); self::assertTrue(isset($instance[$value])); self::assertTrue(isset($instance->{$value})); } /** * @dataProvider offsetDataProvider * * @param mixed $value */ public function testOffsetGet(mixed $value): void { $instance = $this->getTestInstance(); $tmp = $instance->offsetGet($value); self::assertNull($tmp); $tmp = $instance[$value]; self::assertNull($tmp); $tmp = $instance->{$value}; self::assertNull($tmp); $instance->offsetSet($value, $value); $tmp = $instance->offsetGet($value); self::assertEquals($value, $tmp); $tmp = $instance[$value]; self::assertEquals($value, $tmp); $tmp = $instance->{$value}; self::assertEquals($value, $tmp); } /** * @dataProvider offsetDataProvider * * @param mixed $value * @param mixed $exists */ public function testOffsetUnset(mixed $value, mixed $exists): void { $instance = $this->getTestInstance(); if ($exists) { self::assertTrue($instance->offsetExists($value)); $instance->offsetUnset($value); self::assertTrue($instance->offsetExists($value)); unset($instance[$value]); self::assertTrue($instance->offsetExists($value)); unset($instance->{$value}); self::assertTrue($instance->offsetExists($value)); } else { self::assertFalse($instance->offsetExists($value)); $instance->offsetUnset($value); self::assertFalse($instance->offsetExists($value)); unset($instance[$value]); self::assertFalse($instance->offsetExists($value)); unset($instance->{$value}); self::assertFalse($instance->offsetExists($value)); $instance->{$value} = $value; self::assertTrue($instance->offsetExists($value)); $instance->offsetUnset($value); self::assertFalse($instance->offsetExists($value)); $instance->{$value} = $value; self::assertTrue($instance->offsetExists($value)); unset($instance[$value]); self::assertFalse($instance->offsetExists($value)); $instance->{$value} = $value; self::assertTrue($instance->offsetExists($value)); unset($instance->{$value}); self::assertFalse($instance->offsetExists($value)); } } public static function offsetDataProvider(): array { return [ ['property', true], ['propertyCamelCase', true], ['property_camel_case', true], ['Property', true], ['PropertyCamelCase', true], ['Property_Camel_Case', true], ['not_exists', false], ]; } public function testJsonSerialize(): void { $instance = $this->getTestInstance(); $data = $instance->jsonSerialize(); $expected = []; self::assertEquals($expected, $data); $instance->setProperty('propertyValue'); $data = $instance->jsonSerialize(); $expected = [ 'property' => 'propertyValue', ]; self::assertEquals($expected, $data); $instance->setPropertyCamelCase($this->getTestInstance()); $data = $instance->jsonSerialize(); $expected = [ 'property' => 'propertyValue', 'property_camel_case' => [], ]; self::assertEquals($expected, $data); $instance->getPropertyCamelCase()->setProperty(['test', 1, 2, 3]); $data = $instance->jsonSerialize(); $expected = [ 'property' => 'propertyValue', 'property_camel_case' => [ 'property' => ['test', 1, 2, 3], ], ]; self::assertEquals($expected, $data); $date = new DateTime(); $instance->getPropertyCamelCase()->setPropertyCamelCase($date); $data = $instance->jsonSerialize(); $expected = [ 'property' => 'propertyValue', 'property_camel_case' => [ 'property' => ['test', 1, 2, 3], 'property_camel_case' => $date->format(YOOKASSA_DATE), ], ]; self::assertEquals($expected, $data); $instance->getPropertyCamelCase()->unknown_obj = $this->getTestInstance(); $data = $instance->jsonSerialize(); $expected = [ 'property' => 'propertyValue', 'property_camel_case' => [ 'property' => ['test', 1, 2, 3], 'property_camel_case' => $date->format(YOOKASSA_DATE), 'unknown_obj' => [], ], ]; self::assertEquals($expected, $data); $instance->unknown_property = true; $data = $instance->jsonSerialize(); $expected['unknown_property'] = true; self::assertEquals($expected, $data); $instance->unknown_array = [false]; $data = $instance->jsonSerialize(); $expected['unknown_array'] = [false]; self::assertEquals($expected, $data); $instance->unknown_date = $date; $data = $instance->jsonSerialize(); $expected['unknown_date'] = $date->format(YOOKASSA_DATE); self::assertEquals($expected, $data); $obj = new stdClass(); $obj->test = 'test1'; $instance->unknown_obj = $obj; $data = $instance->jsonSerialize(); $expected['unknown_obj'] = $obj; self::assertEquals($expected, $data); $obj = new stdClass(); $obj->test = 'test2'; $instance->property_camel_case = $obj; $data = $instance->jsonSerialize(); $expected['property_camel_case'] = $obj; self::assertEquals($expected, $data); $instance->property_camel_case = null; $data = $instance->jsonSerialize(); unset($expected['property_camel_case']); self::assertEquals($expected, $data); } protected function getTestInstance(): TestAbstractObject { return new TestAbstractObject(); } } class TestAbstractObject extends AbstractObject { private $_property; private $_anotherProperty; public function getProperty() { return $this->_property; } public function setProperty($value): void { $this->_property = $value; } public function getPropertyCamelCase() { return $this->_anotherProperty; } public function setPropertyCamelCase($value): void { $this->_anotherProperty = $value; } } yookassa-sdk-php/tests/Common/LoggerWrapperTest.php000064400000011377150364342670016507 0ustar00expectException(TypeError::class); $this->expectException(InvalidArgumentException::class); new LoggerWrapper($source); } public static function invalidLoggerDataProvider(): array { return [ [new stdClass()], [true], [false], [[]], [1], ['test'], ]; } /** * @dataProvider validLoggerDataProvider */ public function testLog(string $level, string $message, array $context): void { $wrapped = new ArrayLogger(); $instance = new LoggerWrapper($wrapped); $instance->log($level, $message, $context); $expected = [$level, $message, $context]; self::assertEquals($expected, $wrapped->getLastLog()); $wrapped = new ArrayLogger(); $instance = new LoggerWrapper(function ($level, $message, $context) use ($wrapped): void { $wrapped->log($level, $message, $context); }); $instance->log($level, $message, $context); $expected = [$level, $message, $context]; self::assertEquals($expected, $wrapped->getLastLog()); } /** * @dataProvider validLoggerDataProvider */ public function testLogMethods(string $notUsed, string $message, array $context): void { $methodsMap = [ LogLevel::EMERGENCY => 'emergency', LogLevel::ALERT => 'alert', LogLevel::CRITICAL => 'critical', LogLevel::ERROR => 'error', LogLevel::WARNING => 'warning', LogLevel::NOTICE => 'notice', LogLevel::INFO => 'info', LogLevel::DEBUG => 'debug', ]; $wrapped = new ArrayLogger(); $instance = new LoggerWrapper($wrapped); foreach ($methodsMap as $level => $method) { $instance->{$method}($message, $context); $expected = [$level, $message, $context]; self::assertEquals($expected, $wrapped->getLastLog()); } } public static function validLoggerDataProvider(): array { return [ [LogLevel::EMERGENCY, Random::str(10, 20), [Random::str(10, 20)]], [LogLevel::ALERT, Random::str(10, 20), [Random::str(10, 20)]], [LogLevel::CRITICAL, Random::str(10, 20), [Random::str(10, 20)]], [LogLevel::ERROR, Random::str(10, 20), [Random::str(10, 20)]], [LogLevel::WARNING, Random::str(10, 20), [Random::str(10, 20)]], [LogLevel::NOTICE, Random::str(10, 20), [Random::str(10, 20)]], [LogLevel::INFO, Random::str(10, 20), [Random::str(10, 20)]], [LogLevel::DEBUG, Random::str(10, 20), [Random::str(10, 20)]], ]; } } class ArrayLogger implements LoggerInterface { private array $lastLog; public function log($level, $message, array $context = []): void { $this->lastLog = [$level, $message, $context]; } public function getLastLog(): array { return $this->lastLog; } public function emergency($message, array $context = []): void { $this->log(LogLevel::EMERGENCY, $message, $context); } public function alert($message, array $context = []): void { $this->log(LogLevel::ALERT, $message, $context); } public function critical($message, array $context = []): void { $this->log(LogLevel::CRITICAL, $message, $context); } public function error($message, array $context = []): void { $this->log(LogLevel::ERROR, $message, $context); } public function warning($message, array $context = []): void { $this->log(LogLevel::WARNING, $message, $context); } public function notice($message, array $context = []): void { $this->log(LogLevel::NOTICE, $message, $context); } public function info($message, array $context = []): void { $this->log(LogLevel::INFO, $message, $context); } public function debug($message, array $context = []): void { $this->log(LogLevel::DEBUG, $message, $context); } } yookassa-sdk-php/docs/reports/markers.md000064400000000706150364342670014372 0ustar00# [YooKassa API SDK](../home.md) # Markers **No markers have been found in this project.** --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/reports/deprecated.md000064400000014410150364342670015023 0ustar00# [YooKassa API SDK](../home.md) # Deprecated Elements ### Table of Contents * [lib/Model/Payment/CancellationDetailsPartyCode.php](../../lib/Model/Payment/CancellationDetailsPartyCode.php) * [lib/Model/Payment/ConfirmationType.php](../../lib/Model/Payment/ConfirmationType.php) * [lib/Model/Payment/PaymentMethod/PaymentMethodAlfaBank.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodAlfaBank.php) * [lib/Model/Payment/PaymentMethod/PaymentMethodFactory.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodFactory.php) * [lib/Model/Payment/PaymentMethod/PaymentMethodPsb.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodPsb.php) * [lib/Model/Payment/PaymentMethod/PaymentMethodUnknown.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodUnknown.php) * [lib/Model/Payment/PaymentMethod/PaymentMethodWebmoney.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodWebmoney.php) * [lib/Model/Payment/PaymentMethod/PaymentMethodWechat.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodWechat.php) * [lib/Model/Payment/PaymentMethodType.php](../../lib/Model/Payment/PaymentMethodType.php) * [lib/Model/Refund/RefundCancellationDetailsPartyCode.php](../../lib/Model/Refund/RefundCancellationDetailsPartyCode.php) * [lib/Request/Payments/PaymentData/PaymentDataAlfabank.php](../../lib/Request/Payments/PaymentData/PaymentDataAlfabank.php) #### [lib/Model/Payment/CancellationDetailsPartyCode.php](../../lib/Model/Payment/CancellationDetailsPartyCode.php) | Line | Element | Description | | ---- | ------- | ----------- | | 56 | \YooKassa\Model\Payment\CancellationDetailsPartyCode::YANDEX_CHECKOUT | Устарел. Оставлен для обратной совместимости | #### [lib/Model/Payment/ConfirmationType.php](../../lib/Model/Payment/ConfirmationType.php) | Line | Element | Description | | ---- | ------- | ----------- | | 62 | \YooKassa\Model\Payment\ConfirmationType::CODE_VERIFICATION | Будет удален в следующих версиях | #### [lib/Model/Payment/PaymentMethod/PaymentMethodAlfaBank.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodAlfaBank.php) | Line | Element | Description | | ---- | ------- | ----------- | | 45 | \YooKassa\Model\Payment\PaymentMethod\PaymentMethodAlfaBank | Будет удален в следующих версиях | #### [lib/Model/Payment/PaymentMethod/PaymentMethodFactory.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodFactory.php) | Line | Element | Description | | ---- | ------- | ----------- | | 45 | \YooKassa\Model\Payment\PaymentMethod\PaymentMethodFactory::YANDEX_MONEY | Для поддержки старых платежей | #### [lib/Model/Payment/PaymentMethod/PaymentMethodPsb.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodPsb.php) | Line | Element | Description | | ---- | ------- | ----------- | | 42 | \YooKassa\Model\Payment\PaymentMethod\PaymentMethodPsb | Будет удален в следующих версиях | #### [lib/Model/Payment/PaymentMethod/PaymentMethodUnknown.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodUnknown.php) | Line | Element | Description | | ---- | ------- | ----------- | | 42 | \YooKassa\Model\Payment\PaymentMethod\PaymentMethodUnknown | Не используется в реальных платежах | #### [lib/Model/Payment/PaymentMethod/PaymentMethodWebmoney.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodWebmoney.php) | Line | Element | Description | | ---- | ------- | ----------- | | 42 | \YooKassa\Model\Payment\PaymentMethod\PaymentMethodWebmoney | Будет удален в следующих версиях | #### [lib/Model/Payment/PaymentMethod/PaymentMethodWechat.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodWechat.php) | Line | Element | Description | | ---- | ------- | ----------- | | 42 | \YooKassa\Model\Payment\PaymentMethod\PaymentMethodWechat | Будет удален в следующих версиях | #### [lib/Model/Payment/PaymentMethodType.php](../../lib/Model/Payment/PaymentMethodType.php) | Line | Element | Description | | ---- | ------- | ----------- | | 90 | \YooKassa\Model\Payment\PaymentMethodType::WEBMONEY | Больше недоступен | | 97 | \YooKassa\Model\Payment\PaymentMethodType::ALFABANK | Больше недоступен | | 110 | \YooKassa\Model\Payment\PaymentMethodType::PSB | Больше недоступен | | 120 | \YooKassa\Model\Payment\PaymentMethodType::WECHAT | Больше недоступен | | 133 | \YooKassa\Model\Payment\PaymentMethodType::UNKNOWN | Не используется для реальных платежей | #### [lib/Model/Refund/RefundCancellationDetailsPartyCode.php](../../lib/Model/Refund/RefundCancellationDetailsPartyCode.php) | Line | Element | Description | | ---- | ------- | ----------- | | 51 | \YooKassa\Model\Refund\RefundCancellationDetailsPartyCode::YANDEX_CHECKOUT | Устарел. Оставлен для обратной совместимости | #### [lib/Request/Payments/PaymentData/PaymentDataAlfabank.php](../../lib/Request/Payments/PaymentData/PaymentDataAlfabank.php) | Line | Element | Description | | ---- | ------- | ----------- | | 46 | \YooKassa\Request\Payments\PaymentData\PaymentDataAlfabank | Будет удален в следующих версиях | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/reports/errors.md000064400000000720150364342670014236 0ustar00# [YooKassa API SDK](../home.md) # Compilation Errors **No errors have been found in this project.** --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/readme.md000064400000004721150364342670012466 0ustar00# [YooKassa API SDK](home.md) # Namespace: \ ### Namespaces * [\YooKassa](namespaces/yookassa.md) ### Constants ###### YOOKASSA_SDK_PSR_LOG_PATH ```php YOOKASSA_SDK_PSR_LOG_PATH = __DIR__ . '/../vendor/psr/log/Psr/Log' ``` | Tag | Version | Desc | | --- | ------- | ---- | | package | | | ###### YOOKASSA_SDK_ROOT_PATH The MIT License. ```php YOOKASSA_SDK_ROOT_PATH = __DIR__ ``` Copyright (c) 2023 "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. | Tag | Version | Desc | | --- | ------- | ---- | | package | | | ### Functions #### yookassaSdkLoadClass() : void ```php yookassaSdkLoadClass(mixed $className) : void ``` **Details:** * File: [lib/autoload.php](files/lib-autoload.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | className | | **Returns:** void - ##### Tags | Tag | Version | Description | | --- | ------- | ----------- | | package | | | --- ### Top Namespaces * [\YooKassa](namespaces/yookassa.md) --- ### Reports * [Errors - 0](reports/errors.md) * [Markers - 0](reports/markers.md) * [Deprecated - 15](reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/examples/06-payouts.md000064400000021276150364342670015002 0ustar00## Работа с выплатами Выплата — это сумма денег, которую вы переводите физическому лицу или самозанятому. С помощью API вы можете создать выплату и получить о ней актуальную информацию. Выплаты используются в следующих платежных решениях ЮKassa: * Выплаты — вы как компания переводите деньги физическим лицам и самозанятым (например, выплачиваете кэшбэк пользователям). * Безопасная сделка — ваша платформа в рамках созданной сделки переводит оплату от одного физического лица другому. SDK позволяет проводить выплаты, а также получать информацию о них. Объект выплаты `PayoutResponse` содержит всю информацию о выплате, актуальную на текущий момент времени. Объект формируется при создании выплаты и приходит в ответ на любой запрос, связанный с выплатами. Набор возвращаемых параметров зависит от статуса объекта (значение параметра status) и того, какие параметры вы передали в запросе на создание выплаты. * [Запрос на выплату продавцу](#Запрос-на-выплату-продавцу) * [Проведение выплаты на банковскую карту](#Проведение-выплаты-на-банковскую-карту) * [Проведение выплаты в кошелек ЮMoney](#Проведение-выплаты-в-кошелек-юmoney) * [Проведение выплаты через СБП](#Проведение-выплаты-через-сбп) * [Выплаты самозанятым](#Выплаты-самозанятым) * [Проведение выплаты по безопасной сделке](#Проведение-выплаты-по-безопасной-сделке) * [Получить информацию о выплате](#Получить-информацию-о-выплате) --- ### Запрос на выплату продавцу [Выплата продавцу в документации](https://yookassa.ru/developers/api?lang=php#create_payout) Запрос позволяет перечислить продавцу оплату за выполненную услугу или проданный товар в рамках «Безопасной сделки». Выплату можно сделать на банковскую карту или в кошелек ЮMoney. В ответ на запрос придет объект выплаты — `PayoutResponse` — в актуальном статусе. [Подробнее о проведении выплат](https://yookassa.ru/developers/solutions-for-platforms/safe-deal/integration/payouts) #### Проведение выплаты на банковскую карту ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $request = [ 'amount' => [ 'value' => '80.00', 'currency' => 'RUB', ], 'payout_destination_data' => [ 'type' => 'bank_card', 'card' => [ 'number' => '5555555555554477', ], ], 'description' => 'Выплата по заказу №37', 'metadata' => [ 'order_id' => '37', ], ]; $idempotenceKey = uniqid('', true); try { $result = $client->createPayout($request, $idempotenceKey); } catch (\Exception $e) { $result = $e; } var_dump($result); ``` #### Проведение выплаты в кошелек ЮMoney ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $request = [ 'amount' => [ 'value' => '80.00', 'currency' => 'RUB', ], 'payout_destination_data' => [ 'type' => 'yoo_money', 'account_number' => '4100116075156746', ], 'description' => 'Выплата по заказу №37', 'metadata' => [ 'order_id' => '37', ], ]; $idempotenceKey = uniqid('', true); try { $result = $client->createPayout($request, $idempotenceKey); } catch (\Exception $e) { $result = $e; } var_dump($result); ``` #### Проведение выплаты через СБП ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $request = [ 'amount' => [ 'value' => '80.00', 'currency' => 'RUB', ], 'payout_destination_data' => [ 'type' => 'sbp', 'phone' => '79000000000', 'bank_id' => '100000000111', ], 'description' => 'Выплата по заказу №37', 'metadata' => [ 'order_id' => '37', ], ]; $idempotenceKey = uniqid('', true); try { $result = $client->createPayout($request, $idempotenceKey); } catch (\Exception $e) { $result = $e; } var_dump($result); ``` #### Выплаты самозанятым ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $request = [ 'amount' => [ 'value' => '80.00', 'currency' => 'RUB', ], 'payout_token' => '<Синоним банковской карты>', 'self_employed' => [ 'id' => 'se-d6b9b3fa-0cb8-4aa8-b3c0-254bf0358d4c', ], 'receipt_data' => [ 'service_name' => 'Доставка документов' ], 'description' => 'Выплата по заказу №37', 'metadata' => [ 'order_id' => '37', 'courier_id' => '001', ], ]; $idempotenceKey = uniqid('', true); try { $result = $client->createPayout($request, $idempotenceKey); } catch (\Exception $e) { $result = $e; } var_dump($result); ``` #### Проведение выплаты по безопасной сделке ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $request = [ 'amount' => [ 'value' => '800.00', 'currency' => 'RUB', ], 'payout_token' => '<Синоним банковской карты>', 'description' => 'Выплата по заказу №37', 'metadata' => [ 'order_id' => '37' ], 'deal' => [ 'id' => 'dl-285e5ee7-0022-5000-8000-01516a44b147', ], ]; $idempotenceKey = uniqid('', true); try { $result = $client->createPayout($request, $idempotenceKey); } catch (\Exception $e) { $result = $e; } var_dump($result); ``` --- ### Получить информацию о выплате [Информация о выплате в документации](https://yookassa.ru/developers/api?lang=php#get_payout) Запрос позволяет получить информацию о текущем состоянии выплаты по ее уникальному идентификатору. [Данные для аутентификации запросов](https://yookassa.ru/developers/using-api/interaction-format#auth) зависят от того, какое платежное решение вы используете — [обычные выплаты](https://yookassa.ru/developers/payouts/overview) или выплаты в рамках «[Безопасной сделки](https://yookassa.ru/developers/solutions-for-platforms/safe-deal/basics)». В ответ на запрос придет объект выплаты — `PayoutResponse` — в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $payoutId = 'po-285c0ab7-0003-5000-9000-0e1166498fda'; try { $response = $client->getPayoutInfo($payoutId); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` yookassa-sdk-php/docs/examples/readme.md000064400000013615150364342670014306 0ustar00## Примеры использования SDK #### [Что нового в SDK версии 3.x](migration-3x.md) #### [Настройки SDK API ЮKassa](01-configuration.md) * [Установка дополнительных настроек для Curl](01-configuration.md#Установка-дополнительных-настроек-для-Curl) * [Аутентификация](01-configuration.md#Аутентификация) * [Статистические данные об используемом окружении](01-configuration.md#Статистические-данные-об-используемом-окружении) * [Получение информации о магазине](01-configuration.md#Получение-информации-о-магазине) * [Работа с Webhook](01-configuration.md#Работа-с-Webhook) * [Входящие уведомления](01-configuration.md#Входящие-уведомления) #### [Работа с платежами](02-payments.md) * [Запрос на создание платежа](02-payments.md#Запрос-на-создание-платежа) * [Запрос на создание платежа через билдер](02-payments.md#Запрос-на-создание-платежа-через-билдер) * [Запрос на частичное подтверждение платежа](02-payments.md#Запрос-на-частичное-подтверждение-платежа) * [Запрос на отмену незавершенного платежа](02-payments.md#Запрос-на-отмену-незавершенного-платежа) * [Получить информацию о платеже](02-payments.md#Получить-информацию-о-платеже) * [Получить список платежей с фильтрацией](02-payments.md#Получить-список-платежей-с-фильтрацией) #### [Работа с возвратами](03-refunds.md) * [Запрос на создание возврата](03-refunds.md#Запрос-на-создание-возврата) * [Запрос на создание возврата через билдер](03-refunds.md#Запрос-на-создание-возврата-через-билдер) * [Получить информацию о возврате](03-refunds.md#Получить-информацию-о-возврате) * [Получить список возвратов с фильтрацией](03-refunds.md#Получить-список-возвратов-с-фильтрацией) #### [Работа с чеками](04-receipts.md) * [Запрос на создание чека](04-receipts.md#Запрос-на-создание-чека) * [Запрос на создание чека через билдер](04-receipts.md#Запрос-на-создание-чека-через-билдер) * [Получить информацию о чеке](04-receipts.md#Получить-информацию-о-чеке) * [Получить список чеков с фильтрацией](04-receipts.md#Получить-список-чеков-с-фильтрацией) #### [Работа со сделками](05-deals.md) * [Запрос на создание сделки](05-deals.md#Запрос-на-создание-сделки) * [Запрос на создание сделки через билдер](05-deals.md#Запрос-на-создание-сделки-через-билдер) * [Запрос на создание платежа с привязкой к сделке](05-deals.md#Запрос-на-создание-платежа-с-привязкой-к-сделке) * [Получить информацию о сделке](05-deals.md#Получить-информацию-о-сделке) * [Получить список сделок с фильтрацией](05-deals.md#Получить-список-сделок-с-фильтрацией) ### [Работа с выплатами](06-payouts.md) * [Запрос на выплату продавцу](06-payouts.md#Запрос-на-выплату-продавцу) * [Проведение выплаты на банковскую карту](06-payouts.md#Проведение-выплаты-на-банковскую-карту) * [Проведение выплаты в кошелек ЮMoney](06-payouts.md#Проведение-выплаты-в-кошелек-юmoney) * [Проведение выплаты через СБП](06-payouts.md#Проведение-выплаты-через-сбп) * [Выплаты самозанятым](06-payouts.md#Выплаты-самозанятым) * [Проведение выплаты по безопасной сделке](06-payouts.md#Проведение-выплаты-по-безопасной-сделке) * [Получить информацию о выплате](06-payouts.md#Получить-информацию-о-выплате) ### [Работа с самозанятыми](07-self-employed.md) * [Запрос на создание самозанятого](07-self-employed.md#Запрос-на-создание-самозанятого) * [Получить информацию о самозанятом](07-self-employed.md#Получить-информацию-о-самозанятом) ### [Работа с персональными данными](08-personal-data.md) * [Создание персональных данных](08-personal-data.md#Создание-персональных-данных) * [Получить информацию о персональных данных](08-personal-data.md#Получить-информацию-о-персональных-данных) #### [Работа со списком участников СБП](09-sbp-banks.md) * [Получить список участников СБП](09-sbp-banks.md#Получить-список-участников-СБП) yookassa-sdk-php/docs/examples/08-personal-data.md000064400000010126150364342670016022 0ustar00## Работа с персональными данными Персональные данные пользователя — это фамилия, имя, отчество пользователя и другие данные о нём. Персональные данные пользователя нужны для проведения выплат через СБП с проверкой получателя. [Как делать выплаты с проверкой получателя](https://yookassa.ru/developers/payouts/scenario-extensions/recipient-check) SDK позволяет создавать персональные данные пользователя, а также получать о них информацию. Объект персональных данных `PersonalData` содержит актуальную информацию о персональных данных пользователя, сохраненных в ЮKassa. Объект формируется при создании персональных данных и приходит в ответ на любой запрос, связанный с персональными данными пользователя. Набор возвращаемых параметров зависит от статуса объекта (значение параметра `status`) и того, какие параметры вы передали в запросе на создание персональных данных. * [Создание персональных данных](#Создание-персональных-данных) * [Получить информацию о персональных данных](#Получить-информацию-о-персональных-данных) --- ### Создание персональных данных Запрос позволяет создать в ЮKassa объект персональных данных. В запросе необходимо передать фамилию, имя, отчество пользователя и указать, с какой целью эти данные будут использоваться. Идентификатор созданного объекта персональных данных необходимо использовать в запросе на проведение выплаты через СБП с проверкой получателя. В ответ на запрос придет объект персональных данных — `PersonalDataResponse` — в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $request = [ 'type' => 'sbp_payout_recipient', 'last_name' => 'Иванов', 'first_name' => 'Иван', 'middle_name' => 'Иванович', 'metadata' => [ 'email' => 'i.ivanov@ivan.name', ], ]; $idempotenceKey = uniqid('', true); try { $result = $client->createPersonalData($request, $idempotenceKey); } catch (\Exception $e) { $result = $e; } var_dump($result); ``` --- ### Получить информацию о персональных данных С помощью этого запроса вы можете получить информацию о текущем статусе объекта персональных данных по его уникальному идентификатору. В ответ на запрос придет объект персональных данных — `PersonalDataResponse` — в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $personalDataId = 'pd-285c0ab7-0003-5000-9000-0e1166498fda'; try { $response = $client->getPersonalDataInfo($personalDataId); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` yookassa-sdk-php/docs/examples/05-deals.md000064400000032422150364342670014360 0ustar00## Работа со сделками SDK позволяет создавать безопасные сделки, проводить по ним платежи и выплаты, а также получать о них информацию. Объект сделки `DealResponse` содержит всю информацию о сделке, актуальную на текущий момент времени. Объект формируется при создании сделки и приходит в ответ на любой запрос, связанный со сделками. * [Запрос на создание сделки](#Запрос-на-создание-сделки) * [Запрос на создание сделки через билдер](#Запрос-на-создание-сделки-через-билдер) * [Запрос на создание платежа с привязкой к сделке](#Запрос-на-создание-платежа-с-привязкой-к-сделке) * [Запрос на выплату продавцу](#Запрос-на-выплату-продавцу) * [Получить информацию о сделке](#Получить-информацию-о-сделке) * [Получить список сделок с фильтрацией](#Получить-список-сделок-с-фильтрацией) * [Получить информацию о выплате](#Получить-информацию-о-выплате) --- ### Запрос на создание сделки [Создание сделки в документации](https://yookassa.ru/developers/api?lang=php#create_deal) Запрос `CreateDealRequest` позволяет создать сделку, в рамках которой необходимо принять оплату от покупателя и перечислить ее продавцу. В ответ на запрос придет объект сделки — `DealResponse` — в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); try { $response = $client->createDeal( [ 'type' => \YooKassa\Model\Deal\DealType::SAFE_DEAL, 'fee_moment' => \YooKassa\Model\Deal\FeeMoment::PAYMENT_SUCCEEDED, 'metadata' => [ 'order_id' => '37', ], 'description' => 'SAFE_DEAL 123554642-2432FF344R', ], uniqid('', true) ); echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } if (!empty($response)) { print_r($response); } ``` --- ### Запрос на создание платежа через билдер [Создание платежа в документации](https://yookassa.ru/developers/api?lang=php#create_payment) Билдер позволяет создать объект платежа — `CreateDealRequest` — программным способом, через объекты. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); try { try { $builder = \YooKassa\Request\Deals\CreateDealRequest::builder(); $builder->setType(\YooKassa\Model\Deal\DealType::SAFE_DEAL) ->setFeeMoment(\YooKassa\Model\Deal\FeeMoment::PAYMENT_SUCCEEDED) ->setMetadata([ 'order_id' => '37', ]) ->setDescription('SAFE_DEAL 123554642-2432FF344R'); // Создаем объект запроса $request = $builder->build(); // Можно изменить данные, если нужно $request->setDescription($request->getDescription() . ' - merchant comment'); $idempotenceKey = uniqid('', true); $response = $client->createDeal($request, $idempotenceKey); // Получаем данные объекта echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` --- ### Запрос на создание платежа с привязкой к сделке [Создание платежа в документации](https://yookassa.ru/developers/api?lang=php#create_payment) Чтобы принять оплату от покупателя, отправьте ЮKassa запрос на создание платежа, передайте в нём данные, которые нужны для оплаты, в зависимости от выбранного сценария интеграции, и следующие данные для проведения платежа в рамках сделки: * Объект `amount` с общей суммой платежа за сделку (сумма вознаграждения продавца и вознаграждения вашей платформы). Эту сумму ЮKassa спишет с покупателя. Комиссия ЮKassa за проведение платежа рассчитывается из этой суммы, а взимается из вашего вознаграждения. Сумма платежа должна соответствовать ограничениям на минимальный и максимальный размер платежа. [Подробнее о лимитах платежей](https://yookassa.ru/docs/support/payments/limits) * Объект `deal` с данными о сделке: идентификатор сделки и массив settlements с данными о том, какую сумму нужно выплатить продавцу. Разница между суммой платежа и суммой выплаты должна быть больше эквайринговой комиссии ЮKassa. Сумма выплаты должна соответствовать ограничениям на минимальный и максимальный размер выплаты. [Подробнее о лимитах выплат](https://yookassa.ru/developers/solutions-for-platforms/safe-deal/integration/payouts#specifics) В ответ на запрос придет объект платежа — `PaymentResponse` — в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $paymentId = '21b23b5b-000f-5061-a000-0674e49a8c10'; $request = [ 'amount' => [ 'value' => '100.00', 'currency' => 'RUB', ], 'confirmation' => [ 'type' => 'redirect', 'locale' => 'ru_RU', 'return_url' => 'https://testna5.ru/', ], 'description' => 'Оплата заказа на сумму 100 руб', 'metadata' => [ 'order_id' => '37' ], 'capture' => true, 'deal' => [ 'id' => 'dl-2909e77d-0022-5000-8000-0c37205b3208', 'settlements' => [ [ 'type' => 'payout', 'amount' => [ 'value' => '80.00', 'currency' => 'RUB', ] ], ], ], 'merchant_customer_id' => 'merchant@shop.com' ]; $idempotenceKey = uniqid('', true); try { $result = $client->createPayment($request, $idempotenceKey); } catch (\Exception $e) { $result = $e; } var_dump($result); ``` [Подробнее о приеме оплаты от покупателя](https://yookassa.ru/developers/solutions-for-platforms/safe-deal/integration/payments) --- ### Запрос на выплату продавцу [Выплата продавцу в документации](https://yookassa.ru/developers/api?lang=php#create_payout) Запрос позволяет перечислить продавцу оплату за выполненную услугу или проданный товар в рамках «Безопасной сделки». Выплату можно сделать на банковскую карту или в кошелек ЮMoney. В ответ на запрос придет объект выплаты — `PayoutResponse` — в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $request = [ 'amount' => [ 'value' => '80.00', 'currency' => 'RUB', ], 'payout_destination_data' => [ 'type' => \YooKassa\Model\Payout\PayoutDestinationType::YOO_MONEY, 'accountNumber' => '4100116075156746', ], 'description' => 'Выплата по заказу №37', 'metadata' => [ 'order_id' => '37' ], 'deal' => [ 'id' => 'dl-2909e77d-0022-5000-8000-0c37205b3208', ], ]; $idempotenceKey = uniqid('', true); try { $result = $client->createPayout($request, $idempotenceKey); } catch (\Exception $e) { $result = $e; } var_dump($result); ``` [Подробнее о проведении выплат](https://yookassa.ru/developers/solutions-for-platforms/safe-deal/integration/payouts) --- ### Получить информацию о сделке [Информация о сделке в документации](https://yookassa.ru/developers/api?lang=php#get_deal) Запрос позволяет получить информацию о текущем состоянии сделки по ее уникальному идентификатору. В ответ на запрос придет объект сделки — `DealResponse` — в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $dealId = 'dl-215d8da0-000f-50be-b000-0003308c89be'; try { $response = $client->getDealInfo($dealId); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` --- ### Получить список сделок с фильтрацией [Список платежей в документации](https://yookassa.ru/developers/api?lang=php#get_deals_list) Запрос позволяет получить список сделок, отфильтрованный по заданным критериям. В ответ на запрос вернется список сделок с учетом переданных параметров. В списке будет информация о сделках, созданных за последние 3 года. Список будет отсортирован по времени создания сделок в порядке убывания. Если результатов больше, чем задано в `limit`, список будет выводиться фрагментами. В этом случае в ответе на запрос вернется фрагмент списка и параметр `next_cursor` с указателем на следующий фрагмент. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $cursor = null; $params = [ 'limit' => 30, 'status' => \YooKassa\Model\Deal\DealStatus::OPENED, 'full_text_search' => 'DEAL', 'created_at_gte' => '2021-10-01T00:00:00.000Z', 'created_at_lt' => '2021-11-01T23:59:59.999Z', ]; try { do { $params['cursor'] = $cursor; $deals = $client->getDeals($params); foreach ($deals->getItems() as $deal) { $res = [ $deal->getCreatedAt()->format('Y-m-d H:i:s'), $deal->getBalance()->getValue() . ' ' . $deal->getBalance()->getCurrency(), $deal->getPayoutBalance()->getValue() . ' ' . $deal->getBalance()->getCurrency(), $deal->getStatus(), $deal->getId(), ]; echo implode(' - ', $res) . "\n"; } } while ($cursor = $deals->getNextCursor()); } catch (\Exception $e) { $response = $e; var_dump($response); } ``` [Подробнее о работе со списками](https://yookassa.ru/developers/using-api/lists) --- ### Получить информацию о выплате [Информация о выплате в документации](https://yookassa.ru/developers/api?lang=php#get_payout) Запрос позволяет получить информацию о текущем состоянии выплаты по ее уникальному идентификатору. В ответ на запрос придет объект выплаты — `PayoutResponse` — в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $payoutId = 'po-285c0ab7-0003-5000-9000-0e1166498fda'; try { $response = $client->getPayoutInfo($payoutId); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` yookassa-sdk-php/docs/examples/migration-3x.md000064400000053754150364342670015402 0ustar00## Что нового в SDK версии 3.x * Новая версия SDK не поддерживает PHP ниже 8.0. * Произошли изменения в моделях: * Добавлены атрибуты к свойствам. * Подготовка и валидация данных теперь осуществляется в базовом классе ```AbstractObject```. * Валидация реализована через собственную библиотеку ```yookassa-sdk-validator```. * Добавлена работа с коллекциями в свойствах с типом массив объектов. Интерфейс коллекции подразумевает, что в коллекции находятся объекты одного типа. Чтобы сменить тип объекта коллекции, необходимо сначала очистить коллекцию методом ```clear()```. Для добавления объекта в коллекцию необходимо вызвать метод ```add()```. Чтобы удалить объект по индексу, необходимо вызвать метод ```remove()```. * Добавлены анализаторы кода. * Классы распределены по папкам в соответствии с их назначением: | **Папка** | Модель/интерфейс | **Новый namespace** | **Старый namespace** | |------------------------------------|-----------------------------------------|---------------------------------------------------|-------------------------------------------| | Deal | BaseDeal | YooKassa\Model\Deal | YooKassa\Model | | | DealInterface | YooKassa\Model\Deal | YooKassa\Model | | | SafeDeal | YooKassa\Model\Deal | YooKassa\Model | | Notification | NotificationEventType | YooKassa\Model\Notification | YooKassa\Model | | | NotificationType | YooKassa\Model\Notification | YooKassa\Model | | Payment/Confirmation | AbstractConfirmation | YooKassa\Model\Payment\Confirmation | YooKassa\Model\Confirmation | | | ConfirmationCodeVerification | YooKassa\Model\Payment\Confirmation | YooKassa\Model\Confirmation | | | ConfirmationEmbedded | YooKassa\Model\Payment\Confirmation | YooKassa\Model\Confirmation | | | ConfirmationExternal | YooKassa\Model\Payment\Confirmation | YooKassa\Model\Confirmation | | | ConfirmationFactory | YooKassa\Model\Payment\Confirmation | YooKassa\Model\Confirmation | | | ConfirmationMobileApplication | YooKassa\Model\Payment\Confirmation | YooKassa\Model\Confirmation | | | ConfirmationQr | YooKassa\Model\Payment\Confirmation | YooKassa\Model\Confirmation | | | ConfirmationRedirect | YooKassa\Model\Payment\Confirmation | YooKassa\Model\Confirmation | | Payment/PaymentMethod/B2b/Sberbank | PayerBankDetails | YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank | YooKassa\Model\PaymentMethod\B2b\Sberbank | | | PayerBankDetailsInterface | YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank | YooKassa\Model\PaymentMethod\B2b\Sberbank | | | VatDataInterface | YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank | YooKassa\Model\PaymentMethod\B2b\Sberbank | | | VatDataInterface | YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank | YooKassa\Model\PaymentMethod\B2b\Sberbank | | | VatDataRate | YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank | YooKassa\Model\PaymentMethod\B2b\Sberbank | | | VatDataType | YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank | YooKassa\Model\PaymentMethod\B2b\Sberbank | | Payment/PaymentMethod/B2b | AbstractPaymentMethod | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | BankCard | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | BankCardSource | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodCardType | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodAlfaBank | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodApplePay | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodB2bSberbank | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodBankCard | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodCash | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodFactory | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodGooglePay | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodInstallments | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodMobileBalance | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodPsb | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodQiwi | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodSberbank | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodSbp | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodTinkoffBank | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodWebmoney | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodWechat | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | | PaymentMethodYooMoney | YooKassa\Model\Payment\PaymentMethod | YooKassa\Model\PaymentMethod | | Payment | AuthorizationDetailsInterface | YooKassa\Model\Payment | YooKassa\Model | | | CancellationDetails | YooKassa\Model\Payment | YooKassa\Model | | | CancellationDetailsPartyCode | YooKassa\Model\Payment | YooKassa\Model | | | CancellationDetailsReasonCode | YooKassa\Model\Payment | YooKassa\Model | | | ConfirmationType | YooKassa\Model\Payment | YooKassa\Model | | | Payment | YooKassa\Model\Payment | YooKassa\Model | | | PaymentInterface | YooKassa\Model\Payment | YooKassa\Model | | | PaymentMethodType | YooKassa\Model\Payment | YooKassa\Model | | | PaymentStatus | YooKassa\Model\Payment | YooKassa\Model | | | ReceiptRegistrationStatus | YooKassa\Model\Payment | YooKassa\Model | | | Recipient | YooKassa\Model\Payment | YooKassa\Model | | | RecipientInterface | YooKassa\Model\Payment | YooKassa\Model | | | ThreeDSecure | YooKassa\Model\Payment | YooKassa\Model | | | Transfer | YooKassa\Model\Payment | YooKassa\Model | | | TransferInterface | YooKassa\Model\Payment | YooKassa\Model | | | TransferStatus | YooKassa\Model\Payment | YooKassa\Model | | Payout | Payout | YooKassa\Model\Payout | YooKassa\Model | | | DealInterface | YooKassa\Model\Payout | YooKassa\Model | | | PayoutStatus | YooKassa\Model\Payout | YooKassa\Model | | Receipt | Receipt | YooKassa\Model\Receipt | YooKassa\Model | | | ReceiptCustomer | YooKassa\Model\Receipt | YooKassa\Model | | | ReceiptCustomerInterface | YooKassa\Model\Receipt | YooKassa\Model | | | ReceiptInterface | YooKassa\Model\Receipt | YooKassa\Model | | | ReceiptItem | YooKassa\Model\Receipt | YooKassa\Model | | | ReceiptItemInterface | YooKassa\Model\Receipt | YooKassa\Model | | | ReceiptType | YooKassa\Model\Receipt | YooKassa\Model | | | Settlement | YooKassa\Model\Receipt | YooKassa\Model | | | SettlementInterface | YooKassa\Model\Receipt | YooKassa\Model | | | Supplier | YooKassa\Model\Receipt | YooKassa\Model | | | SupplierInterface | YooKassa\Model\Receipt | YooKassa\Model | | Refund | Refund | YooKassa\Model\Refund | YooKassa\Model | | | RefundInterface | YooKassa\Model\Refund | YooKassa\Model | | | RefundStatus | YooKassa\Model\Refund | YooKassa\Model | | | Source | YooKassa\Model\Refund | YooKassa\Model | | | SourceInterface | YooKassa\Model\Refund | YooKassa\Model | | Payments/ConfirmationAttributes | AbstractConfirmationAttributes | YooKassa\Request\Payments\ConfirmationAttributes | YooKassa\Model\ConfirmationAttributes | | | ConfirmationAttributesCodeVerification | YooKassa\Request\Payments\ConfirmationAttributes | YooKassa\Model\ConfirmationAttributes | | | ConfirmationAttributesEmbedded | YooKassa\Request\Payments\ConfirmationAttributes | YooKassa\Model\ConfirmationAttributes | | | ConfirmationAttributesExternal | YooKassa\Request\Payments\ConfirmationAttributes | YooKassa\Model\ConfirmationAttributes | | | ConfirmationAttributesFactory | YooKassa\Request\Payments\ConfirmationAttributes | YooKassa\Model\ConfirmationAttributes | | | ConfirmationAttributesMobileApplication | YooKassa\Request\Payments\ConfirmationAttributes | YooKassa\Model\ConfirmationAttributes | | | ConfirmationAttributesQr | YooKassa\Request\Payments\ConfirmationAttributes | YooKassa\Model\ConfirmationAttributes | | | ConfirmationAttributesRedirect | YooKassa\Request\Payments\ConfirmationAttributes | YooKassa\Model\ConfirmationAttributes | | Payments/PaymentData | AbstractPaymentData | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataAlfabank | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataApplePay | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataB2BSberbank | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataBankCard | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataBankCardCard | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataCash | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataFactory | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataGooglePay | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataInstallments | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataMobileBalance | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataQiwi | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataSberbank | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataSbp | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataTinkoffBank | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataWebmoney | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataWechat | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | | PaymentDataYooMoney | YooKassa\Request\Payments\PaymentData | YooKassa\Model\PaymentData | | Payments | AbstractPaymentRequest | YooKassa\Request\Payments | YooKassa\Common | | | AbstractPaymentRequestBuilder | YooKassa\Request\Payments | YooKassa\Common | | | Airline | YooKassa\Request\Payments | YooKassa\Model | | | AirlineInterface | YooKassa\Request\Payments | YooKassa\Model | | | CancelResponse | YooKassa\Request\Payments | YooKassa\Request\Payments\Payment | | | CreateCaptureRequest | YooKassa\Request\Payments | YooKassa\Request\Payments\Payment | | | CreateCaptureRequestBuilder | YooKassa\Request\Payments | YooKassa\Request\Payments\Payment | | | CreateCaptureRequestInterface | YooKassa\Request\Payments | YooKassa\Request\Payments\Payment | | | CreateCaptureRequestSerializer | YooKassa\Request\Payments | YooKassa\Request\Payments\Payment | | | CreateCaptureResponse | YooKassa\Request\Payments | YooKassa\Request\Payments\Payment | | | FraudData | YooKassa\Request\Payments | YooKassa\Model | | | Leg | YooKassa\Request\Payments | YooKassa\Model | | | LegInterface | YooKassa\Request\Payments | YooKassa\Model | | | Locale | YooKassa\Request\Payments | YooKassa\Model | | | Passenger | YooKassa\Request\Payments | YooKassa\Model | | | PassengerInterface | YooKassa\Request\Payments | YooKassa\Model | yookassa-sdk-php/docs/examples/03-refunds.md000064400000017574150364342670014747 0ustar00## Работа с возвратами С помощью SDK можно возвращать платежи — полностью или частично. Порядок возврата зависит от способа оплаты (`payment_method`) исходного платежа. При оплате банковской картой деньги возвращаются на карту, которая была использована для проведения платежа. [Как проводить возвраты](https://yookassa.ru/developers/payments/refunds) Некоторые способы оплаты (например, наличные) не поддерживают возвраты. [Какие платежи можно вернуть](https://yookassa.ru/developers/payment-methods/overview#all) * [Запрос на создание возврата](#Запрос-на-создание-возврата) * [Запрос на создание возврата через билдер](#Запрос-на-создание-возврата-через-билдер) * [Получить информацию о возврате](#Получить-информацию-о-возврате) * [Получить список возвратов с фильтрацией](#Получить-список-возвратов-с-фильтрацией) --- ### Запрос на создание возврата [Создание возврата в документации](https://yookassa.ru/developers/api?lang=php#create_refund) Создает возврат успешного платежа на указанную сумму. Платеж можно вернуть только в течение трех лет с момента его создания. Комиссия ЮKassa за проведение платежа не возвращается. В ответ на запрос придет объект возврата — `RefundResponse` — в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); try { $response = $client->createRefund( [ 'payment_id' => '24e89cb0-000f-5000-9000-1de77fa0d6df', 'amount' => [ 'value' => '1000.00', 'currency' => \YooKassa\Model\CurrencyCode::RUB, ], 'sources' => [ [ 'account_id' => '456', 'amount' => [ 'value' => '1000.00', 'currency' => \YooKassa\Model\CurrencyCode::RUB, ] ], ], ], uniqid('', true) ); echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` --- ### Запрос на создание возврата через билдер [Информация о создании возврата в документации](https://yookassa.ru/developers/api?lang=php#create_refund) Билдер позволяет создать объект возврата — `CreateRefundRequest` — программным способом, через объекты. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); try { $refundBuilder = \YooKassa\Request\Refunds\CreateRefundRequest::builder(); $refundBuilder ->setPaymentId('24b94598-000f-5000-9000-1b68e7b15f3f') ->setAmount(3500.00) ->setCurrency(\YooKassa\Model\CurrencyCode::RUB) ->setDescription('Не подошел цвет') ->setReceiptItems([ [ 'description' => 'Платок Gucci', 'quantity' => '1.00', 'amount' => [ 'value' => '3000.00', 'currency' => \YooKassa\Model\CurrencyCode::RUB, ], 'vat_code' => 2, 'payment_mode' => 'full_payment', 'payment_subject' => 'commodity', ], ]) ->setReceiptEmail('john.doe@merchant.com') ->setTaxSystemCode(1); // Создаем объект запроса $request = $refundBuilder->build(); // Можно изменить данные, если нужно $request->setDescription('Не подошел цвет и размер'); $idempotenceKey = uniqid('', true); $response = $client->createRefund($request, $idempotenceKey); } catch (Exception $e) { $response = $e; } ``` --- ### Получить информацию о возврате [Информация о возврате в документации](https://yookassa.ru/developers/api?lang=php#get_refund) Запрос позволяет получить информацию о текущем состоянии возврата по его уникальному идентификатору. В ответ на запрос придет объект возврата — `RefundResponse` — в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); try { $response = $client->getRefundInfo('216749f7-0016-50be-b000-078d43a63ae4'); echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` --- ### Получить список возвратов с фильтрацией [Список возвратов в документации](https://yookassa.ru/developers/api?lang=php#get_refunds_list) Запрос позволяет получить список возвратов, отфильтрованный по заданным критериям. В ответ на запрос вернется список возвратов с учетом переданных параметров. В списке будет информация о возвратах, созданных за последние 3 года. Список будет отсортирован по времени создания возвратов в порядке убывания. Если результатов больше, чем задано в `limit`, список будет выводиться фрагментами. В этом случае в ответе на запрос вернется фрагмент списка и параметр `next_cursor` с указателем на следующий фрагмент. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $cursor = null; $params = [ 'limit' => 30, 'status' => \YooKassa\Model\Refund\RefundStatus::SUCCEEDED, 'payment_id' => '1da5c87d-0984-50e8-a7f3-8de646dd9ec9', 'created_at_gte' => '2021-01-01T00:00:00.000Z', 'created_at_lt' => '2021-03-30T23:59:59.999Z', ]; try { do { $params['cursor'] = $cursor; $refunds = $client->getRefunds($params); foreach ($refunds->getItems() as $refund) { echo $refund->getCreatedAt()->format('Y-m-d H:i:s') . ' - ' . $refund->getStatus() . ' - ' . $refund->getId() . "\n"; } } while ($cursor = $refunds->getNextCursor()); } catch (\Exception $e) { $response = $e; var_dump($response); } ``` [Подробнее о работе со списками](https://yookassa.ru/developers/using-api/lists) yookassa-sdk-php/docs/examples/04-receipts.md000064400000021066150364342670015107 0ustar00## Работа с чеками > Для тех, кто использует [решение ЮKassa для 54-ФЗ](https://yookassa.ru/developers/54fz/basics) С помощью SDK можно получать информацию о чеках, для которых вы отправили данные через ЮKassa. * [Запрос на создание чека](#Запрос-на-создание-чека) * [Запрос на создание чека через билдер](#Запрос-на-создание-чека-через-билдер) * [Получить информацию о чеке](#Получить-информацию-о-чеке) * [Получить список чеков с фильтрацией](#Получить-список-чеков-с-фильтрацией) --- ### Запрос на создание чека [Информация о создании чека в документации](https://yookassa.ru/developers/api?lang=php#create_receipt) Запрос позволяет передать онлайн-кассе данные для формирования [чека зачета предоплаты](https://yookassa.ru/developers/54fz/payments#settlement-receipt) Если вы работаете по сценарию «[сначала платеж, потом чек](https://yookassa.ru/developers/54fz/basics#receipt-after-payment)», в запросе также нужно передавать данные для формирования чека прихода и чека возврата прихода. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); try { $response = $client->createReceipt( [ 'customer' => [ 'email' => 'johndoe@yoomoney.ru', 'phone' => '79000000000', ], 'type' => 'payment', 'payment_id' => '24e89cb0-000f-5000-9000-1de77fa0d6df', 'on_behalf_of' => '123', 'send' => true, 'items' => [ [ 'description' => 'Платок Gucci', 'quantity' => '1.00', 'amount' => [ 'value' => '3000.00', 'currency' => \YooKassa\Model\CurrencyCode::RUB, ], 'vat_code' => 2, 'payment_mode' => \YooKassa\Model\Receipt\PaymentMode::FULL_PAYMENT, 'payment_subject' => \YooKassa\Model\Receipt\PaymentSubject::COMMODITY, ], ], 'tax_system_code' => 1, ], uniqid('', true) ); echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` --- ### Запрос на создание чека через билдер [Информация о создании чека в документации](https://yookassa.ru/developers/api?lang=php#create_receipt) Билдер позволяет создать объект платежа — `ReceiptRequest` — программным способом, через объекты. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); try { $inputDataMatrix = '010463003407001221SxMGorvNuq6Wk91fgr92sdfsdfghfgjh'; $receiptBuilder = \YooKassa\Request\Receipts\CreatePostReceiptRequest::builder(); $receiptBuilder->setType(\YooKassa\Model\Receipt\ReceiptType::PAYMENT) ->setObjectId('24b94598-000f-5000-9000-1b68e7b15f3f', \YooKassa\Model\Receipt\ReceiptType::PAYMENT) // payment_id ->setCustomer([ 'email' => 'john.doe@merchant.com', 'phone' => '71111111111', ]) ->setItems([ [ 'description' => 'Платок Gucci', 'quantity' => '1.00', 'amount' => [ 'value' => '3000.00', 'currency' => 'RUB', ], 'vat_code' => 2, 'payment_mode' => \YooKassa\Model\Receipt\PaymentMode::FULL_PAYMENT, 'payment_subject' => \YooKassa\Model\Receipt\PaymentSubject::COMMODITY, 'product_code' => (string)(new \YooKassa\Helpers\ProductCode($inputDataMatrix)), ], ]) ->setSettlements([ [ 'type' => 'prepayment', 'amount' => [ 'value' => 100.00, 'currency' => 'RUB', ], ], ]) ->setSend(true); // Создаем объект запроса $request = $receiptBuilder->build(); // Можно изменить данные, если нужно $request->setOnBehalfOf('159753'); $request->addItem(new \YooKassa\Model\Receipt\ReceiptItem([ 'description' => 'Платок Gucci Новый', 'quantity' => '1.00', 'amount' => [ 'value' => '3500.00', 'currency' => 'RUB', ], 'vat_code' => 2, 'payment_mode' => \YooKassa\Model\Receipt\PaymentMode::FULL_PAYMENT, 'payment_subject' => \YooKassa\Model\Receipt\PaymentSubject::COMMODITY, ])); $idempotenceKey = uniqid('', true); $response = $client->createReceipt($request, $idempotenceKey); } catch (Exception $e) { $response = $e; } var_dump($response); ``` --- ### Получить информацию о чеке [Информация о чеке в документации](https://yookassa.ru/developers/api?lang=php#get_receipt) Запрос позволяет получить информацию о текущем состоянии чека по его уникальному идентификатору. В ответ на запрос придет объект чека — `ReceiptResponse` — в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); try { $response = $client->getReceiptInfo('ra-27ed1660-0001-0050-7a5e-10f80e0f0f29'); echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` --- ### Получить список чеков с фильтрацией [Список чеков в документации](https://yookassa.ru/developers/api?lang=php#get_receipts_list) Запрос позволяет получить список чеков, отфильтрованный по заданным критериям. Можно запросить чеки по конкретному платежу, чеки по конкретному возврату или все чеки магазина. В ответ на запрос вернется список чеков с учетом переданных параметров. В списке будет информация о чеках, созданных за последние 3 года. Список будет отсортирован по времени создания чеков в порядке убывания. Если результатов больше, чем задано в `limit`, список будет выводиться фрагментами. В этом случае в ответе на запрос вернется фрагмент списка и параметр `next_cursor` с указателем на следующий фрагмент. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $cursor = null; $params = [ 'limit' => 30, 'status' => \YooKassa\Model\Payment\ReceiptRegistrationStatus::SUCCEEDED, 'payment_id' => '1da5c87d-0984-50e8-a7f3-8de646dd9ec9', 'created_at_gte' => '2021-01-01T00:00:00.000Z', 'created_at_lt' => '2021-03-30T23:59:59.999Z', ]; try { do { $params['cursor'] = $cursor; $receipts = $client->getReceipts($params); foreach ($receipts->getItems() as $receipt) { echo $receipt->getStatus() . ' - ' . $receipt->getId() . "\n"; } } while ($cursor = $receipts->getNextCursor()); } catch (\Exception $e) { $response = $e; var_dump($response); } ``` [Подробнее о работе со списками](https://yookassa.ru/developers/using-api/lists) yookassa-sdk-php/docs/examples/01-configuration.md000064400000030521150364342670016131 0ustar00## Настройки SDK API ЮKassa [Справочник API ЮKassa](https://yookassa.ru/developers/api) С помощью этого SDK вы можете работать с онлайн-платежами: отправлять запросы на оплату, сохранять платежную информацию для повторных списаний, совершать возвраты и многое другое. * [Установка дополнительных настроек для Curl](#Установка-дополнительных-настроек-для-Curl) * [Аутентификация](#Аутентификация) * [Статистические данные об используемом окружении](#Статистические-данные-об-используемом-окружении) * [Получение информации о магазине](#Получение-информации-о-магазине) * [Работа с Webhook](#Работа-с-Webhook) * [Входящие уведомления](#Входящие-уведомления) --- ### Установка дополнительных настроек для Curl Чтобы установить дополнительные настройки Curl, можно воспользоваться методом `setAdvancedCurlOptions` класса `\YooKassa\Client\CurlClient`, создав свой класс Curl клиента c наследованием от `\YooKassa\Client\CurlClient`. Далее можно переопределить метод `setAdvancedCurlOptions` и задать в нем установку своих параметров методом `setCurlOption`. Создаем класс: ```php class CustomCurlClient extends \YooKassa\Client\CurlClient { public function setAdvancedCurlOptions() { $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, false); } } ``` И применяем новый класс: ```php $client = new \YooKassa\Client(new CustomCurlClient()); $client->setAuth('xxxxxx', 'test_XXXXXXX'); ``` --- ### Аутентификация Для работы с API необходимо прописать в конфигурации данные аутентификации. Существует два способа аутентификации: - shopId + секретный ключ, - OAuth-токен. [Подробнее в документации по API](https://yookassa.ru/developers/partners-api/basics) ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); // shopId + секретный ключ $client->setAuth('xxxxxx', 'test_XXXXXXX'); // или OAuth-токен $client->setAuthToken('token_XXXXXXX'); ``` --- ### Статистические данные об используемом окружении Для поддержки качества, а также для быстрого реагирования на ошибки SDK передает статистику в запросах к API ЮKassa. По умолчанию SDK передает в запросах версию операционной системы, версию PHP, а также версию SDK. Но вы можете передать дополнительные данные об используемом фреймворке, CMS, а также о модуле в CMS. Например, это может выглядеть так: ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $userAgent = $client->getApiClient()->getUserAgent(); $userAgent->setFramework('Symfony', '5.2.1'); $userAgent->setCms('Symfony CMF', '1.2.1'); $userAgent->setModule('YooKassa', '1.0.0'); ``` --- ### Получение информации о магазине После установки конфигурации можно проверить корректность данных, а также получить информацию о магазине. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); try { $response = $client->me(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` В результате мы увидим примерно следующее: ``` array(5) { ["account_id"] => string(6) "XXXXXX" ["test"]=> bool(true) ["fiscalization_enabled"]=> bool(true) ["payment_methods"]=> array(2) { [0]=> string(9) "yoo_money" [1]=> string(9) "bank_card" } ["status"]=> string(7) "enabled" } ``` [Подробнее в документации по API](https://yookassa.ru/developers/api?lang=php#me_object) --- ### Работа с Webhook Если вы подключаетесь к API через Oauth-токен, то можете настроить получение уведомлений о смене статуса платежа или возврата. Например, ЮKassa может сообщить, когда объект платежа, созданный в вашем приложении, перейдет в статус `waiting_for_capture`. В данном примере мы устанавливаем вебхуки для succeeded и canceled-уведомлений. А также проверяем, не установлены ли уже вебхуки. И если установлены на неверный адрес, удаляем. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuthToken('token_XXXXXXX'); $webHookUrl = 'https://merchant-site.ru/payment-notification'; $needWebHookList = [ \YooKassa\Model\Notification\NotificationEventType::PAYMENT_SUCCEEDED, \YooKassa\Model\Notification\NotificationEventType::PAYMENT_CANCELED, ]; try { $currentWebHookList = $client->getWebhooks()->getItems(); foreach ($needWebHookList as $event) { $hookIsSet = false; foreach ($currentWebHookList as $webHook) { if ($webHook->getEvent() === $event) { if ($webHook->getUrl() !== $webHookUrl) { $hookIsSet = false; $client->removeWebhook($webHook->getId()); } else { $hookIsSet = true; } } } if (!$hookIsSet) { $client->addWebhook(['event' => $event, 'url' => $webHookUrl]); } } } catch (Exception $e) { echo $e->getMessage(); } var_dump($client->getWebhooks()->getItems()); ``` В результате мы увидим примерно следующее: ``` array(2) { [0] => object(YooKassa\Model\Webhook\Webhook)#7 (4) { ["id":"YooKassa\Model\Webhook\Webhook":private] => string(39) "wh-52e51c6e-29a2-4a0d-854b-01cf022b5613" ["event":"YooKassa\Model\Webhook\Webhook":private] => string(16) "payment.canceled" ["url":"YooKassa\Model\Webhook\Webhook":private] => string(66) "https://merchant-site.ru/payment-notification" } [1] => object(YooKassa\Model\Webhook\Webhook)#8 (4) { ["id":"YooKassa\Model\Webhook\Webhook":private] => string(39) "wh-c331b3ee-fb65-428d-b128-1b837d9c4d93" ["event":"YooKassa\Model\Webhook\Webhook":private] => string(17) "payment.succeeded" ["url":"YooKassa\Model\Webhook\Webhook":private] => string(66) "https://merchant-site.ru/payment-notification" } } ``` [Подробнее в документации по API](https://yookassa.ru/developers/api?lang=php#webhook) ### Входящие уведомления Если вы хотите отслеживать состояние платежей и возвратов, вы можете подписаться на уведомления ([webhook](#Работа-с-Webhook), callback). Уведомления пригодятся в тех случаях, когда объект API изменяется без вашего участия. Например, если пользователю нужно подтвердить платеж, процесс оплаты может занять от нескольких минут до нескольких часов. Вместо того, чтобы всё это время периодически отправлять GET-запросы, чтобы узнать статус платежа, вы можете просто дождаться уведомления от ЮKassa. [Входящие уведомления в документации](https://yookassa.ru/developers/using-api/webhooks?lang=php) #### Использование Как только произойдет событие, на которое вы подписались, на URL, который вы указали при настройке, придет уведомление. В нем будут все данные об объекте на момент, когда произошло событие. Вам нужно подтвердить, что вы получили уведомление. Для этого ответьте HTTP-кодом 200. ЮKassa проигнорирует всё, что будет находиться в теле или в заголовках ответа. Ответы с любыми другими HTTP-кодами будут считаться невалидными, и ЮKassa продолжит доставлять уведомление в течение 24 часов, начиная с момента, когда событие произошло. #### Пример обработки уведомления с помощью SDK ```php require_once 'vendor/autoload.php'; try { $source = file_get_contents('php://input'); $data = json_decode($source, true); $factory = new \YooKassa\Model\Notification\NotificationFactory(); $notificationObject = $factory->factory($data); $responseObject = $notificationObject->getObject(); $client = new \YooKassa\Client(); if (!$client->isNotificationIPTrusted($_SERVER['REMOTE_ADDR'])) { header('HTTP/1.1 400 Something went wrong'); exit(); } if ($notificationObject->getEvent() === \YooKassa\Model\Notification\NotificationEventType::PAYMENT_SUCCEEDED) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif ($notificationObject->getEvent() === \YooKassa\Model\Notification\NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif ($notificationObject->getEvent() === \YooKassa\Model\Notification\NotificationEventType::PAYMENT_CANCELED) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif ($notificationObject->getEvent() === \YooKassa\Model\Notification\NotificationEventType::REFUND_SUCCEEDED) { $someData = [ 'refundId' => $responseObject->getId(), 'refundStatus' => $responseObject->getStatus(), 'paymentId' => $responseObject->getPaymentId(), ]; // ... // Специфичная логика } else { header('HTTP/1.1 400 Something went wrong'); exit(); } // Специфичная логика // ... $client->setAuth('xxxxxx', 'test_XXXXXXX'); // Получим актуальную информацию о платеже if ($paymentInfo = $client->getPaymentInfo($someData['paymentId'])) { $paymentStatus = $paymentInfo->getStatus(); // Специфичная логика // ... } else { header('HTTP/1.1 400 Something went wrong'); exit(); } } catch (Exception $e) { header('HTTP/1.1 400 Something went wrong'); exit(); } ``` yookassa-sdk-php/docs/examples/07-self-employed.md000064400000010275150364342670016041 0ustar00## Работа с самозанятыми Самозанятые — это люди, которые не имеют работодателя и наемных работников и получают доход, оказывая услуги или продавая товары собственного производства. При выплатах самозанятым каждая выплата будет считаться доходом самозанятого, и ЮKassa будет автоматически регистрировать ее в сервисе «[Мой налог](https://lknpd.nalog.ru/)». Информация о самозанятом нужна для проведения выплат самозанятым. [Как делать выплаты самозанятым](https://yookassa.ru/developers/payouts/scenario-extensions/self-employed) SDK позволяет создавать самозанятого в ЮKassa, а также получать о нем информацию. Объект самозанятого `SelfEmployed` содержит всю информацию о самозанятом, актуальную на текущий момент времени. Объект формируется при создании самозанятого и приходит в ответ на любой запрос, связанный с самозанятым. Набор возвращаемых параметров зависит от статуса объекта (значение параметра `status`) и того, какие параметры вы передали в запросе на создание самозанятого. * [Запрос на создание самозанятого](#Запрос-на-создание-самозанятого) * [Получить информацию о самозанятом](#Получить-информацию-о-самозанятом) --- ### Запрос на создание самозанятого Используйте этот запрос, чтобы создать в ЮKassa объект самозанятого. В запросе необходимо передать ИНН или телефон самозанятого для идентификации в сервисе «Мой налог», сценарий подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков и описание самозанятого. Идентификатор созданного объекта самозанятого необходимо использовать в запросе на проведение выплаты. В ответ на запрос придет объект самозанятого — `SelfEmployedResponse` — в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $request = [ 'itn' => '123456789012', 'phone' => '79001002030', 'confirmation' => [ 'type' => 'redirect' ], ]; $idempotenceKey = uniqid('', true); try { $result = $client->createSelfEmployed($request, $idempotenceKey); } catch (\Exception $e) { $result = $e; } var_dump($result); ``` --- ### Получить информацию о самозанятом С помощью этого запроса вы можете получить информацию о текущем статусе самозанятого по его уникальному идентификатору. В ответ на запрос придет объект самозанятого — `SelfEmployedResponse` — в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $selfEmployedId = 'se-285c0ab7-0003-5000-9000-0e1166498fda'; try { $response = $client->getSelfEmployedInfo($selfEmployedId); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` yookassa-sdk-php/docs/examples/09-sbp-banks.md000064400000003267150364342670015161 0ustar00## Работа со списком участников СБП Участники СБП — это банки и платежные сервисы, подключенные к СБП (Система быстрых платежей ЦБ РФ). SDK позволяет получить актуальный список всех участников СБП. Список нужно вывести получателю выплаты, идентификатор выбранного участника СБП необходимо использовать в запросе на [создание выплаты](06-payouts.md#Запрос-на-выплату-продавцу) [Подробнее о выплатах через СБП](https://yookassa.ru/developers/payouts/making-payouts/sbp) * [Получить список участников СБП](#Получить-список-участников-СБП) --- ### Получить список участников СБП В ответ на запрос вернется список участников СБП. Список будет отсортирован по идентификатору участника в порядке убывания. Объект участника СБП `SbpParticipantBank` содержит информацию о банке или платежном сервисе, подключенном к СБП. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); try { $result = $client->getSbpBanks(); } catch (\Exception $e) { $result = $e; } var_dump($result); ``` yookassa-sdk-php/docs/examples/02-payments.md000064400000034715150364342670015134 0ustar00## Работа с платежами SDK позволяет создавать, подтверждать, отменять платежи, а также получать информацию о них. Объект платежа `PaymentResponse` содержит всю информацию о платеже, актуальную на текущий момент времени. Объект формируется при создании платежа и приходит в ответ на любой запрос, связанный с платежами. * [Запрос на создание платежа](#Запрос-на-создание-платежа) * [Запрос на создание платежа через билдер](#Запрос-на-создание-платежа-через-билдер) * [Запрос на частичное подтверждение платежа](#Запрос-на-частичное-подтверждение-платежа) * [Запрос на отмену незавершенного платежа](#Запрос-на-отмену-незавершенного-платежа) * [Получить информацию о платеже](#Получить-информацию-о-платеже) * [Получить список платежей с фильтрацией](#Получить-список-платежей-с-фильтрацией) --- ### Запрос на создание платежа [Создание платежа в документации](https://yookassa.ru/developers/api?lang=php#create_payment) Чтобы принять оплату, необходимо создать объект платежа — `CreatePaymentRequest`. Он содержит всю необходимую информацию для проведения оплаты (сумму, валюту и статус). У платежа линейный жизненный цикл, он последовательно переходит из статуса в статус. В ответ на запрос придет объект платежа — `PaymentResponse` — в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); try { $idempotenceKey = uniqid('', true); $response = $client->createPayment( [ 'amount' => [ 'value' => '1000.00', 'currency' => 'RUB', ], 'confirmation' => [ 'type' => 'redirect', 'locale' => 'ru_RU', 'return_url' => 'https://merchant-site.ru/return_url', ], 'capture' => true, 'description' => 'Заказ №72', 'metadata' => [ 'orderNumber' => 1001 ], 'receipt' => [ 'customer' => [ 'full_name' => 'Ivanov Ivan Ivanovich', 'email' => 'email@email.ru', 'phone' => '79211234567', 'inn' => '6321341814' ], 'items' => [ [ 'description' => 'Переносное зарядное устройство Хувей', 'quantity' => '1.00', 'amount' => [ 'value' => 1000, 'currency' => 'RUB' ], 'vat_code' => '2', 'payment_mode' => 'full_payment', 'payment_subject' => 'commodity', 'country_of_origin_code' => 'CN', 'product_code' => '44 4D 01 00 21 FA 41 00 23 05 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 00 AB 00', 'customs_declaration_number' => '10714040/140917/0090376', 'excise' => '20.00', 'supplier' => [ 'name' => 'string', 'phone' => 'string', 'inn' => 'string' ] ], ] ] ], $idempotenceKey ); //получаем confirmationUrl для дальнейшего редиректа $confirmationUrl = $response->getConfirmation()->getConfirmationUrl(); } catch (\Exception $e) { $response = $e; } if (!empty($response)) { print_r($response); } ``` --- ### Запрос на создание платежа через билдер [Создание платежа в документации](https://yookassa.ru/developers/api?lang=php#create_payment) Билдер позволяет создать объект платежа — `CreatePaymentRequest` — программным способом, через объекты. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); try { $builder = \YooKassa\Request\Payments\CreatePaymentRequest::builder(); $builder->setAmount(100) ->setCurrency(\YooKassa\Model\CurrencyCode::RUB) ->setCapture(true) ->setDescription('Оплата заказа 112233') ->setMetadata([ 'cms_name' => 'yoo_api_test', 'order_id' => '112233', 'language' => 'ru', 'transaction_id' => '123-456-789', ]); // Устанавливаем страницу для редиректа после оплаты $builder->setConfirmation([ 'type' => \YooKassa\Model\Payment\ConfirmationType::REDIRECT, 'returnUrl' => 'https://merchant-site.ru/payment-return-page', ]); // Можем установить конкретный способ оплаты $builder->setPaymentMethodData(\YooKassa\Model\Payment\PaymentMethodType::BANK_CARD); // Составляем чек $builder->setReceiptEmail('john.doe@merchant.com'); $builder->setReceiptPhone('71111111111'); // Добавим товар $builder->addReceiptItem( 'Платок Gucci', 3000, 1.0, 2, 'full_payment', 'commodity' ); // Добавим доставку $builder->addReceiptShipping( 'Delivery/Shipping/Доставка', 100, 1, \YooKassa\Model\Receipt\PaymentMode::FULL_PAYMENT, \YooKassa\Model\Receipt\PaymentSubject::SERVICE ); // Можно добавить распределение денег по магазинам $builder->setTransfers([ [ 'account_id' => 123456, 'amount' => [ 'value' => 1000, 'currency' => \YooKassa\Model\CurrencyCode::RUB ], ], [ 'account_id' => 654321, 'amount' => [ 'value' => 2000, 'currency' => \YooKassa\Model\CurrencyCode::RUB ], ] ]); // Создаем объект запроса $request = $builder->build(); // Можно изменить данные, если нужно $request->setDescription($request->getDescription() . ' - merchant comment'); $idempotenceKey = uniqid('', true); $response = $client->createPayment($request, $idempotenceKey); //получаем confirmationUrl для дальнейшего редиректа $confirmationUrl = $response->getConfirmation()->getConfirmationUrl(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` --- ### Запрос на частичное подтверждение платежа [Подтверждение платежа в документации](https://yookassa.ru/developers/api?lang=php#capture_payment) Подтверждает вашу готовность принять платеж. После подтверждения платеж перейдет в статус succeeded. Это значит, что вы можете выдать товар или оказать услугу пользователю. Подтвердить можно только платеж в статусе `waiting_for_capture` и только в течение определенного времени (зависит от способа оплаты). Если вы не подтвердите платеж в отведенное время, он автоматически перейдет в статус `canceled`, и деньги вернутся пользователю. В ответ на запрос придет объект платежа в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $paymentId = '21b23b5b-000f-5061-a000-0674e49a8c10'; $request = [ "amount" => [ "value" => "1000.00", "currency" => "RUB" ], "transfers" => [ [ "account_id" => "123", "amount" => [ "value" => "300.00", "currency" => "RUB" ] ], [ "account_id" => "456", "amount" => [ "value" => "700.00", "currency" => "RUB" ] ] ] ]; $idempotenceKey = uniqid('', true); try { $response = $client->capturePayment($request, $paymentId, $idempotenceKey); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` [Подробнее о подтверждении и об отмене платежей](https://yookassa.ru/developers/payments/payment-process#capture-and-cancel) --- ### Запрос на отмену незавершенного платежа [Отмена платежа в документации](https://yookassa.ru/developers/api?lang=php#cancel_payment) Отменяет платеж, находящийся в статусе `waiting_for_capture`. Отмена платежа значит, что вы не готовы выдать пользователю товар или оказать услугу. Как только вы отменяете платеж, мы начинаем возвращать деньги на счет плательщика. Для платежей банковскими картами или из кошелька ЮMoney отмена происходит мгновенно. Для остальных способов оплаты возврат может занимать до нескольких дней. В ответ на запрос придет объект платежа в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $paymentId = '215d8da0-000f-50be-b000-0003308c89be'; $idempotenceKey = uniqid('', true); try { $response = $client->cancelPayment($paymentId, $idempotenceKey); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` [Подробнее о подтверждении и об отмене платежей](https://yookassa.ru/developers/payments/payment-process#capture-and-cancel) --- ### Получить информацию о платеже [Информация о платеже в документации](https://yookassa.ru/developers/api?lang=php#get_payment) Запрос позволяет получить информацию о текущем состоянии платежа по его уникальному идентификатору. В ответ на запрос придет объект платежа в актуальном статусе. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $paymentId = '215d8da0-000f-50be-b000-0003308c89be'; try { $response = $client->getPaymentInfo($paymentId); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` --- ### Получить список платежей с фильтрацией [Список платежей в документации](https://yookassa.ru/developers/api?lang=php#get_payments_list) Запрос позволяет получить список платежей, отфильтрованный по заданным критериям. В ответ на запрос вернется список платежей с учетом переданных параметров. В списке будет информация о платежах, созданных за последние 3 года. Список будет отсортирован по времени создания платежей в порядке убывания. Если результатов больше, чем задано в `limit`, список будет выводиться фрагментами. В этом случае в ответе на запрос вернется фрагмент списка и параметр `next_cursor` с указателем на следующий фрагмент. ```php require_once 'vendor/autoload.php'; $client = new \YooKassa\Client(); $client->setAuth('xxxxxx', 'test_XXXXXXX'); $cursor = null; $params = [ 'limit' => 30, 'status' => \YooKassa\Model\Payment\PaymentStatus::CANCELED, 'payment_method' => \YooKassa\Model\Payment\PaymentMethodType::BANK_CARD, 'created_at_gte' => '2021-01-01T00:00:00.000Z', 'created_at_lt' => '2021-03-30T23:59:59.999Z', ]; try { do { $params['cursor'] = $cursor; $payments = $client->getPayments($params); foreach ($payments->getItems() as $payment) { echo $payment->getCreatedAt()->format('Y-m-d H:i:s') . ' - ' . $payment->getStatus() . ' - ' . $payment->getId() . "\n"; } } while ($cursor = $payments->getNextCursor()); } catch (\Exception $e) { $response = $e; var_dump($response); } ``` [Подробнее о работе со списками](https://yookassa.ru/developers/using-api/lists) yookassa-sdk-php/docs/namespaces/yookassa-model-receipt.md000064400000007355150364342670017736 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Model\Receipt ## Parent: [\YooKassa\Model](../namespaces/yookassa-model.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Receipt\ReceiptCustomerInterface](../classes/YooKassa-Model-Receipt-ReceiptCustomerInterface.md) | Interface ReceiptCustomerInterface. | | [\YooKassa\Model\Receipt\ReceiptInterface](../classes/YooKassa-Model-Receipt-ReceiptInterface.md) | Interface ReceiptInterface. | | [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) | Interface ReceiptItemInterface. | | [\YooKassa\Model\Receipt\SettlementInterface](../classes/YooKassa-Model-Receipt-SettlementInterface.md) | Interface PostReceiptResponseSettlementInterface. | | [\YooKassa\Model\Receipt\SupplierInterface](../classes/YooKassa-Model-Receipt-SupplierInterface.md) | Interface SupplierInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Receipt\AdditionalUserProps](../classes/YooKassa-Model-Receipt-AdditionalUserProps.md) | Class AdditionalUserProps. | | [\YooKassa\Model\Receipt\AgentType](../classes/YooKassa-Model-Receipt-AgentType.md) | AgentType - Тип посредника. | | [\YooKassa\Model\Receipt\IndustryDetails](../classes/YooKassa-Model-Receipt-IndustryDetails.md) | Class IndustryDetails. | | [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) | Class MarkCodeInfo. | | [\YooKassa\Model\Receipt\MarkQuantity](../classes/YooKassa-Model-Receipt-MarkQuantity.md) | Class MarkQuantity. | | [\YooKassa\Model\Receipt\OperationalDetails](../classes/YooKassa-Model-Receipt-OperationalDetails.md) | Class OperationalDetails. | | [\YooKassa\Model\Receipt\PaymentMode](../classes/YooKassa-Model-Receipt-PaymentMode.md) | Класс, представляющий модель PaymentMode. | | [\YooKassa\Model\Receipt\PaymentSubject](../classes/YooKassa-Model-Receipt-PaymentSubject.md) | Класс, представляющий модель PaymentSubject. | | [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) | Класс данных для формирования чека в онлайн-кассе (для соблюдения 54-ФЗ). | | [\YooKassa\Model\Receipt\ReceiptCustomer](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md) | Информация о плательщике. | | [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) | Информация о товарной позиции в заказе, позиция фискального чека. | | [\YooKassa\Model\Receipt\ReceiptItemAmount](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md) | Class ReceiptItemAmount. | | [\YooKassa\Model\Receipt\ReceiptItemMeasure](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md) | Класс, представляющий модель ReceiptItemMeasure. | | [\YooKassa\Model\Receipt\ReceiptType](../classes/YooKassa-Model-Receipt-ReceiptType.md) | ReceiptType - Тип чека в онлайн-кассе. | | [\YooKassa\Model\Receipt\Settlement](../classes/YooKassa-Model-Receipt-Settlement.md) | Class Settlement. | | [\YooKassa\Model\Receipt\SettlementType](../classes/YooKassa-Model-Receipt-SettlementType.md) | SettlementType - Тип расчета. | | [\YooKassa\Model\Receipt\Supplier](../classes/YooKassa-Model-Receipt-Supplier.md) | Class Supplier. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-request-webhook.md000064400000001411150364342670020314 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Request\Webhook ## Parent: [\YooKassa\Request](../namespaces/yookassa-request.md) ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Request\Webhook\WebhookListResponse](../classes/YooKassa-Request-Webhook-WebhookListResponse.md) | Актуальный список объектов webhook для переданного OAuth-токена. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-model-payment-paymentmethod-b2b.md000064400000001272150364342670023267 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Model\Payment\PaymentMethod\B2b ## Parent: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) ### Namespaces * [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank](../namespaces/yookassa-model-payment-paymentmethod-b2b-sberbank.md) --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-request-payments-paymentdata.md000064400000010344150364342670023030 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Request\Payments\PaymentData ## Parent: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) | Класс, представляющий модель AbstractPaymentData. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataAlfabank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataAlfabank.md) | Класс, представляющий модель PaymentMethodDataAlfabank. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataApplePay](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataApplePay.md) | Класс, представляющий модель PaymentDataApplePay. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataB2bSberbank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md) | Класс, представляющий модель PaymentMethodDataB2bSberbank. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCard.md) | Класс, представляющий модель PaymentMethodDataBankCard. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md) | Класс, представляющий модель PaymentDataBankCardCard. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataCash](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataCash.md) | Класс, представляющий модель PaymentMethodDataCash. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataFactory](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataFactory.md) | Класс, представляющий модель PaymentDataFactory. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataGooglePay](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md) | Класс, представляющий модель PaymentDataGooglePay. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataInstallments](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataInstallments.md) | Класс, представляющий модель PaymentMethodDataInstallments. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataMobileBalance](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataMobileBalance.md) | Класс, представляющий модель PaymentMethodDataMobileBalance. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataQiwi](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataQiwi.md) | Класс, представляющий модель PaymentMethodDataQiwi. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataSberbank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataSberbank.md) | Класс, представляющий модель PaymentMethodDataSberbank. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataSberLoan](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataSberLoan.md) | Класс, представляющий модель PaymentDataSberLoan. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataSbp](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataSbp.md) | Класс, представляющий модель PaymentMethodDataSbp. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataTinkoffBank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataTinkoffBank.md) | Класс, представляющий модель PaymentMethodDataTinkoffBank. | | [\YooKassa\Request\Payments\PaymentData\PaymentDataYooMoney](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataYooMoney.md) | Класс, представляющий модель PaymentMethodDataYooMoney. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-common.md000064400000004207150364342670016466 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Common ## Parent: [\YooKassa](../namespaces/yookassa.md) ### Namespaces * [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Common\AbstractRequestInterface](../classes/YooKassa-Common-AbstractRequestInterface.md) | Interface AbstractRequestInterface. | | [\YooKassa\Common\ListObjectInterface](../classes/YooKassa-Common-ListObjectInterface.md) | Interface ListObjectInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) | Класс, представляющий модель AbstractEnum. | | [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) | Класс, представляющий модель AbstractObject. | | [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) | Класс, представляющий модель AbstractRequest. | | [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) | Класс, представляющий модель AbstractRequestBuilder. | | [\YooKassa\Common\HttpVerb](../classes/YooKassa-Common-HttpVerb.md) | Класс, представляющий модель HttpVerb. | | [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) | Класс, представляющий модель ListObject. | | [\YooKassa\Common\LoggerWrapper](../classes/YooKassa-Common-LoggerWrapper.md) | Класс, представляющий модель LoggerWrapper. | | [\YooKassa\Common\ResponseObject](../classes/YooKassa-Common-ResponseObject.md) | Класс, представляющий модель ResponseObject. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-model-refund.md000064400000003663150364342670017564 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Model\Refund ## Parent: [\YooKassa\Model](../namespaces/yookassa-model.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Refund\RefundInterface](../classes/YooKassa-Model-Refund-RefundInterface.md) | Interface RefundInterface. | | [\YooKassa\Model\Refund\SourceInterface](../classes/YooKassa-Model-Refund-SourceInterface.md) | Interface SourceInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) | Класс, представляющий модель Refund. | | [\YooKassa\Model\Refund\RefundCancellationDetails](../classes/YooKassa-Model-Refund-RefundCancellationDetails.md) | Класс, представляющий модель RefundCancellationDetails. | | [\YooKassa\Model\Refund\RefundCancellationDetailsPartyCode](../classes/YooKassa-Model-Refund-RefundCancellationDetailsPartyCode.md) | Класс, представляющий модель CancellationDetailsPartyCode. | | [\YooKassa\Model\Refund\RefundCancellationDetailsReasonCode](../classes/YooKassa-Model-Refund-RefundCancellationDetailsReasonCode.md) | Класс, представляющий модель RefundCancellationDetailsReasonCode. | | [\YooKassa\Model\Refund\RefundStatus](../classes/YooKassa-Model-Refund-RefundStatus.md) | Класс, представляющий модель RefundStatus. | | [\YooKassa\Model\Refund\Source](../classes/YooKassa-Model-Refund-Source.md) | Класс, представляющий модель RefundSourcesData. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-client.md000064400000002161150364342670016451 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Client ## Parent: [\YooKassa](../namespaces/yookassa.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Client\ApiClientInterface](../classes/YooKassa-Client-ApiClientInterface.md) | Interface ApiClientInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) | Класс, представляющий модель BaseClient. | | [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) | Класс, представляющий модель CurlClient. | | [\YooKassa\Client\UserAgent](../classes/YooKassa-Client-UserAgent.md) | Класс, представляющий модель UserAgent. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-helpers.md000064400000003141150364342670016634 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Helpers ## Parent: [\YooKassa](../namespaces/yookassa.md) ### Namespaces * [\YooKassa\Helpers\Config](../namespaces/yookassa-helpers-config.md) ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) | Класс, представляющий модель ProductCode. | | [\YooKassa\Helpers\Random](../classes/YooKassa-Helpers-Random.md) | Класс, представляющий модель Random. | | [\YooKassa\Helpers\RawHeadersParser](../classes/YooKassa-Helpers-RawHeadersParser.md) | Класс, представляющий модель Random. | | [\YooKassa\Helpers\SecurityHelper](../classes/YooKassa-Helpers-SecurityHelper.md) | Класс, представляющий модель SecurityHelper. | | [\YooKassa\Helpers\StringObject](../classes/YooKassa-Helpers-StringObject.md) | Класс, представляющий модель StringObject. | | [\YooKassa\Helpers\TypeCast](../classes/YooKassa-Helpers-TypeCast.md) | Класс, представляющий модель TypeCast. | | [\YooKassa\Helpers\UUID](../classes/YooKassa-Helpers-UUID.md) | Класс, представляющий модель UUID. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-model-webhook.md000064400000001640150364342670017730 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Model\Webhook ## Parent: [\YooKassa\Model](../namespaces/yookassa-model.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Webhook\WebhookInterface](../classes/YooKassa-Model-Webhook-WebhookInterface.md) | Interface WebhookInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Webhook\Webhook](../classes/YooKassa-Model-Webhook-Webhook.md) | Класс Webhook содержит информацию о подписке на одно событие. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-model-payout.md000064400000007023150364342670017614 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Model\Payout ## Parent: [\YooKassa\Model](../namespaces/yookassa-model.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Payout\PayoutInterface](../classes/YooKassa-Model-Payout-PayoutInterface.md) | Interface DealInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) | Класс, представляющий модель PayoutDestination. | | [\YooKassa\Model\Payout\IncomeReceipt](../classes/YooKassa-Model-Payout-IncomeReceipt.md) | Класс, представляющий модель IncomeReceipt. | | [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) | Класс, представляющий модель Payout. | | [\YooKassa\Model\Payout\PayoutCancellationDetails](../classes/YooKassa-Model-Payout-PayoutCancellationDetails.md) | Класс, представляющий модель PayoutCancellationDetails. | | [\YooKassa\Model\Payout\PayoutCancellationDetailsPartyCode](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsPartyCode.md) | Класс, представляющий модель PayoutCancellationDetailsPartyCode. | | [\YooKassa\Model\Payout\PayoutCancellationDetailsReasonCode](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md) | Класс, представляющий модель PayoutCancellationDetailsReasonCode. | | [\YooKassa\Model\Payout\PayoutDestinationBankCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCard.md) | Класс, представляющий модель PayoutDestinationBankCard. | | [\YooKassa\Model\Payout\PayoutDestinationBankCardCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md) | Класс, представляющий модель PayoutDestinationBankCardCard. | | [\YooKassa\Model\Payout\PayoutDestinationFactory](../classes/YooKassa-Model-Payout-PayoutDestinationFactory.md) | Класс, представляющий модель PayoutDestinationFactory. | | [\YooKassa\Model\Payout\PayoutDestinationSbp](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md) | Класс, представляющий модель PayoutToSbpDestination. | | [\YooKassa\Model\Payout\PayoutDestinationType](../classes/YooKassa-Model-Payout-PayoutDestinationType.md) | Класс, представляющий модель PayoutDestinationType. | | [\YooKassa\Model\Payout\PayoutDestinationYooMoney](../classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md) | Класс, представляющий модель PayoutToYooMoneyDestination. | | [\YooKassa\Model\Payout\PayoutSelfEmployed](../classes/YooKassa-Model-Payout-PayoutSelfEmployed.md) | Класс, представляющий модель PayoutSelfEmployed. | | [\YooKassa\Model\Payout\PayoutStatus](../classes/YooKassa-Model-Payout-PayoutStatus.md) | Класс, представляющий модель PayoutStatus. | | [\YooKassa\Model\Payout\SbpParticipantBank](../classes/YooKassa-Model-Payout-SbpParticipantBank.md) | Класс, представляющий модель SbpParticipantBank. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-model-payment-paymentmethod-b2b-sberbank.md000064400000005471150364342670025061 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank ## Parent: [\YooKassa\Model\Payment\PaymentMethod\B2b](../namespaces/yookassa-model-payment-paymentmethod-b2b.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetailsInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md) | Interface PayerBankDetailsInterface. | | [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataInterface.md) | Interface VatDataInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\CalculatedVatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-CalculatedVatData.md) | Класс, представляющий модель CalculatedVatData. | | [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\MixedVatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-MixedVatData.md) | Класс, представляющий модель MixedVatData. | | [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) | Класс, представляющий модель B2bSberbankPayerBankDetails. | | [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\UntaxedVatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-UntaxedVatData.md) | Класс, представляющий модель UntaxedVatData. | | [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) | Класс, представляющий модель VatData. | | [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataFactory](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataFactory.md) | Класс, представляющий модель PaymentMethodDataCash. | | [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataRate](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataRate.md) | Класс, представляющий модель CalculatedVatData. | | [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataType](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataType.md) | Класс, представляющий модель CalculatedVatData. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-model-payment.md000064400000007313150364342670017752 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Model\Payment ## Parent: [\YooKassa\Model](../namespaces/yookassa-model.md) ### Namespaces * [\YooKassa\Model\Payment\Confirmation](../namespaces/yookassa-model-payment-confirmation.md) * [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Payment\AuthorizationDetailsInterface](../classes/YooKassa-Model-Payment-AuthorizationDetailsInterface.md) | Interface AuthorizationDetailsInterface - Данные об авторизации платежа. | | [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) | Interface PaymentInterface. | | [\YooKassa\Model\Payment\RecipientInterface](../classes/YooKassa-Model-Payment-RecipientInterface.md) | Интерфейс получателя платежа. | | [\YooKassa\Model\Payment\TransferInterface](../classes/YooKassa-Model-Payment-TransferInterface.md) | Interface TransferInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Payment\AuthorizationDetails](../classes/YooKassa-Model-Payment-AuthorizationDetails.md) | Класс, представляющий модель AuthorizationDetails. | | [\YooKassa\Model\Payment\CancellationDetails](../classes/YooKassa-Model-Payment-CancellationDetails.md) | Класс, представляющий модель CancellationDetails. | | [\YooKassa\Model\Payment\CancellationDetailsPartyCode](../classes/YooKassa-Model-Payment-CancellationDetailsPartyCode.md) | Класс, представляющий модель CancellationDetailsPartyCode. | | [\YooKassa\Model\Payment\CancellationDetailsReasonCode](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md) | Класс, представляющий модель CancellationDetailsReasonCode. | | [\YooKassa\Model\Payment\ConfirmationType](../classes/YooKassa-Model-Payment-ConfirmationType.md) | Класс, представляющий модель ConfirmationType. | | [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) | Класс, представляющий модель Payment. | | [\YooKassa\Model\Payment\PaymentMethodType](../classes/YooKassa-Model-Payment-PaymentMethodType.md) | Класс, представляющий модель PaymentMethodType. | | [\YooKassa\Model\Payment\PaymentStatus](../classes/YooKassa-Model-Payment-PaymentStatus.md) | Класс, представляющий модель PaymentStatus. | | [\YooKassa\Model\Payment\ReceiptRegistrationStatus](../classes/YooKassa-Model-Payment-ReceiptRegistrationStatus.md) | Класс, представляющий модель ReceiptRegistrationStatus. | | [\YooKassa\Model\Payment\Recipient](../classes/YooKassa-Model-Payment-Recipient.md) | Класс, представляющий модель Recipient. | | [\YooKassa\Model\Payment\ThreeDSecure](../classes/YooKassa-Model-Payment-ThreeDSecure.md) | Класс, представляющий модель ThreeDSecure. | | [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) | Класс, представляющий модель Transfer. | | [\YooKassa\Model\Payment\TransferStatus](../classes/YooKassa-Model-Payment-TransferStatus.md) | Класс, представляющий модель TransferStatus. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-request-payments-confirmationattributes.md000064400000004674150364342670025331 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Request\Payments\ConfirmationAttributes ## Parent: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) | Класс, представляющий модель AbstractConfirmationAttributes. | | [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesEmbedded](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesEmbedded.md) | Класс, представляющий модель ConfirmationAttributesEmbedded. | | [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesExternal](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesExternal.md) | Класс, представляющий модель ConfirmationAttributesExternal. | | [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesFactory](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesFactory.md) | Класс, представляющий модель ConfirmationAttributesFactory. | | [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesMobileApplication](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md) | Класс, представляющий модель ConfirmationAttributesMobileApplication. | | [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesQr](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesQr.md) | Класс, представляющий модель ConfirmationAttributesQr. | | [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesRedirect](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md) | Класс, представляющий модель ConfirmationAttributesRedirect. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-model-personaldata.md000064400000004023150364342670020745 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Model\PersonalData ## Parent: [\YooKassa\Model](../namespaces/yookassa-model.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) | Interface PersonalDataInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) | Класс, представляющий модель PersonalData. | | [\YooKassa\Model\PersonalData\PersonalDataCancellationDetails](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md) | Класс, представляющий модель PersonalDataCancellationDetails. | | [\YooKassa\Model\PersonalData\PersonalDataCancellationDetailsPartyCode](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsPartyCode.md) | Класс, представляющий модель PersonalDataCancellationDetailsPartyCode. | | [\YooKassa\Model\PersonalData\PersonalDataCancellationDetailsReasonCode](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsReasonCode.md) | Класс, представляющий модель PersonalDataCancellationDetailsReasonCode. | | [\YooKassa\Model\PersonalData\PersonalDataStatus](../classes/YooKassa-Model-PersonalData-PersonalDataStatus.md) | Класс, представляющий модель PersonalDataStatus. | | [\YooKassa\Model\PersonalData\PersonalDataType](../classes/YooKassa-Model-PersonalData-PersonalDataType.md) | Класс, представляющий модель PersonalDataType. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-request-payouts-payoutdestinationdata.md000064400000004147150364342670025006 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Request\Payouts\PayoutDestinationData ## Parent: [\YooKassa\Request\Payouts](../namespaces/yookassa-request-payouts.md) ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData](../classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md) | Класс, представляющий AbstractPayoutDestinationData. | | [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCard](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCard.md) | Класс, представляющий модель PayoutDestinationDataBankCard. | | [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCardCard](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCardCard.md) | Класс, представляющий модель PayoutDestinationDataBankCardCard. | | [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataFactory](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataFactory.md) | Класс, представляющий модель PayoutDestinationDataFactory. | | [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataSbp](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md) | Класс, представляющий модель PayoutDestinationDataSbp. | | [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataYooMoney](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md) | Класс, представляющий модель PayoutDestinationDataYooMoney. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-model-payment-confirmation.md000064400000004411150364342670022434 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Model\Payment\Confirmation ## Parent: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) | Класс, представляющий модель AbstractConfirmation. | | [\YooKassa\Model\Payment\Confirmation\ConfirmationCodeVerification](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationCodeVerification.md) | Класс, представляющий модель ConfirmationEmbedded. | | [\YooKassa\Model\Payment\Confirmation\ConfirmationEmbedded](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationEmbedded.md) | Класс, представляющий модель ConfirmationEmbedded. | | [\YooKassa\Model\Payment\Confirmation\ConfirmationExternal](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationExternal.md) | Класс, представляющий модель ConfirmationExternal. | | [\YooKassa\Model\Payment\Confirmation\ConfirmationFactory](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationFactory.md) | Класс, представляющий фабрику ConfirmationFactory. | | [\YooKassa\Model\Payment\Confirmation\ConfirmationMobileApplication](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationMobileApplication.md) | Класс, представляющий модель ConfirmationMobileApplication. | | [\YooKassa\Model\Payment\Confirmation\ConfirmationQr](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationQr.md) | Класс, представляющий модель ConfirmationQr. | | [\YooKassa\Model\Payment\Confirmation\ConfirmationRedirect](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md) | Класс, представляющий модель ConfirmationRedirect. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-request-selfemployed.md000064400000004534150364342670021357 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Request\SelfEmployed ## Parent: [\YooKassa\Request](../namespaces/yookassa-request.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md) | Interface SelfEmployedRequestInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Request\SelfEmployed\SelfEmployedRequest](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md) | Класс, представляющий модель SelfEmployedRequest. | | [\YooKassa\Request\SelfEmployed\SelfEmployedRequestBuilder](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md) | Класс, представляющий модель SelfEmployedRequestBuilder. | | [\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md) | Класс, представляющий модель SelfEmployedRequestConfirmation. | | [\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmationFactory](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationFactory.md) | Класс, представляющий модель SelfEmployedRequestConfirmationFactory. | | [\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmationRedirect](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationRedirect.md) | Класс, представляющий модель SelfEmployedRequestConfirmationRedirect. | | [\YooKassa\Request\SelfEmployed\SelfEmployedRequestSerializer](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestSerializer.md) | Класс, представляющий модель SelfEmployedRequestSerializer. | | [\YooKassa\Request\SelfEmployed\SelfEmployedResponse](../classes/YooKassa-Request-SelfEmployed-SelfEmployedResponse.md) | Класс, представляющий модель SelfEmployedResponse. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-model.md000064400000003656150364342670016305 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Model ## Parent: [\YooKassa](../namespaces/yookassa.md) ### Namespaces * [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) * [\YooKassa\Model\Notification](../namespaces/yookassa-model-notification.md) * [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) * [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) * [\YooKassa\Model\PersonalData](../namespaces/yookassa-model-personaldata.md) * [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) * [\YooKassa\Model\Refund](../namespaces/yookassa-model-refund.md) * [\YooKassa\Model\SelfEmployed](../namespaces/yookassa-model-selfemployed.md) * [\YooKassa\Model\Webhook](../namespaces/yookassa-model-webhook.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Model\AmountInterface](../classes/YooKassa-Model-AmountInterface.md) | Interface AmountInterface. | | [\YooKassa\Model\CancellationDetailsInterface](../classes/YooKassa-Model-CancellationDetailsInterface.md) | Interface CancellationDetailsInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Model\CurrencyCode](../classes/YooKassa-Model-CurrencyCode.md) | Класс, представляющий модель CurrencyCode. | | [\YooKassa\Model\Metadata](../classes/YooKassa-Model-Metadata.md) | Metadata - Метаданные платежа указанные мерчантом. | | [\YooKassa\Model\MonetaryAmount](../classes/YooKassa-Model-MonetaryAmount.md) | MonetaryAmount - Сумма определенная в валюте. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-model-payment-paymentmethod.md000064400000012772150364342670022633 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Model\Payment\PaymentMethod ## Parent: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) ### Namespaces * [\YooKassa\Model\Payment\PaymentMethod\B2b](../namespaces/yookassa-model-payment-paymentmethod-b2b.md) ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) | Класс, представляющий модель AbstractPaymentMethod. | | [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) | Класс, описывающий модель BankCard. | | [\YooKassa\Model\Payment\PaymentMethod\BankCardSource](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardSource.md) | Класс, представляющий модель BankCardSource. | | [\YooKassa\Model\Payment\PaymentMethod\BankCardType](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md) | Класс, представляющий модель BankCardType. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodAlfaBank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodAlfaBank.md) | Класс, представляющий модель PaymentMethodAlfabank. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodApplePay](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodApplePay.md) | Класс, представляющий модель PaymentMethodApplePay. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodB2bSberbank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md) | Класс, представляющий модель PaymentMethodB2bSberbank. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodBankCard](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md) | Класс, представляющий модель PaymentMethodBankCard. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodCash](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodCash.md) | Класс, представляющий модель PaymentMethodCash. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodFactory](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodFactory.md) | Класс, представляющий модель PaymentMethodFactory. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodGooglePay](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodGooglePay.md) | Класс, представляющий модель PaymentMethodGooglePay. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodInstallments](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodInstallments.md) | Класс, представляющий модель PaymentMethodInstallments. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodMobileBalance](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodMobileBalance.md) | Класс, представляющий модель PaymentMethodMobileBalance. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodPsb](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodPsb.md) | Класс, представляющий модель PaymentMethodPsb. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodQiwi](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodQiwi.md) | Класс, представляющий модель PaymentMethodQiwi. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodSberbank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberbank.md) | Класс, представляющий модель PaymentMethodSberbank. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodSberLoan](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md) | Класс, представляющий модель PaymentMethodSberLoan. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodSbp](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSbp.md) | Класс, представляющий модель PaymentMethodSbp. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodTinkoffBank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodTinkoffBank.md) | Класс, представляющий модель PaymentMethodTinkoffBank. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodUnknown](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodUnknown.md) | Класс, представляющий модель PaymentMethodUnknown. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodWebmoney](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodWebmoney.md) | Класс, представляющий модель PaymentMethodWebmoney. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodWechat](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodWechat.md) | Класс, представляющий модель PaymentMethodWeChat. | | [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodYooMoney](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodYooMoney.md) | Класс, представляющий модель PaymentMethodYooMoney. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-model-selfemployed.md000064400000004217150364342670020765 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Model\SelfEmployed ## Parent: [\YooKassa\Model](../namespaces/yookassa-model.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) | Interface SelfEmployedInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) | Класс, представляющий модель SelfEmployed. | | [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md) | Класс, представляющий модель SelfEmployedConfirmation. | | [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmationFactory](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationFactory.md) | Фабрика создания объекта сценария подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. | | [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmationRedirect](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationRedirect.md) | Класс, представляющий модель SelfEmployedConfirmationRedirect. | | [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmationType](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationType.md) | Класс, представляющий модель SelfEmployedConfirmationType. | | [\YooKassa\Model\SelfEmployed\SelfEmployedStatus](../classes/YooKassa-Model-SelfEmployed-SelfEmployedStatus.md) | Класс, представляющий модель SelfEmployedStatus. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-request-deals.md000064400000005223150364342670017753 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Request\Deals ## Parent: [\YooKassa\Request](../namespaces/yookassa-request.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Request\Deals\CreateDealRequestInterface](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md) | Interface CreateDealRequestInterface. | | [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) | Interface DealsRequestInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Request\Deals\AbstractDealResponse](../classes/YooKassa-Request-Deals-AbstractDealResponse.md) | Класс, представляющий AbstractDealResponse. | | [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) | Класс, представляющий модель SafeDealRequest. | | [\YooKassa\Request\Deals\CreateDealRequestBuilder](../classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md) | Класс, представляющий модель CreateDealRequestBuilder. | | [\YooKassa\Request\Deals\CreateDealRequestSerializer](../classes/YooKassa-Request-Deals-CreateDealRequestSerializer.md) | Класс, представляющий модель CreateDealRequestSerializer. | | [\YooKassa\Request\Deals\CreateDealResponse](../classes/YooKassa-Request-Deals-CreateDealResponse.md) | Класс, представляющий CreateDealResponse. | | [\YooKassa\Request\Deals\DealResponse](../classes/YooKassa-Request-Deals-DealResponse.md) | Класс, представляющий DealResponse. | | [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) | Класс, представляющий модель DealsRequest. | | [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) | Класс, представляющий модель DealsRequestBuilder. | | [\YooKassa\Request\Deals\DealsRequestSerializer](../classes/YooKassa-Request-Deals-DealsRequestSerializer.md) | Класс, представляющий модель DealsRequestSerializer. | | [\YooKassa\Request\Deals\DealsResponse](../classes/YooKassa-Request-Deals-DealsResponse.md) | Класс, представляющий модель DealsResponse. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa.md000064400000001604150364342670015176 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa ## Parent: [default](../namespaces/default.md) ### Namespaces * [\YooKassa\Client](../namespaces/yookassa-client.md) * [\YooKassa\Common](../namespaces/yookassa-common.md) * [\YooKassa\Helpers](../namespaces/yookassa-helpers.md) * [\YooKassa\Model](../namespaces/yookassa-model.md) * [\YooKassa\Request](../namespaces/yookassa-request.md) ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Client](../classes/YooKassa-Client.md) | Класс клиента API. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-helpers-config.md000064400000001705150364342670020103 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Helpers\Config ## Parent: [\YooKassa\Helpers](../namespaces/yookassa-helpers.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Helpers\Config\ConfigurationLoaderInterface](../classes/YooKassa-Helpers-Config-ConfigurationLoaderInterface.md) | Interface ConfigurationLoaderInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Helpers\Config\ConfigurationLoader](../classes/YooKassa-Helpers-Config-ConfigurationLoader.md) | Класс, представляющий модель ConfigurationLoader. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-common-exceptions.md000064400000007635150364342670020655 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Common\Exceptions ## Parent: [\YooKassa\Common](../namespaces/yookassa-common.md) ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Common\Exceptions\ApiConnectionException](../classes/YooKassa-Common-Exceptions-ApiConnectionException.md) | Неожиданный код ошибки. | | [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) | Неожиданный код ошибки. | | [\YooKassa\Common\Exceptions\AuthorizeException](../classes/YooKassa-Common-Exceptions-AuthorizeException.md) | Ошибка авторизации. Не установлен заголовок. | | [\YooKassa\Common\Exceptions\BadApiRequestException](../classes/YooKassa-Common-Exceptions-BadApiRequestException.md) | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API. | | [\YooKassa\Common\Exceptions\EmptyPropertyValueException](../classes/YooKassa-Common-Exceptions-EmptyPropertyValueException.md) | | | [\YooKassa\Common\Exceptions\ExtensionNotFoundException](../classes/YooKassa-Common-Exceptions-ExtensionNotFoundException.md) | Требуемое PHP расширение не установлено. | | [\YooKassa\Common\Exceptions\ForbiddenException](../classes/YooKassa-Common-Exceptions-ForbiddenException.md) | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции. | | [\YooKassa\Common\Exceptions\InternalServerError](../classes/YooKassa-Common-Exceptions-InternalServerError.md) | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности. | | [\YooKassa\Common\Exceptions\InvalidPropertyException](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md) | | | [\YooKassa\Common\Exceptions\InvalidPropertyValueException](../classes/YooKassa-Common-Exceptions-InvalidPropertyValueException.md) | | | [\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException](../classes/YooKassa-Common-Exceptions-InvalidPropertyValueTypeException.md) | | | [\YooKassa\Common\Exceptions\InvalidRequestException](../classes/YooKassa-Common-Exceptions-InvalidRequestException.md) | | | [\YooKassa\Common\Exceptions\JsonException](../classes/YooKassa-Common-Exceptions-JsonException.md) | | | [\YooKassa\Common\Exceptions\NotFoundException](../classes/YooKassa-Common-Exceptions-NotFoundException.md) | Ресурс не найден. | | [\YooKassa\Common\Exceptions\ResponseProcessingException](../classes/YooKassa-Common-Exceptions-ResponseProcessingException.md) | Запрос был принят на обработку, но она не завершена. | | [\YooKassa\Common\Exceptions\TooManyRequestsException](../classes/YooKassa-Common-Exceptions-TooManyRequestsException.md) | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов. | | [\YooKassa\Common\Exceptions\UnauthorizedException](../classes/YooKassa-Common-Exceptions-UnauthorizedException.md) | [Basic Auth] Неверный идентификатор вашего аккаунта в ЮKassa или секретный ключ (имя пользователя и пароль при аутентификации). | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-request-refunds.md000064400000005464150364342670020340 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Request\Refunds ## Parent: [\YooKassa\Request](../namespaces/yookassa-request.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) | Interface CreateRefundRequestInterface | | [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) | Interface RefundsRequestInterface | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Request\Refunds\AbstractRefundResponse](../classes/YooKassa-Request-Refunds-AbstractRefundResponse.md) | Класс, представляющий модель AbstractRefundResponse. | | [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) | Класс, представляющий модель CreateRefundRequest. | | [\YooKassa\Request\Refunds\CreateRefundRequestBuilder](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md) | Класс, представляющий модель CreateRefundRequestBuilder. | | [\YooKassa\Request\Refunds\CreateRefundRequestSerializer](../classes/YooKassa-Request-Refunds-CreateRefundRequestSerializer.md) | Класс, представляющий модель CreateRefundRequestSerializer. | | [\YooKassa\Request\Refunds\CreateRefundResponse](../classes/YooKassa-Request-Refunds-CreateRefundResponse.md) | Класс, представляющий модель CreateRefundResponse. | | [\YooKassa\Request\Refunds\RefundResponse](../classes/YooKassa-Request-Refunds-RefundResponse.md) | Класс, представляющий модель RefundResponse. | | [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) | Класс, представляющий модель RefundsRequest. | | [\YooKassa\Request\Refunds\RefundsRequestBuilder](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md) | Класс, представляющий модель RefundsRequestBuilder. | | [\YooKassa\Request\Refunds\RefundsRequestSerializer](../classes/YooKassa-Request-Refunds-RefundsRequestSerializer.md) | Класс, представляющий модель RefundsRequestSerializer. | | [\YooKassa\Request\Refunds\RefundsResponse](../classes/YooKassa-Request-Refunds-RefundsResponse.md) | Класс, представляющий модель RefundsResponse. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-model-deal.md000064400000005735150364342670017210 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Model\Deal ## Parent: [\YooKassa\Model](../namespaces/yookassa-model.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Deal\DealInterface](../classes/YooKassa-Model-Deal-DealInterface.md) | Interface DealInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) | Класс, представляющий модель BaseDeal. | | [\YooKassa\Model\Deal\CaptureDealData](../classes/YooKassa-Model-Deal-CaptureDealData.md) | Класс, представляющий модель CaptureDealData. | | [\YooKassa\Model\Deal\DealBalanceAmount](../classes/YooKassa-Model-Deal-DealBalanceAmount.md) | Класс, представляющий модель DealBalanceAmount. | | [\YooKassa\Model\Deal\DealStatus](../classes/YooKassa-Model-Deal-DealStatus.md) | Класс, представляющий модель DealStatus. | | [\YooKassa\Model\Deal\DealType](../classes/YooKassa-Model-Deal-DealType.md) | Класс, представляющий модель DealType. | | [\YooKassa\Model\Deal\FeeMoment](../classes/YooKassa-Model-Deal-FeeMoment.md) | Класс, представляющий модель FeeMoment. | | [\YooKassa\Model\Deal\PaymentDealInfo](../classes/YooKassa-Model-Deal-PaymentDealInfo.md) | Класс, представляющий модель PaymentDealInfo. | | [\YooKassa\Model\Deal\PayoutDealInfo](../classes/YooKassa-Model-Deal-PayoutDealInfo.md) | Класс, представляющий модель PayoutDealInfo. | | [\YooKassa\Model\Deal\RefundDealData](../classes/YooKassa-Model-Deal-RefundDealData.md) | Класс, представляющий модель RefundDealData. | | [\YooKassa\Model\Deal\RefundDealInfo](../classes/YooKassa-Model-Deal-RefundDealInfo.md) | Класс, представляющий модель RefundDealInfo. | | [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) | Класс, представляющий модель SafeDeal. | | [\YooKassa\Model\Deal\SettlementPayoutPayment](../classes/YooKassa-Model-Deal-SettlementPayoutPayment.md) | Класс, представляющий модель SettlementPayoutPayment. | | [\YooKassa\Model\Deal\SettlementPayoutPaymentType](../classes/YooKassa-Model-Deal-SettlementPayoutPaymentType.md) | Класс, представляющий модель SettlementPayoutPaymentType. | | [\YooKassa\Model\Deal\SettlementPayoutRefund](../classes/YooKassa-Model-Deal-SettlementPayoutRefund.md) | Класс, представляющий модель SettlementPayoutRefund. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/default.md000064400000004746150364342670015003 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \ ### Namespaces * [\YooKassa](../namespaces/yookassa.md) ### Constants ###### YOOKASSA_SDK_PSR_LOG_PATH ```php YOOKASSA_SDK_PSR_LOG_PATH = __DIR__ . '/../vendor/psr/log/Psr/Log' ``` | Tag | Version | Desc | | --- | ------- | ---- | | package | | | ###### YOOKASSA_SDK_ROOT_PATH The MIT License. ```php YOOKASSA_SDK_ROOT_PATH = __DIR__ ``` Copyright (c) 2023 "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. | Tag | Version | Desc | | --- | ------- | ---- | | package | | | ### Functions #### yookassaSdkLoadClass() : void ```php yookassaSdkLoadClass(mixed $className) : void ``` **Details:** * File: [lib/autoload.php](../files/lib-autoload.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | className | | **Returns:** void - ##### Tags | Tag | Version | Description | | --- | ------- | ----------- | | package | | | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-request-payments.md000064400000014202150364342670020520 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Request\Payments ## Parent: [\YooKassa\Request](../namespaces/yookassa-request.md) ### Namespaces * [\YooKassa\Request\Payments\ConfirmationAttributes](../namespaces/yookassa-request-payments-confirmationattributes.md) * [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Request\Payments\AirlineInterface](../classes/YooKassa-Request-Payments-AirlineInterface.md) | Interface Airline. | | [\YooKassa\Request\Payments\CreateCaptureRequestInterface](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md) | Interface CreateCaptureRequestInterface. | | [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) | Interface CreatePaymentRequestInterface. | | [\YooKassa\Request\Payments\LegInterface](../classes/YooKassa-Request-Payments-LegInterface.md) | Interface PassengerInterface. | | [\YooKassa\Request\Payments\PassengerInterface](../classes/YooKassa-Request-Payments-PassengerInterface.md) | Interface PassengerInterface. | | [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) | Interface PaymentsRequestInterface. | | [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) | Interface TransferDataInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) | Класс, представляющий модель AbstractPaymentRequest. | | [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) | Класс, представляющий модель AbstractPaymentRequestBuilder. | | [\YooKassa\Request\Payments\AbstractPaymentResponse](../classes/YooKassa-Request-Payments-AbstractPaymentResponse.md) | Класс, представляющий модель AbstractPaymentResponse. | | [\YooKassa\Request\Payments\Airline](../classes/YooKassa-Request-Payments-Airline.md) | Класс, представляющий модель Airline. | | [\YooKassa\Request\Payments\CancelResponse](../classes/YooKassa-Request-Payments-CancelResponse.md) | Класс, представляющий модель CancelResponse. | | [\YooKassa\Request\Payments\CreateCaptureRequest](../classes/YooKassa-Request-Payments-CreateCaptureRequest.md) | Класс, представляющий модель CreateCaptureRequest. | | [\YooKassa\Request\Payments\CreateCaptureRequestBuilder](../classes/YooKassa-Request-Payments-CreateCaptureRequestBuilder.md) | Класс, представляющий модель CreateCaptureRequestBuilder. | | [\YooKassa\Request\Payments\CreateCaptureRequestSerializer](../classes/YooKassa-Request-Payments-CreateCaptureRequestSerializer.md) | Класс, представляющий модель CreateCaptureRequestSerializer. | | [\YooKassa\Request\Payments\CreateCaptureResponse](../classes/YooKassa-Request-Payments-CreateCaptureResponse.md) | Класс, представляющий модель CreateCaptureResponse. | | [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) | Класс, представляющий модель CreateCaptureRequest. | | [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) | Класс, представляющий модель CreatePaymentRequestBuilder. | | [\YooKassa\Request\Payments\CreatePaymentRequestSerializer](../classes/YooKassa-Request-Payments-CreatePaymentRequestSerializer.md) | Класс, представляющий модель CreatePaymentRequestSerializer. | | [\YooKassa\Request\Payments\CreatePaymentResponse](../classes/YooKassa-Request-Payments-CreatePaymentResponse.md) | Класс, представляющий модель CreatePaymentResponse. | | [\YooKassa\Request\Payments\FraudData](../classes/YooKassa-Request-Payments-FraudData.md) | Класс, представляющий модель FraudData. | | [\YooKassa\Request\Payments\Leg](../classes/YooKassa-Request-Payments-Leg.md) | Класс, представляющий модель Leg. | | [\YooKassa\Request\Payments\Locale](../classes/YooKassa-Request-Payments-Locale.md) | Класс, представляющий модель Locale. | | [\YooKassa\Request\Payments\Passenger](../classes/YooKassa-Request-Payments-Passenger.md) | Класс, представляющий модель PaymentsRequest. | | [\YooKassa\Request\Payments\PaymentResponse](../classes/YooKassa-Request-Payments-PaymentResponse.md) | Класс, представляющий модель PaymentResponse. | | [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) | Класс, представляющий модель PaymentsRequest. | | [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) | Класс, представляющий модель PaymentsRequestBuilder. | | [\YooKassa\Request\Payments\PaymentsRequestSerializer](../classes/YooKassa-Request-Payments-PaymentsRequestSerializer.md) | Класс, представляющий модель PaymentsRequestSerializer. | | [\YooKassa\Request\Payments\PaymentsResponse](../classes/YooKassa-Request-Payments-PaymentsResponse.md) | Класс, представляющий модель PaymentsResponse. | | [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) | Класс, представляющий модель Transfer. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-model-notification.md000064400000006500150364342670020760 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Model\Notification ## Parent: [\YooKassa\Model](../namespaces/yookassa-model.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Notification\NotificationInterface](../classes/YooKassa-Model-Notification-NotificationInterface.md) | | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) | Базовый класс уведомлений. | | [\YooKassa\Model\Notification\NotificationCanceled](../classes/YooKassa-Model-Notification-NotificationCanceled.md) | Класс объекта, присылаемого API при изменении статуса платежа на "canceled". | | [\YooKassa\Model\Notification\NotificationDealClosed](../classes/YooKassa-Model-Notification-NotificationDealClosed.md) | Класс объекта, присылаемого API при изменении статуса сделки на "closed". | | [\YooKassa\Model\Notification\NotificationEventType](../classes/YooKassa-Model-Notification-NotificationEventType.md) | NotificationEventType - Тип уведомления. | | [\YooKassa\Model\Notification\NotificationFactory](../classes/YooKassa-Model-Notification-NotificationFactory.md) | Фабрика для получения конкретного объекта уведомления. | | [\YooKassa\Model\Notification\NotificationPayoutCanceled](../classes/YooKassa-Model-Notification-NotificationPayoutCanceled.md) | Класс объекта, присылаемого API при изменении статуса выплаты на "canceled". | | [\YooKassa\Model\Notification\NotificationPayoutSucceeded](../classes/YooKassa-Model-Notification-NotificationPayoutSucceeded.md) | Класс объекта, присылаемого API при изменении статуса выплаты на "succeeded". | | [\YooKassa\Model\Notification\NotificationRefundSucceeded](../classes/YooKassa-Model-Notification-NotificationRefundSucceeded.md) | Класс объекта, присылаемого API при изменении статуса возврата на "succeeded". | | [\YooKassa\Model\Notification\NotificationSucceeded](../classes/YooKassa-Model-Notification-NotificationSucceeded.md) | Класс объекта, присылаемого API при изменении статуса платежа на "succeeded". | | [\YooKassa\Model\Notification\NotificationType](../classes/YooKassa-Model-Notification-NotificationType.md) | Класс, представляющий модель AbstractEnum. | | [\YooKassa\Model\Notification\NotificationWaitingForCapture](../classes/YooKassa-Model-Notification-NotificationWaitingForCapture.md) | Класс объекта, присылаемого API при изменении статуса платежа на "waiting_for_capture". | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-request-receipts.md000064400000007717150364342670020513 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Request\Receipts ## Parent: [\YooKassa\Request](../namespaces/yookassa-request.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) | Interface CreatePostReceiptRequestInterface. | | [\YooKassa\Request\Receipts\ReceiptResponseInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md) | Interface ReceiptInterface. | | [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) | Interface ReceiptResponseItemInterface. | | [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) | Интерфейс объекта запроса списка возвратов. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) | Class AbstractReceipt. | | [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) | Класс объекта запроса к API на создание чека. | | [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) | Класс билдера объектов запросов к API на создание чека. | | [\YooKassa\Request\Receipts\CreatePostReceiptRequestSerializer](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestSerializer.md) | Класс сериалайзера объекта запроса к API создание чека. | | [\YooKassa\Request\Receipts\PaymentReceiptResponse](../classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md) | Класс описывающий чек, привязанный к платежу. | | [\YooKassa\Request\Receipts\ReceiptResponseFactory](../classes/YooKassa-Request-Receipts-ReceiptResponseFactory.md) | Фабричный класс для работы с чеками. | | [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) | Класс, описывающий товар в чеке. | | [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) | Класс объекта запроса к API списка возвратов магазина. | | [\YooKassa\Request\Receipts\ReceiptsRequestBuilder](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md) | Класс билдера объектов запросов к API списка чеков. | | [\YooKassa\Request\Receipts\ReceiptsRequestSerializer](../classes/YooKassa-Request-Receipts-ReceiptsRequestSerializer.md) | Класс сериализатора объектов запросов к API для получения списка возвратов. | | [\YooKassa\Request\Receipts\ReceiptsResponse](../classes/YooKassa-Request-Receipts-ReceiptsResponse.md) | Класс для работы со списком чеков. | | [\YooKassa\Request\Receipts\RefundReceiptResponse](../classes/YooKassa-Request-Receipts-RefundReceiptResponse.md) | Класс описывающий чек, привязанный к возврату. | | [\YooKassa\Request\Receipts\SimpleReceiptResponse](../classes/YooKassa-Request-Receipts-SimpleReceiptResponse.md) | Класс описывающий чек, не привязанный ни к платежу ни к возврату. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-request-payouts.md000064400000005365150364342670020376 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Request\Payouts ## Parent: [\YooKassa\Request](../namespaces/yookassa-request.md) ### Namespaces * [\YooKassa\Request\Payouts\PayoutDestinationData](../namespaces/yookassa-request-payouts-payoutdestinationdata.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) | Interface CreatePayoutRequestInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Request\Payouts\AbstractPayoutResponse](../classes/YooKassa-Request-Payouts-AbstractPayoutResponse.md) | Класс, представляющий AbstractPayoutResponse. | | [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) | Класс, представляющий модель CreatePayoutRequest. | | [\YooKassa\Request\Payouts\CreatePayoutRequestBuilder](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md) | Класс, представляющий модель CreatePayoutRequestBuilder. | | [\YooKassa\Request\Payouts\CreatePayoutRequestSerializer](../classes/YooKassa-Request-Payouts-CreatePayoutRequestSerializer.md) | Класс, представляющий модель CreatePayoutRequestSerializer. | | [\YooKassa\Request\Payouts\CreatePayoutResponse](../classes/YooKassa-Request-Payouts-CreatePayoutResponse.md) | Класс, представляющий CreatePayoutResponse. | | [\YooKassa\Request\Payouts\IncomeReceiptData](../classes/YooKassa-Request-Payouts-IncomeReceiptData.md) | Класс, представляющий модель IncomeReceiptData. | | [\YooKassa\Request\Payouts\PayoutPersonalData](../classes/YooKassa-Request-Payouts-PayoutPersonalData.md) | Класс, представляющий модель PayoutPersonalData. | | [\YooKassa\Request\Payouts\PayoutResponse](../classes/YooKassa-Request-Payouts-PayoutResponse.md) | Класс, представляющий PayoutResponse. | | [\YooKassa\Request\Payouts\PayoutSelfEmployedInfo](../classes/YooKassa-Request-Payouts-PayoutSelfEmployedInfo.md) | Класс, представляющий модель PayoutSelfEmployedInfo. | | [\YooKassa\Request\Payouts\SbpBanksResponse](../classes/YooKassa-Request-Payouts-SbpBanksResponse.md) | Класс, представляющий модель SbpBanksResponse. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-request-personaldata.md000064400000003266150364342670021345 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Request\PersonalData ## Parent: [\YooKassa\Request](../namespaces/yookassa-request.md) ### Interfaces | Name | Summary | | ---- | ------- | | [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) | Interface CreatePersonalDataRequestInterface. | ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) | Класс, представляющий модель CreatePersonalDataRequest. | | [\YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md) | Класс, представляющий модель CreatePersonalDataRequestBuilder. | | [\YooKassa\Request\PersonalData\CreatePersonalDataRequestSerializer](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestSerializer.md) | Класс, представляющий модель CreatePersonalDataRequestSerializer. | | [\YooKassa\Request\PersonalData\PersonalDataResponse](../classes/YooKassa-Request-PersonalData-PersonalDataResponse.md) | Класс, представляющий модель PersonalDataResponse. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/namespaces/yookassa-request.md000064400000002603150364342670016664 0ustar00# [YooKassa API SDK](../home.md) # Namespace: \YooKassa\Request ## Parent: [\YooKassa](../namespaces/yookassa.md) ### Namespaces * [\YooKassa\Request\Deals](../namespaces/yookassa-request-deals.md) * [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) * [\YooKassa\Request\Payouts](../namespaces/yookassa-request-payouts.md) * [\YooKassa\Request\PersonalData](../namespaces/yookassa-request-personaldata.md) * [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) * [\YooKassa\Request\Refunds](../namespaces/yookassa-request-refunds.md) * [\YooKassa\Request\SelfEmployed](../namespaces/yookassa-request-selfemployed.md) * [\YooKassa\Request\Webhook](../namespaces/yookassa-request-webhook.md) ### Classes | Name | Summary | | ---- | ------- | | [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) | Абстрактный класс для объектов, содержащих список объектов-моделей в ответе на запрос. | --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-Settlement.md000064400000036026150364342670021173 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\Settlement ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Class Settlement. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Receipt-Settlement.md#property_amount) | | Размер оплаты | | public | [$type](../classes/YooKassa-Model-Receipt-Settlement.md#property_type) | | Вид оплаты в чеке | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Receipt-Settlement.md#method_getAmount) | | Возвращает размер оплаты. | | public | [getType()](../classes/YooKassa-Model-Receipt-Settlement.md#method_getType) | | Возвращает вид оплаты в чеке (cashless | prepayment | postpayment | consideration). | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Receipt-Settlement.md#method_setAmount) | | Устанавливает сумму платежа. | | public | [setType()](../classes/YooKassa-Model-Receipt-Settlement.md#method_setType) | | Устанавливает вид оплаты в чеке. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Receipt/Settlement.php](../../lib/Model/Receipt/Settlement.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Receipt\Settlement * Implements: * [\YooKassa\Model\Receipt\SettlementInterface](../classes/YooKassa-Model-Receipt-SettlementInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Размер оплаты **Type:** AmountInterface **Details:** #### public $type : string --- ***Description*** Вид оплаты в чеке **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface ```php public getAmount() : \YooKassa\Model\AmountInterface ``` **Summary** Возвращает размер оплаты. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Settlement](../classes/YooKassa-Model-Receipt-Settlement.md) **Returns:** \YooKassa\Model\AmountInterface - Размер оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает вид оплаты в чеке (cashless | prepayment | postpayment | consideration). **Details:** * Inherited From: [\YooKassa\Model\Receipt\Settlement](../classes/YooKassa-Model-Receipt-Settlement.md) **Returns:** string|null - Вид оплаты в чеке #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : void ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $value) : void ``` **Summary** Устанавливает сумму платежа. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Settlement](../classes/YooKassa-Model-Receipt-Settlement.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | value | Сумма платежа | **Returns:** void - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает вид оплаты в чеке. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Settlement](../classes/YooKassa-Model-Receipt-Settlement.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип расчета. | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodQiwi.md000064400000054613150364342670025257 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodQiwi ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodQiwi. **Description:** Оплата из кошелька QIWI Wallet. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodQiwi.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodQiwi.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodQiwi.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodQiwi * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodQiwi](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodQiwi.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesFactory.md000064400000006372150364342670032312 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesFactory ### Namespace: [\YooKassa\Request\Payments\ConfirmationAttributes](../namespaces/yookassa-request-payments-confirmationattributes.md) --- **Summary:** Класс, представляющий модель ConfirmationAttributesFactory. **Description:** Фабрика для создания подтверждения платежа. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [factory()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesFactory.md#method_factory) | | | | public | [factoryFromArray()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesFactory.md#method_factoryFromArray) | | | --- ### Details * File: [lib/Request/Payments/ConfirmationAttributes/ConfirmationAttributesFactory.php](../../lib/Request/Payments/ConfirmationAttributes/ConfirmationAttributesFactory.php) * Package: YooKassa\Request * Class Hierarchy: * \YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesFactory * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public factory() : \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes ```php public factory(string|null $type = null) : \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesFactory](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | | **Returns:** \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes - #### public factoryFromArray() : \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes ```php public factoryFromArray(array $data, string|null $type = null) : \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesFactory](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | data | | | string OR null | type | | **Returns:** \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md000064400000023136150364342670025702 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\SelfEmployed\SelfEmployedRequestBuilder ### Namespace: [\YooKassa\Request\SelfEmployed](../namespaces/yookassa-request-selfemployed.md) --- **Summary:** Класс, представляющий модель SelfEmployedRequestBuilder. **Description:** Класс билдера объектов запросов к API на создание самозанятого. --- ### Examples Пример использования билдера ```php try { $selfEmployedBuilder = \YooKassa\Request\SelfEmployed\SelfEmployedRequest::builder(); $selfEmployedBuilder ->setItn('123456789012') ->setPhone('79001002030') ->setConfirmation(['type' => \YooKassa\Model\SelfEmployed\SelfEmployedConfirmationType::REDIRECT]) ; // Создаем объект запроса $request = $selfEmployedBuilder->build(); $idempotenceKey = uniqid('', true); $response = $client->createSelfEmployed($request, $idempotenceKey); } catch (Exception $e) { $response = $e; } var_dump($response); ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$currentObject](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md#property_currentObject) | | Собираемый объект запроса. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. | | public | [build()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md#method_build) | | Строит и возвращает объект запроса для отправки в API ЮKassa. | | public | [setConfirmation()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md#method_setConfirmation) | | Устанавливает сценарий подтверждения. | | public | [setItn()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md#method_setItn) | | Устанавливает ИНН самозанятого. | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива. | | public | [setPhone()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md#method_setPhone) | | Устанавливает телефон самозанятого. | | protected | [initCurrentObject()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md#method_initCurrentObject) | | Инициализирует объект запроса, который в дальнейшем будет собираться билдером | --- ### Details * File: [lib/Request/SelfEmployed/SelfEmployedRequestBuilder.php](../../lib/Request/SelfEmployed/SelfEmployedRequestBuilder.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) * \YooKassa\Request\SelfEmployed\SelfEmployedRequestBuilder * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### protected $currentObject : ?\YooKassa\Common\AbstractRequestInterface --- **Summary** Собираемый объект запроса. **Type:** AbstractRequestInterface **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public build() : \YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface|\YooKassa\Common\AbstractRequestInterface ```php public build(null|array $options = null) : \YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface|\YooKassa\Common\AbstractRequestInterface ``` **Summary** Строит и возвращает объект запроса для отправки в API ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestBuilder](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array | options | Массив параметров для установки в объект запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidRequestException | Выбрасывается если собрать объект запроса не удалось | **Returns:** \YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface|\YooKassa\Common\AbstractRequestInterface - Инстанс объекта запроса #### public setConfirmation() : self ```php public setConfirmation(null|array|\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation $value) : self ``` **Summary** Устанавливает сценарий подтверждения. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestBuilder](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation | value | сценарий подтверждения | **Returns:** self - Инстанс билдера запросов #### public setItn() : self ```php public setItn(null|string $value) : self ``` **Summary** Устанавливает ИНН самозанятого. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestBuilder](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | value | ИНН самозанятого | **Returns:** self - Инстанс билдера запросов #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(iterable|null $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable OR null | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### public setPhone() : self ```php public setPhone(null|string $value) : self ``` **Summary** Устанавливает телефон самозанятого. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestBuilder](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | value | телефон самозанятого | **Returns:** self - Инстанс билдера запросов #### protected initCurrentObject() : \YooKassa\Request\SelfEmployed\SelfEmployedRequest ```php protected initCurrentObject() : \YooKassa\Request\SelfEmployed\SelfEmployedRequest ``` **Summary** Инициализирует объект запроса, который в дальнейшем будет собираться билдером **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestBuilder](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestBuilder.md) **Returns:** \YooKassa\Request\SelfEmployed\SelfEmployedRequest - Инстанс собираемого объекта запроса к API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentsRequest.md000064400000146460150364342670023021 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentsRequest ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель PaymentsRequest. **Description:** Класс объекта запроса к API для получения списка платежей магазина. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LIMIT_VALUE](../classes/YooKassa-Request-Payments-PaymentsRequest.md#constant_MAX_LIMIT_VALUE) | | Максимальное количество объектов платежа в выборке | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$capturedAtGt](../classes/YooKassa-Request-Payments-PaymentsRequest.md#property_capturedAtGt) | | Время подтверждения, от (не включая) | | public | [$capturedAtGte](../classes/YooKassa-Request-Payments-PaymentsRequest.md#property_capturedAtGte) | | Время подтверждения, от (включительно) | | public | [$capturedAtLt](../classes/YooKassa-Request-Payments-PaymentsRequest.md#property_capturedAtLt) | | Время подтверждения, до (не включая) | | public | [$capturedAtLte](../classes/YooKassa-Request-Payments-PaymentsRequest.md#property_capturedAtLte) | | Время подтверждения, до (включительно) | | public | [$createdAtGt](../classes/YooKassa-Request-Payments-PaymentsRequest.md#property_createdAtGt) | | Время создания, от (не включая) | | public | [$createdAtGte](../classes/YooKassa-Request-Payments-PaymentsRequest.md#property_createdAtGte) | | Время создания, от (включительно) | | public | [$createdAtLt](../classes/YooKassa-Request-Payments-PaymentsRequest.md#property_createdAtLt) | | Время создания, до (не включая) | | public | [$createdAtLte](../classes/YooKassa-Request-Payments-PaymentsRequest.md#property_createdAtLte) | | Время создания, до (включительно) | | public | [$cursor](../classes/YooKassa-Request-Payments-PaymentsRequest.md#property_cursor) | | Страница выдачи результатов, которую необходимо отобразить | | public | [$limit](../classes/YooKassa-Request-Payments-PaymentsRequest.md#property_limit) | | Ограничение количества объектов платежа, отображаемых на одной странице выдачи | | public | [$paymentMethod](../classes/YooKassa-Request-Payments-PaymentsRequest.md#property_paymentMethod) | | Платежный метод | | public | [$status](../classes/YooKassa-Request-Payments-PaymentsRequest.md#property_status) | | Статус платежа | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [builder()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_builder) | | Возвращает инстанс билдера объектов запросов списка платежей магазина. | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCapturedAtGt()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_getCapturedAtGt) | | Возвращает дату подтверждения от которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCapturedAtGte()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_getCapturedAtGte) | | Возвращает дату подтверждения от которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCapturedAtLt()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_getCapturedAtLt) | | Возвращает дату подтверждения до которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCapturedAtLte()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_getCapturedAtLte) | | Возвращает дату подтверждения до которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCreatedAtGt()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_getCreatedAtGt) | | Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCreatedAtGte()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_getCreatedAtGte) | | Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCreatedAtLt()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_getCreatedAtLt) | | Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCreatedAtLte()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_getCreatedAtLte) | | Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCursor()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_getCursor) | | Страница выдачи результатов, которую необходимо отобразить. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [getLimit()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_getLimit) | | Ограничение количества объектов платежа. | | public | [getPaymentMethod()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_getPaymentMethod) | | Возвращает платежный метод выбираемых платежей или null, если он до этого не был установлен. | | public | [getStatus()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_getStatus) | | Возвращает статус выбираемых платежей или null, если он до этого не был установлен. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasCapturedAtGt()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_hasCapturedAtGt) | | Проверяет, была ли установлена дата подтверждения от которой выбираются платежи. | | public | [hasCapturedAtGte()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_hasCapturedAtGte) | | Проверяет, была ли установлена дата подтверждения от которой выбираются платежи. | | public | [hasCapturedAtLt()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_hasCapturedAtLt) | | Проверяет, была ли установлена дата подтверждения до которой выбираются платежи. | | public | [hasCapturedAtLte()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_hasCapturedAtLte) | | Проверяет, была ли установлена дата подтверждения до которой выбираются платежи. | | public | [hasCreatedAtGt()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_hasCreatedAtGt) | | Проверяет, была ли установлена дата создания от которой выбираются платежи. | | public | [hasCreatedAtGte()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_hasCreatedAtGte) | | Проверяет, была ли установлена дата создания от которой выбираются платежи. | | public | [hasCreatedAtLt()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_hasCreatedAtLt) | | Проверяет, была ли установлена дата создания до которой выбираются платежи. | | public | [hasCreatedAtLte()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_hasCreatedAtLte) | | Проверяет, была ли установлена дата создания до которой выбираются платежи. | | public | [hasCursor()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_hasCursor) | | Проверяет, была ли установлена страница выдачи результатов, которую необходимо отобразить. | | public | [hasLimit()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_hasLimit) | | Проверяет, было ли установлено ограничение количества объектов платежа. | | public | [hasPaymentMethod()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_hasPaymentMethod) | | Проверяет, был ли установлен платежный метод выбираемых платежей. | | public | [hasStatus()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_hasStatus) | | Проверяет, был ли установлен статус выбираемых платежей. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCapturedAtGt()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_setCapturedAtGt) | | Устанавливает дату подтверждения от которой выбираются платежи. | | public | [setCapturedAtGte()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_setCapturedAtGte) | | Устанавливает дату подтверждения от которой выбираются платежи. | | public | [setCapturedAtLt()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_setCapturedAtLt) | | Устанавливает дату подтверждения до которой выбираются платежи. | | public | [setCapturedAtLte()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_setCapturedAtLte) | | Устанавливает дату подтверждения до которой выбираются платежи. | | public | [setCreatedAtGt()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_setCreatedAtGt) | | Устанавливает дату создания от которой выбираются платежи. | | public | [setCreatedAtGte()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_setCreatedAtGte) | | Устанавливает дату создания от которой выбираются платежи. | | public | [setCreatedAtLt()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_setCreatedAtLt) | | Устанавливает дату создания до которой выбираются платежи. | | public | [setCreatedAtLte()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_setCreatedAtLte) | | Устанавливает дату создания до которой выбираются платежи. | | public | [setCursor()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_setCursor) | | Устанавливает страницу выдачи результатов, которую необходимо отобразить | | public | [setLimit()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_setLimit) | | Устанавливает ограничение количества объектов платежа. | | public | [setPaymentMethod()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_setPaymentMethod) | | Устанавливает платежный метод выбираемых платежей. | | public | [setStatus()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_setStatus) | | Устанавливает статус выбираемых платежей. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | public | [validate()](../classes/YooKassa-Request-Payments-PaymentsRequest.md#method_validate) | | Проверяет валидность текущего объекта запроса. | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_setValidationError) | | Устанавливает ошибку валидации. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentsRequest.php](../../lib/Request/Payments/PaymentsRequest.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) * \YooKassa\Request\Payments\PaymentsRequest * Implements: * [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LIMIT_VALUE Максимальное количество объектов платежа в выборке ```php MAX_LIMIT_VALUE = 100 ``` --- ## Properties #### public $capturedAtGt : null|\DateTime --- ***Description*** Время подтверждения, от (не включая) **Type:** DateTime **Details:** #### public $capturedAtGte : null|\DateTime --- ***Description*** Время подтверждения, от (включительно) **Type:** DateTime **Details:** #### public $capturedAtLt : null|\DateTime --- ***Description*** Время подтверждения, до (не включая) **Type:** DateTime **Details:** #### public $capturedAtLte : null|\DateTime --- ***Description*** Время подтверждения, до (включительно) **Type:** DateTime **Details:** #### public $createdAtGt : null|\DateTime --- ***Description*** Время создания, от (не включая) **Type:** DateTime **Details:** #### public $createdAtGte : null|\DateTime --- ***Description*** Время создания, от (включительно) **Type:** DateTime **Details:** #### public $createdAtLt : null|\DateTime --- ***Description*** Время создания, до (не включая) **Type:** DateTime **Details:** #### public $createdAtLte : null|\DateTime --- ***Description*** Время создания, до (включительно) **Type:** DateTime **Details:** #### public $cursor : null|string --- ***Description*** Страница выдачи результатов, которую необходимо отобразить **Type:** null|string **Details:** #### public $limit : null|int --- ***Description*** Ограничение количества объектов платежа, отображаемых на одной странице выдачи **Type:** null|int **Details:** #### public $paymentMethod : null|string --- ***Description*** Платежный метод **Type:** null|string **Details:** #### public $status : null|string --- ***Description*** Статус платежа **Type:** null|string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public builder() : \YooKassa\Request\Payments\PaymentsRequestBuilder ```php Static public builder() : \YooKassa\Request\Payments\PaymentsRequestBuilder ``` **Summary** Возвращает инстанс билдера объектов запросов списка платежей магазина. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** \YooKassa\Request\Payments\PaymentsRequestBuilder - Билдер объектов запросов списка платежей #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCapturedAtGt() : null|\DateTime ```php public getCapturedAtGt() : null|\DateTime ``` **Summary** Возвращает дату подтверждения от которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** null|\DateTime - Время подтверждения, от (не включая) #### public getCapturedAtGte() : null|\DateTime ```php public getCapturedAtGte() : null|\DateTime ``` **Summary** Возвращает дату подтверждения от которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** null|\DateTime - Время подтверждения, от (включительно) #### public getCapturedAtLt() : null|\DateTime ```php public getCapturedAtLt() : null|\DateTime ``` **Summary** Возвращает дату подтверждения до которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** null|\DateTime - Время подтверждения, до (не включая) #### public getCapturedAtLte() : null|\DateTime ```php public getCapturedAtLte() : null|\DateTime ``` **Summary** Возвращает дату подтверждения до которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** null|\DateTime - Время подтверждения, до (включительно) #### public getCreatedAtGt() : null|\DateTime ```php public getCreatedAtGt() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** null|\DateTime - Время создания, от (не включая) #### public getCreatedAtGte() : null|\DateTime ```php public getCreatedAtGte() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** null|\DateTime - Время создания, от (включительно) #### public getCreatedAtLt() : null|\DateTime ```php public getCreatedAtLt() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** null|\DateTime - Время создания, до (не включая) #### public getCreatedAtLte() : null|\DateTime ```php public getCreatedAtLte() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** null|\DateTime - Время создания, до (включительно) #### public getCursor() : null|string ```php public getCursor() : null|string ``` **Summary** Страница выдачи результатов, которую необходимо отобразить. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** null|string - Страница выдачи результатов #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string|null - Последняя произошедшая ошибка валидации #### public getLimit() : null|int ```php public getLimit() : null|int ``` **Summary** Ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** null|int - Ограничение количества объектов платежа #### public getPaymentMethod() : null|string ```php public getPaymentMethod() : null|string ``` **Summary** Возвращает платежный метод выбираемых платежей или null, если он до этого не был установлен. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** null|string - Платежный метод выбираемых платежей #### public getStatus() : null|string ```php public getStatus() : null|string ``` **Summary** Возвращает статус выбираемых платежей или null, если он до этого не был установлен. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** null|string - Статус выбираемых платежей #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasCapturedAtGt() : bool ```php public hasCapturedAtGt() : bool ``` **Summary** Проверяет, была ли установлена дата подтверждения от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCapturedAtGte() : bool ```php public hasCapturedAtGte() : bool ``` **Summary** Проверяет, была ли установлена дата подтверждения от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCapturedAtLt() : bool ```php public hasCapturedAtLt() : bool ``` **Summary** Проверяет, была ли установлена дата подтверждения до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCapturedAtLte() : bool ```php public hasCapturedAtLte() : bool ``` **Summary** Проверяет, была ли установлена дата подтверждения до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCreatedAtGt() : bool ```php public hasCreatedAtGt() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCreatedAtGte() : bool ```php public hasCreatedAtGte() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCreatedAtLt() : bool ```php public hasCreatedAtLt() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCreatedAtLte() : bool ```php public hasCreatedAtLte() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCursor() : bool ```php public hasCursor() : bool ``` **Summary** Проверяет, была ли установлена страница выдачи результатов, которую необходимо отобразить. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** bool - True если была установлена, false если нет #### public hasLimit() : bool ```php public hasLimit() : bool ``` **Summary** Проверяет, было ли установлено ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** bool - True если было установлено, false если нет #### public hasPaymentMethod() : bool ```php public hasPaymentMethod() : bool ``` **Summary** Проверяет, был ли установлен платежный метод выбираемых платежей. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** bool - True если платежный метод был установлен, false если нет #### public hasStatus() : bool ```php public hasStatus() : bool ``` **Summary** Проверяет, был ли установлен статус выбираемых платежей. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** bool - True если статус был установлен, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCapturedAtGt() : self ```php public setCapturedAtGt(null|\DateTime|int|string $captured_at_gt) : self ``` **Summary** Устанавливает дату подтверждения от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | captured_at_gt | Время подтверждения, от (не включая) или null, чтобы удалить значение | **Returns:** self - #### public setCapturedAtGte() : self ```php public setCapturedAtGte(null|\DateTime|int|string $captured_at_gte) : self ``` **Summary** Устанавливает дату подтверждения от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | captured_at_gte | Время подтверждения, от (включительно) или null, чтобы удалить значение | **Returns:** self - #### public setCapturedAtLt() : self ```php public setCapturedAtLt(null|\DateTime|int|string $captured_at_lt) : self ``` **Summary** Устанавливает дату подтверждения до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | captured_at_lt | Время подтверждения, до (не включая) или null, чтобы удалить значение | **Returns:** self - #### public setCapturedAtLte() : self ```php public setCapturedAtLte(null|\DateTime|int|string $captured_at_lte) : self ``` **Summary** Устанавливает дату подтверждения до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | captured_at_lte | Время подтверждения, до (включительно) или null, чтобы удалить значение | **Returns:** self - #### public setCreatedAtGt() : self ```php public setCreatedAtGt(null|\DateTime|int|string $created_at_gt) : self ``` **Summary** Устанавливает дату создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | created_at_gt | Время создания, от (не включая) или null, чтобы удалить значение | **Returns:** self - #### public setCreatedAtGte() : self ```php public setCreatedAtGte(\DateTime|string|null $_created_at_gte = null) : self ``` **Summary** Устанавливает дату создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | _created_at_gte | Время создания, от (включительно) или null, чтобы удалить значение | **Returns:** self - #### public setCreatedAtLt() : self ```php public setCreatedAtLt(null|\DateTime|int|string $created_at_lt) : self ``` **Summary** Устанавливает дату создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | created_at_lt | Время создания, до (не включая) или null, чтобы удалить значение | **Returns:** self - #### public setCreatedAtLte() : self ```php public setCreatedAtLte(null|\DateTime|int|string $created_at_lte) : self ``` **Summary** Устанавливает дату создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | created_at_lte | Время создания, до (включительно) или null, чтобы удалить значение | **Returns:** self - #### public setCursor() : self ```php public setCursor(string|null $cursor) : self ``` **Summary** Устанавливает страницу выдачи результатов, которую необходимо отобразить **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | cursor | Страница выдачи результатов или null, чтобы удалить значение | **Returns:** self - #### public setLimit() : self ```php public setLimit(null|int|string $limit) : self ``` **Summary** Устанавливает ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR int OR string | limit | Ограничение количества объектов платежа или null, чтобы удалить значение | **Returns:** self - #### public setPaymentMethod() : self ```php public setPaymentMethod(string|null $payment_method) : self ``` **Summary** Устанавливает платежный метод выбираемых платежей. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_method | Платежный метод выбираемых платежей или null, чтобы удалить значение | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status) : self ``` **Summary** Устанавливает статус выбираемых платежей. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус выбираемых платежей или null, чтобы удалить значение | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public validate() : bool ```php public validate() : bool ``` **Summary** Проверяет валидность текущего объекта запроса. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequest](../classes/YooKassa-Request-Payments-PaymentsRequest.md) **Returns:** bool - True если объект валиден, false если нет #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setValidationError() : void ```php protected setValidationError(string $value) : void ``` **Summary** Устанавливает ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** void - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesQr.md000064400000046117150364342670031266 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesQr ### Namespace: [\YooKassa\Request\Payments\ConfirmationAttributes](../namespaces/yookassa-request-payments-confirmationattributes.md) --- **Summary:** Класс, представляющий модель ConfirmationAttributesQr. **Description:** Сценарий при котором пользователю необходимо просканировать QR-код. От вас требуется сгенерировать QR-код, используя любой доступный инструмент, и отобразить его на странице оплаты. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesQr.md#property_locale) | | Язык интерфейса, писем и смс, которые будет видеть или получать пользователь | | public | [$locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property_locale) | | Язык интерфейса, писем и смс, которые будет видеть или получать пользователь | | public | [$type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesQr.md#property_type) | | Код сценария подтверждения | | public | [$type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property_type) | | Код сценария подтверждения | | protected | [$_locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property__locale) | | | | protected | [$_type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesQr.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getLocale()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_getLocale) | | Возвращает язык интерфейса, писем и смс | | public | [getType()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_getType) | | Возвращает код сценария подтверждения | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setLocale()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_setLocale) | | Устанавливает язык интерфейса, писем и смс | | public | [setType()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_setType) | | Устанавливает код сценария подтверждения. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/ConfirmationAttributes/ConfirmationAttributesQr.php](../../lib/Request/Payments/ConfirmationAttributes/ConfirmationAttributesQr.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) * \YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesQr * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $locale : string --- ***Description*** Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Type:** string **Details:** #### public $locale : string --- ***Description*** Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### public $type : string --- ***Description*** Код сценария подтверждения **Type:** string **Details:** #### public $type : string --- ***Description*** Код сценария подтверждения **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### protected $_locale : ?string --- **Type:** ?string Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### protected $_type : ?string --- **Type:** ?string Код сценария подтверждения **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesQr](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesQr.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getLocale() : string|null ```php public getLocale() : string|null ``` **Summary** Возвращает язык интерфейса, писем и смс **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) **Returns:** string|null - Язык интерфейса, писем и смс #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает код сценария подтверждения **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) **Returns:** string|null - Код сценария подтверждения #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setLocale() : self ```php public setLocale(string|null $locale = null) : self ``` **Summary** Устанавливает язык интерфейса, писем и смс **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | locale | Язык интерфейса, писем и смс | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает код сценария подтверждения. **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Код сценария подтверждения | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-PayoutDestinationSbp.md000064400000054106150364342670023064 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payout\PayoutDestinationSbp ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель PayoutToSbpDestination. **Description:** Данные для выплаты через СБП на счет в банке или платежном сервисе. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_BANK_ID](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md#constant_MAX_LENGTH_BANK_ID) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$bank_id](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md#property_bank_id) | | Идентификатор выбранного участника СБП — банка или платежного сервиса, подключенного к сервису | | public | [$bankId](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md#property_bankId) | | Идентификатор выбранного участника СБП — банка или платежного сервиса, подключенного к сервису | | public | [$phone](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md#property_phone) | | Телефон, к которому привязан счет получателя выплаты в системе участника СБП | | public | [$recipient_checked](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md#property_recipient_checked) | | Проверка получателя выплаты | | public | [$recipientChecked](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md#property_recipientChecked) | | Проверка получателя выплаты | | public | [$type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property__type) | | Тип метода оплаты | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md#method___construct) | | Конструктор PayoutDestinationSbp. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getBankId()](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md#method_getBankId) | | Возвращает идентификатор выбранного участника СБП. | | public | [getPhone()](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md#method_getPhone) | | Возвращает телефон, к которому привязан счет получателя выплаты в системе участника СБП. | | public | [getRecipientChecked()](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md#method_getRecipientChecked) | | Возвращает признак проверки получателя выплаты. | | public | [getType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setBankId()](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md#method_setBankId) | | Устанавливает идентификатор выбранного участника СБП. | | public | [setPhone()](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md#method_setPhone) | | Устанавливает телефон, к которому привязан счет получателя выплаты в системе участника СБП. | | public | [setRecipientChecked()](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md#method_setRecipientChecked) | | Устанавливает признак проверки получателя выплаты. | | public | [setType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_setType) | | Устанавливает тип метода оплаты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payout/PayoutDestinationSbp.php](../../lib/Model/Payout/PayoutDestinationSbp.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) * \YooKassa\Model\Payout\PayoutDestinationSbp * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_BANK_ID ```php MAX_LENGTH_BANK_ID = 12 : int ``` --- ## Properties #### public $bank_id : string --- ***Description*** Идентификатор выбранного участника СБП — банка или платежного сервиса, подключенного к сервису **Type:** string **Details:** #### public $bankId : string --- ***Description*** Идентификатор выбранного участника СБП — банка или платежного сервиса, подключенного к сервису **Type:** string **Details:** #### public $phone : string --- ***Description*** Телефон, к которому привязан счет получателя выплаты в системе участника СБП **Type:** string **Details:** #### public $recipient_checked : string --- ***Description*** Проверка получателя выплаты **Type:** string **Details:** #### public $recipientChecked : string --- ***Description*** Проверка получателя выплаты **Type:** string **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) #### protected $_type : ?string --- **Summary** Тип метода оплаты **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** Конструктор PayoutDestinationSbp. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationSbp](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getBankId() : string|null ```php public getBankId() : string|null ``` **Summary** Возвращает идентификатор выбранного участника СБП. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationSbp](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md) **Returns:** string|null - Идентификатор выбранного участника СБП #### public getPhone() : string|null ```php public getPhone() : string|null ``` **Summary** Возвращает телефон, к которому привязан счет получателя выплаты в системе участника СБП. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationSbp](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md) **Returns:** string|null - Телефон, к которому привязан счет получателя выплаты в системе участника СБП #### public getRecipientChecked() : bool|null ```php public getRecipientChecked() : bool|null ``` **Summary** Возвращает признак проверки получателя выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationSbp](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md) **Returns:** bool|null - Признак проверки получателя выплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setBankId() : self ```php public setBankId(string|null $bank_id = null) : self ``` **Summary** Устанавливает идентификатор выбранного участника СБП. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationSbp](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | bank_id | Идентификатор выбранного участника СБП | **Returns:** self - #### public setPhone() : self ```php public setPhone(string|null $phone = null) : self ``` **Summary** Устанавливает телефон, к которому привязан счет получателя выплаты в системе участника СБП. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationSbp](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | phone | Телефон, к которому привязан счет получателя выплаты в системе участника СБП | **Returns:** self - #### public setRecipientChecked() : self ```php public setRecipientChecked(bool|null $recipient_checked = null) : self ``` **Summary** Устанавливает признак проверки получателя выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationSbp](../classes/YooKassa-Model-Payout-PayoutDestinationSbp.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | recipient_checked | Признак проверки получателя выплаты | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Deals-DealsRequest.md000064400000147012150364342670021473 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Deals\DealsRequest ### Namespace: [\YooKassa\Request\Deals](../namespaces/yookassa-request-deals.md) --- **Summary:** Класс, представляющий модель DealsRequest. **Description:** Класс объекта запроса к API для получения списка сделок магазина. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LIMIT_VALUE](../classes/YooKassa-Request-Deals-DealsRequest.md#constant_MAX_LIMIT_VALUE) | | | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Request-Deals-DealsRequest.md#constant_MAX_LENGTH_DESCRIPTION) | | | | public | [MIN_LENGTH_DESCRIPTION](../classes/YooKassa-Request-Deals-DealsRequest.md#constant_MIN_LENGTH_DESCRIPTION) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$createdAtGt](../classes/YooKassa-Request-Deals-DealsRequest.md#property_createdAtGt) | | Время создания, от (не включая) | | public | [$createdAtGte](../classes/YooKassa-Request-Deals-DealsRequest.md#property_createdAtGte) | | Время создания, от (включительно) | | public | [$createdAtLt](../classes/YooKassa-Request-Deals-DealsRequest.md#property_createdAtLt) | | Время создания, до (не включая) | | public | [$createdAtLte](../classes/YooKassa-Request-Deals-DealsRequest.md#property_createdAtLte) | | Время создания, до (включительно) | | public | [$cursor](../classes/YooKassa-Request-Deals-DealsRequest.md#property_cursor) | | Страница выдачи результатов, которую необходимо отобразить | | public | [$expiresAtGt](../classes/YooKassa-Request-Deals-DealsRequest.md#property_expiresAtGt) | | Время автоматического закрытия, от (не включая) | | public | [$expiresAtGte](../classes/YooKassa-Request-Deals-DealsRequest.md#property_expiresAtGte) | | Время автоматического закрытия, от (включительно) | | public | [$expiresAtLt](../classes/YooKassa-Request-Deals-DealsRequest.md#property_expiresAtLt) | | Время автоматического закрытия, до (не включая) | | public | [$expiresAtLte](../classes/YooKassa-Request-Deals-DealsRequest.md#property_expiresAtLte) | | Время автоматического закрытия, до (включительно) | | public | [$fullTextSearch](../classes/YooKassa-Request-Deals-DealsRequest.md#property_fullTextSearch) | | Фильтр по описанию сделки — параметру description | | public | [$limit](../classes/YooKassa-Request-Deals-DealsRequest.md#property_limit) | | Ограничение количества объектов платежа, отображаемых на одной странице выдачи | | public | [$status](../classes/YooKassa-Request-Deals-DealsRequest.md#property_status) | | Статус платежа | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [builder()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_builder) | | Возвращает инстанс билдера объектов запросов списка сделок магазина. | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCreatedAtGt()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_getCreatedAtGt) | | Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCreatedAtGte()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_getCreatedAtGte) | | Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCreatedAtLt()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_getCreatedAtLt) | | Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCreatedAtLte()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_getCreatedAtLte) | | Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCursor()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_getCursor) | | Страница выдачи результатов, которую необходимо отобразить. | | public | [getExpiresAtGt()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_getExpiresAtGt) | | Возвращает дату автоматического закрытия от которой будут возвращены платежи или null, если дата не была установлена. | | public | [getExpiresAtGte()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_getExpiresAtGte) | | Возвращает дату автоматического закрытия от которой будут возвращены платежи или null, если дата не была установлена. | | public | [getExpiresAtLt()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_getExpiresAtLt) | | Возвращает дату автоматического закрытия до которой будут возвращены платежи или null, если дата не была установлена. | | public | [getExpiresAtLte()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_getExpiresAtLte) | | Возвращает дату автоматического закрытия до которой будут возвращены платежи или null, если дата не была установлена. | | public | [getFullTextSearch()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_getFullTextSearch) | | Возвращает фильтр по описанию выбираемых сделок или null, если он до этого не был установлен. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [getLimit()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_getLimit) | | Ограничение количества объектов платежа. | | public | [getStatus()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_getStatus) | | Возвращает статус выбираемых сделок или null, если он до этого не был установлен. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasCreatedAtGt()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_hasCreatedAtGt) | | Проверяет, была ли установлена дата создания от которой выбираются платежи. | | public | [hasCreatedAtGte()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_hasCreatedAtGte) | | Проверяет, была ли установлена дата создания от которой выбираются платежи. | | public | [hasCreatedAtLt()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_hasCreatedAtLt) | | Проверяет, была ли установлена дата создания до которой выбираются платежи. | | public | [hasCreatedAtLte()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_hasCreatedAtLte) | | Проверяет, была ли установлена дата создания до которой выбираются платежи. | | public | [hasCursor()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_hasCursor) | | Проверяет, была ли установлена страница выдачи результатов, которую необходимо отобразить. | | public | [hasExpiresAtGt()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_hasExpiresAtGt) | | Проверяет, была ли установлена дата автоматического закрытия от которой выбираются платежи. | | public | [hasExpiresAtGte()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_hasExpiresAtGte) | | Проверяет, была ли установлена дата автоматического закрытия от которой выбираются платежи. | | public | [hasExpiresAtLt()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_hasExpiresAtLt) | | Проверяет, была ли установлена дата автоматического закрытия до которой выбираются платежи. | | public | [hasExpiresAtLte()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_hasExpiresAtLte) | | Проверяет, была ли установлена дата автоматического закрытия до которой выбираются платежи. | | public | [hasFullTextSearch()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_hasFullTextSearch) | | Проверяет, был ли установлен фильтр по описанию выбираемых сделок. | | public | [hasLimit()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_hasLimit) | | Проверяет, было ли установлено ограничение количества объектов платежа. | | public | [hasStatus()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_hasStatus) | | Проверяет, был ли установлен статус выбираемых сделок. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCreatedAtGt()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_setCreatedAtGt) | | Устанавливает дату создания от которой выбираются платежи. | | public | [setCreatedAtGte()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_setCreatedAtGte) | | Устанавливает дату создания от которой выбираются платежи. | | public | [setCreatedAtLt()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_setCreatedAtLt) | | Устанавливает дату создания до которой выбираются платежи. | | public | [setCreatedAtLte()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_setCreatedAtLte) | | Устанавливает дату создания до которой выбираются платежи. | | public | [setCursor()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_setCursor) | | Устанавливает страницу выдачи результатов, которую необходимо отобразить. | | public | [setExpiresAtGt()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_setExpiresAtGt) | | Устанавливает дату автоматического закрытия от которой выбираются платежи. | | public | [setExpiresAtGte()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_setExpiresAtGte) | | Устанавливает дату автоматического закрытия от которой выбираются платежи. | | public | [setExpiresAtLt()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_setExpiresAtLt) | | Устанавливает дату автоматического закрытия до которой выбираются платежи. | | public | [setExpiresAtLte()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_setExpiresAtLte) | | Устанавливает дату автоматического закрытия до которой выбираются платежи. | | public | [setFullTextSearch()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_setFullTextSearch) | | Устанавливает фильтр по описанию выбираемых сделок. | | public | [setLimit()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_setLimit) | | Устанавливает ограничение количества объектов платежа. | | public | [setStatus()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_setStatus) | | Устанавливает статус выбираемых сделок. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | public | [validate()](../classes/YooKassa-Request-Deals-DealsRequest.md#method_validate) | | Проверяет валидность текущего объекта запроса. | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_setValidationError) | | Устанавливает ошибку валидации. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Deals/DealsRequest.php](../../lib/Request/Deals/DealsRequest.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) * \YooKassa\Request\Deals\DealsRequest * Implements: * [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LIMIT_VALUE ```php MAX_LIMIT_VALUE = 100 : int ``` ###### MAX_LENGTH_DESCRIPTION ```php MAX_LENGTH_DESCRIPTION = 128 : int ``` ###### MIN_LENGTH_DESCRIPTION ```php MIN_LENGTH_DESCRIPTION = 4 : int ``` --- ## Properties #### public $createdAtGt : null|\DateTime --- ***Description*** Время создания, от (не включая) **Type:** DateTime **Details:** #### public $createdAtGte : null|\DateTime --- ***Description*** Время создания, от (включительно) **Type:** DateTime **Details:** #### public $createdAtLt : null|\DateTime --- ***Description*** Время создания, до (не включая) **Type:** DateTime **Details:** #### public $createdAtLte : null|\DateTime --- ***Description*** Время создания, до (включительно) **Type:** DateTime **Details:** #### public $cursor : null|string --- ***Description*** Страница выдачи результатов, которую необходимо отобразить **Type:** null|string **Details:** #### public $expiresAtGt : null|\DateTime --- ***Description*** Время автоматического закрытия, от (не включая) **Type:** DateTime **Details:** #### public $expiresAtGte : null|\DateTime --- ***Description*** Время автоматического закрытия, от (включительно) **Type:** DateTime **Details:** #### public $expiresAtLt : null|\DateTime --- ***Description*** Время автоматического закрытия, до (не включая) **Type:** DateTime **Details:** #### public $expiresAtLte : null|\DateTime --- ***Description*** Время автоматического закрытия, до (включительно) **Type:** DateTime **Details:** #### public $fullTextSearch : null|string --- ***Description*** Фильтр по описанию сделки — параметру description **Type:** null|string **Details:** #### public $limit : null|int --- ***Description*** Ограничение количества объектов платежа, отображаемых на одной странице выдачи **Type:** null|int **Details:** #### public $status : null|string --- ***Description*** Статус платежа **Type:** null|string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public builder() : \YooKassa\Request\Deals\DealsRequestBuilder ```php Static public builder() : \YooKassa\Request\Deals\DealsRequestBuilder ``` **Summary** Возвращает инстанс билдера объектов запросов списка сделок магазина. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** \YooKassa\Request\Deals\DealsRequestBuilder - Билдер объектов запросов списка сделок #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCreatedAtGt() : null|\DateTime ```php public getCreatedAtGt() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** null|\DateTime - Время создания, от (не включая) #### public getCreatedAtGte() : null|\DateTime ```php public getCreatedAtGte() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** null|\DateTime - Время создания, от (включительно) #### public getCreatedAtLt() : null|\DateTime ```php public getCreatedAtLt() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** null|\DateTime - Время создания, до (не включая) #### public getCreatedAtLte() : null|\DateTime ```php public getCreatedAtLte() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** null|\DateTime - Время создания, до (включительно) #### public getCursor() : string|null ```php public getCursor() : string|null ``` **Summary** Страница выдачи результатов, которую необходимо отобразить. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** string|null - #### public getExpiresAtGt() : null|\DateTime ```php public getExpiresAtGt() : null|\DateTime ``` **Summary** Возвращает дату автоматического закрытия от которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** null|\DateTime - Время автоматического закрытия, от (не включая) #### public getExpiresAtGte() : null|\DateTime ```php public getExpiresAtGte() : null|\DateTime ``` **Summary** Возвращает дату автоматического закрытия от которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** null|\DateTime - Время автоматического закрытия, от (включительно) #### public getExpiresAtLt() : null|\DateTime ```php public getExpiresAtLt() : null|\DateTime ``` **Summary** Возвращает дату автоматического закрытия до которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** null|\DateTime - Время автоматического закрытия, до (не включая) #### public getExpiresAtLte() : null|\DateTime ```php public getExpiresAtLte() : null|\DateTime ``` **Summary** Возвращает дату автоматического закрытия до которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** null|\DateTime - Время автоматического закрытия, до (включительно) #### public getFullTextSearch() : null|string ```php public getFullTextSearch() : null|string ``` **Summary** Возвращает фильтр по описанию выбираемых сделок или null, если он до этого не был установлен. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** null|string - Фильтр по описанию выбираемых сделок #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string|null - Последняя произошедшая ошибка валидации #### public getLimit() : null|int ```php public getLimit() : null|int ``` **Summary** Ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** null|int - Ограничение количества объектов платежа #### public getStatus() : null|string ```php public getStatus() : null|string ``` **Summary** Возвращает статус выбираемых сделок или null, если он до этого не был установлен. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** null|string - Статус выбираемых сделок #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasCreatedAtGt() : bool ```php public hasCreatedAtGt() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCreatedAtGte() : bool ```php public hasCreatedAtGte() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCreatedAtLt() : bool ```php public hasCreatedAtLt() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCreatedAtLte() : bool ```php public hasCreatedAtLte() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCursor() : bool ```php public hasCursor() : bool ``` **Summary** Проверяет, была ли установлена страница выдачи результатов, которую необходимо отобразить. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** bool - True если была установлена, false если нет #### public hasExpiresAtGt() : bool ```php public hasExpiresAtGt() : bool ``` **Summary** Проверяет, была ли установлена дата автоматического закрытия от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasExpiresAtGte() : bool ```php public hasExpiresAtGte() : bool ``` **Summary** Проверяет, была ли установлена дата автоматического закрытия от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasExpiresAtLt() : bool ```php public hasExpiresAtLt() : bool ``` **Summary** Проверяет, была ли установлена дата автоматического закрытия до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasExpiresAtLte() : bool ```php public hasExpiresAtLte() : bool ``` **Summary** Проверяет, была ли установлена дата автоматического закрытия до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasFullTextSearch() : bool ```php public hasFullTextSearch() : bool ``` **Summary** Проверяет, был ли установлен фильтр по описанию выбираемых сделок. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** bool - True если фильтр по описанию был установлен, false если нет #### public hasLimit() : bool ```php public hasLimit() : bool ``` **Summary** Проверяет, было ли установлено ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** bool - True если было установлено, false если нет #### public hasStatus() : bool ```php public hasStatus() : bool ``` **Summary** Проверяет, был ли установлен статус выбираемых сделок. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** bool - True если статус был установлен, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCreatedAtGt() : self ```php public setCreatedAtGt(\DateTime|string|null $created_at_gt) : self ``` **Summary** Устанавливает дату создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at_gt | Время создания, от (не включая) или null, чтобы удалить значение | **Returns:** self - #### public setCreatedAtGte() : self ```php public setCreatedAtGte(\DateTime|string|null $created_at_gte) : self ``` **Summary** Устанавливает дату создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at_gte | Время создания, от (включительно) или null, чтобы удалить значение | **Returns:** self - #### public setCreatedAtLt() : self ```php public setCreatedAtLt(\DateTime|string|null $created_at_lt) : self ``` **Summary** Устанавливает дату создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at_lt | Время создания, до (не включая) или null, чтобы удалить значение | **Returns:** self - #### public setCreatedAtLte() : self ```php public setCreatedAtLte(\DateTime|string|null $created_at_lte) : self ``` **Summary** Устанавливает дату создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at_lte | Время создания, до (включительно) или null, чтобы удалить значение | **Returns:** self - #### public setCursor() : self ```php public setCursor(string|null $cursor) : self ``` **Summary** Устанавливает страницу выдачи результатов, которую необходимо отобразить. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | cursor | Страница выдачи результатов или null, чтобы удалить значение | **Returns:** self - #### public setExpiresAtGt() : self ```php public setExpiresAtGt(\DateTime|string|null $expires_at_lt) : self ``` **Summary** Устанавливает дату автоматического закрытия от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at_lt | Время автоматического закрытия, от (не включая) или null, чтобы удалить значение | **Returns:** self - #### public setExpiresAtGte() : self ```php public setExpiresAtGte(\DateTime|string|null $expires_at_gte) : self ``` **Summary** Устанавливает дату автоматического закрытия от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at_gte | Время автоматического закрытия, от (включительно) или null, чтобы удалить значение | **Returns:** self - #### public setExpiresAtLt() : self ```php public setExpiresAtLt(\DateTime|string|null $expires_at_lt) : self ``` **Summary** Устанавливает дату автоматического закрытия до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at_lt | Время автоматического закрытия, до (не включая) или null, чтобы удалить значение | **Returns:** self - #### public setExpiresAtLte() : self ```php public setExpiresAtLte(\DateTime|string|null $expires_at_lte) : self ``` **Summary** Устанавливает дату автоматического закрытия до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at_lte | Время автоматического закрытия, до (включительно) или null, чтобы удалить значение | **Returns:** self - #### public setFullTextSearch() : self ```php public setFullTextSearch(string|null $full_text_search) : self ``` **Summary** Устанавливает фильтр по описанию выбираемых сделок. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | full_text_search | Фильтр по описанию выбираемых сделок или null, чтобы удалить значение | **Returns:** self - #### public setLimit() : self ```php public setLimit(null|int $limit) : self ``` **Summary** Устанавливает ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR int | limit | Ограничение количества объектов платежа или null, чтобы удалить значение | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status) : self ``` **Summary** Устанавливает статус выбираемых сделок. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус выбираемых сделок или null, чтобы удалить значение | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public validate() : bool ```php public validate() : bool ``` **Summary** Проверяет валидность текущего объекта запроса. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequest](../classes/YooKassa-Request-Deals-DealsRequest.md) **Returns:** bool - True если объект валиден, false если нет #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setValidationError() : void ```php protected setValidationError(string $value) : void ``` **Summary** Устанавливает ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** void - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyclasses/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md000064400000055321150364342670034274 0ustar00yookassa-sdk-php/docs# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesMobileApplication ### Namespace: [\YooKassa\Request\Payments\ConfirmationAttributes](../namespaces/yookassa-request-payments-confirmationattributes.md) --- **Summary:** Класс, представляющий модель ConfirmationAttributesMobileApplication. **Description:** Сценарий при котором для подтверждения платежа пользователю необходимо совершить действия в мобильном приложении (например, в приложении интернет-банка). Вам нужно перенаправить пользователя на confirmation_url, полученный в платеже. При успешной оплате (и если что-то пойдет не так) ЮKassa вернет пользователя на return_url, который вы отправите в запросе на создание платежа. Подтвердить платеж по этому сценарию можно только на мобильном устройстве (из мобильного приложения или с мобильной версии сайта). --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md#property_locale) | | Язык интерфейса, писем и смс, которые будет видеть или получать пользователь | | public | [$locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property_locale) | | Язык интерфейса, писем и смс, которые будет видеть или получать пользователь | | public | [$return_url](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md#property_return_url) | | URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера | | public | [$returnUrl](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md#property_returnUrl) | | URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера | | public | [$type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md#property_type) | | Код сценария подтверждения | | public | [$type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property_type) | | Код сценария подтверждения | | protected | [$_locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property__locale) | | | | protected | [$_type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getLocale()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_getLocale) | | Возвращает язык интерфейса, писем и смс | | public | [getReturnUrl()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md#method_getReturnUrl) | | | | public | [getType()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_getType) | | Возвращает код сценария подтверждения | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setLocale()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_setLocale) | | Устанавливает язык интерфейса, писем и смс | | public | [setReturnUrl()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md#method_setReturnUrl) | | | | public | [setType()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_setType) | | Устанавливает код сценария подтверждения. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/ConfirmationAttributes/ConfirmationAttributesMobileApplication.php](../../lib/Request/Payments/ConfirmationAttributes/ConfirmationAttributesMobileApplication.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) * \YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesMobileApplication * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $locale : string --- ***Description*** Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Type:** string **Details:** #### public $locale : string --- ***Description*** Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### public $return_url : string --- ***Description*** URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера **Type:** string **Details:** #### public $returnUrl : string --- ***Description*** URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера **Type:** string **Details:** #### public $type : string --- ***Description*** Код сценария подтверждения **Type:** string **Details:** #### public $type : string --- ***Description*** Код сценария подтверждения **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### protected $_locale : ?string --- **Type:** ?string Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### protected $_type : ?string --- **Type:** ?string Код сценария подтверждения **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) --- ## Methods #### public __construct() : mixed ```php public __construct(mixed $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesMobileApplication](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getLocale() : string|null ```php public getLocale() : string|null ``` **Summary** Возвращает язык интерфейса, писем и смс **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) **Returns:** string|null - Язык интерфейса, писем и смс #### public getReturnUrl() : string|null ```php public getReturnUrl() : string|null ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesMobileApplication](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md) **Returns:** string|null - URL или диплинк, на который вернется пользователь после подтверждения или отмены платежа в приложении #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает код сценария подтверждения **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) **Returns:** string|null - Код сценария подтверждения #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setLocale() : self ```php public setLocale(string|null $locale = null) : self ``` **Summary** Устанавливает язык интерфейса, писем и смс **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | locale | Язык интерфейса, писем и смс | **Returns:** self - #### public setReturnUrl() : self ```php public setReturnUrl(string|null $return_url = null) : self ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesMobileApplication](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesMobileApplication.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | return_url | URL или диплинк, на который вернется пользователь после подтверждения или отмены платежа в приложении | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает код сценария подтверждения. **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Код сценария подтверждения | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodWebmoney.md000064400000054771150364342670026140 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodWebmoney ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodWebmoney. **Description:** Оплата из кошелька WebMoney. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodWebmoney.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodWebmoney.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodWebmoney.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodWebmoney * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | deprecated | | Будет удален в следующих версиях | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodWebmoney](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodWebmoney.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodTinkoffBank.md000064400000054727150364342670026550 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodTinkoffBank ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodTinkoffBank. **Description:** Оплата через интернет-банк Тинькофф. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodTinkoffBank.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodTinkoffBank.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodTinkoffBank.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodTinkoffBank * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodTinkoffBank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodTinkoffBank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md000064400000061755150364342670032452 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesRedirect ### Namespace: [\YooKassa\Request\Payments\ConfirmationAttributes](../namespaces/yookassa-request-payments-confirmationattributes.md) --- **Summary:** Класс, представляющий модель ConfirmationAttributesRedirect. **Description:** Сценарий при котором пользователю необходимо что-то сделать на странице ЮKassa или ее партнера (например, ввести данные банковской карты или пройти аутентификацию по 3-D Secure). Вам нужно перенаправить пользователя на confirmation_url, полученный в платеже. При успешной оплате (и если что-то пойдет не так) ЮKassa вернет пользователя на return_url, который вы отправите в запросе на создание платежа. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$enforce](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md#property_enforce) | | Требование принудительного подтверждения платежа покупателем, требование 3-D Secure для оплаты банковскими картами. По умолчанию определяется политикой платежной системы. | | public | [$locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md#property_locale) | | Язык интерфейса, писем и смс, которые будет видеть или получать пользователь | | public | [$locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property_locale) | | Язык интерфейса, писем и смс, которые будет видеть или получать пользователь | | public | [$return_url](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md#property_return_url) | | URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера. | | public | [$returnUrl](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md#property_returnUrl) | | URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера. | | public | [$type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md#property_type) | | Код сценария подтверждения | | public | [$type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property_type) | | Код сценария подтверждения | | protected | [$_locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property__locale) | | | | protected | [$_type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getEnforce()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md#method_getEnforce) | | | | public | [getLocale()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_getLocale) | | Возвращает язык интерфейса, писем и смс | | public | [getReturnUrl()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md#method_getReturnUrl) | | | | public | [getType()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_getType) | | Возвращает код сценария подтверждения | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setEnforce()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md#method_setEnforce) | | | | public | [setLocale()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_setLocale) | | Устанавливает язык интерфейса, писем и смс | | public | [setReturnUrl()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md#method_setReturnUrl) | | | | public | [setType()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_setType) | | Устанавливает код сценария подтверждения. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/ConfirmationAttributes/ConfirmationAttributesRedirect.php](../../lib/Request/Payments/ConfirmationAttributes/ConfirmationAttributesRedirect.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) * \YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesRedirect * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $enforce : bool --- ***Description*** Требование принудительного подтверждения платежа покупателем, требование 3-D Secure для оплаты банковскими картами. По умолчанию определяется политикой платежной системы. **Type:** bool **Details:** #### public $locale : string --- ***Description*** Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Type:** string **Details:** #### public $locale : string --- ***Description*** Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### public $return_url : string --- ***Description*** URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера. **Type:** string **Details:** #### public $returnUrl : string --- ***Description*** URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера. **Type:** string **Details:** #### public $type : string --- ***Description*** Код сценария подтверждения **Type:** string **Details:** #### public $type : string --- ***Description*** Код сценария подтверждения **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### protected $_locale : ?string --- **Type:** ?string Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### protected $_type : ?string --- **Type:** ?string Код сценария подтверждения **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesRedirect](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getEnforce() : bool|null ```php public getEnforce() : bool|null ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesRedirect](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md) **Returns:** bool|null - Требование принудительного подтверждения платежа покупателем, требование 3-D Secure для оплаты банковскими картами. По умолчанию определяется политикой платежной системы. #### public getLocale() : string|null ```php public getLocale() : string|null ``` **Summary** Возвращает язык интерфейса, писем и смс **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) **Returns:** string|null - Язык интерфейса, писем и смс #### public getReturnUrl() : string|null ```php public getReturnUrl() : string|null ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesRedirect](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md) **Returns:** string|null - URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает код сценария подтверждения **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) **Returns:** string|null - Код сценария подтверждения #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setEnforce() : self ```php public setEnforce(bool|null $enforce = null) : self ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesRedirect](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | enforce | Требование принудительного подтверждения платежа покупателем, требование 3-D Secure для оплаты банковскими картами. По умолчанию определяется политикой платежной системы. | **Returns:** self - #### public setLocale() : self ```php public setLocale(string|null $locale = null) : self ``` **Summary** Устанавливает язык интерфейса, писем и смс **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | locale | Язык интерфейса, писем и смс | **Returns:** self - #### public setReturnUrl() : self ```php public setReturnUrl(string|null $return_url = null) : self ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesRedirect](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesRedirect.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | return_url | URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает код сценария подтверждения. **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Код сценария подтверждения | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md000064400000074414150364342670026424 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodB2bSberbank ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodB2bSberbank. **Description:** Оплата через Сбербанк Бизнес Онлайн. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$payer_bank_details](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md#property_payer_bank_details) | | Банковские реквизиты плательщика | | public | [$payerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md#property_payerBankDetails) | | Банковские реквизиты плательщика | | public | [$payment_purpose](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md#property_payment_purpose) | | Назначение платежа | | public | [$paymentPurpose](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md#property_paymentPurpose) | | Назначение платежа | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | public | [$vatData](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md#property_vatData) | | Данные об НДС | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getPayerBankDetails()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md#method_getPayerBankDetails) | | Возвращает банковские реквизиты плательщика (юридического лица или ИП). | | public | [getPaymentPurpose()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md#method_getPaymentPurpose) | | Возвращает назначение платежа. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [getVatData()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md#method_getVatData) | | Возвращает назначение платежа. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setPayerBankDetails()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md#method_setPayerBankDetails) | | Устанавливает Банковские реквизиты плательщика (юридического лица или ИП). | | public | [setPaymentPurpose()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md#method_setPaymentPurpose) | | Устанавливает назначение платежа. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [setVatData()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md#method_setVatData) | | Устанавливает назначение платежа. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodB2bSberbank.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodB2bSberbank.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodB2bSberbank * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $payer_bank_details : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails --- ***Description*** Банковские реквизиты плательщика **Type:** PayerBankDetails **Details:** #### public $payerBankDetails : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails --- ***Description*** Банковские реквизиты плательщика **Type:** PayerBankDetails **Details:** #### public $payment_purpose : string --- ***Description*** Назначение платежа **Type:** string **Details:** #### public $paymentPurpose : string --- ***Description*** Назначение платежа **Type:** string **Details:** #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $vatData : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData --- ***Description*** Данные об НДС **Type:** VatData **Details:** #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodB2bSberbank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getPayerBankDetails() : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails|null ```php public getPayerBankDetails() : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails|null ``` **Summary** Возвращает банковские реквизиты плательщика (юридического лица или ИП). **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodB2bSberbank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md) **Returns:** \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails|null - Банковские реквизиты плательщика #### public getPaymentPurpose() : string|null ```php public getPaymentPurpose() : string|null ``` **Summary** Возвращает назначение платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodB2bSberbank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md) **Returns:** string|null - Назначение платежа #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public getVatData() : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData|null ```php public getVatData() : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData|null ``` **Summary** Возвращает назначение платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodB2bSberbank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md) **Returns:** \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData|null - Данные об НДС #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setPayerBankDetails() : self ```php public setPayerBankDetails(array|\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails|null $payer_bank_details) : self ``` **Summary** Устанавливает Банковские реквизиты плательщика (юридического лица или ИП). **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodB2bSberbank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails OR null | payer_bank_details | Банковские реквизиты плательщика | **Returns:** self - #### public setPaymentPurpose() : self ```php public setPaymentPurpose(string|null $payment_purpose) : self ``` **Summary** Устанавливает назначение платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodB2bSberbank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_purpose | Назначение платежа | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public setVatData() : self ```php public setVatData(\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData|array|null $vat_data) : self ``` **Summary** Устанавливает назначение платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodB2bSberbank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodB2bSberbank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData OR array OR null | vat_data | Данные об НДС | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-RefundDealData.md000064400000035754150364342670021133 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Deal\RefundDealData ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Класс, представляющий модель RefundDealData. **Description:** Данные о сделке, в составе которой проходит возврат. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$refund_settlements](../classes/YooKassa-Model-Deal-RefundDealData.md#property_refund_settlements) | | Данные о распределении денег | | public | [$refundSettlements](../classes/YooKassa-Model-Deal-RefundDealData.md#property_refundSettlements) | | Данные о распределении денег | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getRefundSettlements()](../classes/YooKassa-Model-Deal-RefundDealData.md#method_getRefundSettlements) | | Возвращает массив оплат, обеспечивающих выдачу товара. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setRefundSettlements()](../classes/YooKassa-Model-Deal-RefundDealData.md#method_setRefundSettlements) | | Устанавливает массив оплат, обеспечивающих выдачу товара. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Deal/RefundDealData.php](../../lib/Model/Deal/RefundDealData.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Deal\RefundDealData * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $refund_settlements : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\SettlementInterface[] --- ***Description*** Данные о распределении денег **Type:** SettlementInterface[] **Details:** #### public $refundSettlements : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\SettlementInterface[] --- ***Description*** Данные о распределении денег **Type:** SettlementInterface[] **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getRefundSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ```php public getRefundSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Model\Deal\RefundDealData](../classes/YooKassa-Model-Deal-RefundDealData.md) **Returns:** \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface - Массив оплат, обеспечивающих выдачу товара #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setRefundSettlements() : self ```php public setRefundSettlements(\YooKassa\Common\ListObjectInterface|array|null $refund_settlements = null) : self ``` **Summary** Устанавливает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Model\Deal\RefundDealData](../classes/YooKassa-Model-Deal-RefundDealData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | refund_settlements | Данные о распределении денег. | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-ApiException.md000064400000006477150364342670022364 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\ApiException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- **Summary:** Неожиданный код ошибки. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$responseBody](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseBody) | | | | protected | [$responseHeaders](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseHeaders) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-ApiException.md#method___construct) | | Constructor. | | public | [getResponseBody()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseBody) | | | | public | [getResponseHeaders()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseHeaders) | | | --- ### Details * File: [lib/Common/Exceptions/ApiException.php](../../lib/Common/Exceptions/ApiException.php) * Package: Default * Class Hierarchy: * [\Exception](\Exception) * \YooKassa\Common\Exceptions\ApiException --- ## Properties #### protected $responseBody : ?string --- **Type:** ?string **Details:** #### protected $responseHeaders : array --- **Type:** array **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(string $message = '', int $code, string[] $responseHeaders = [], string|null $responseBody = '') : mixed ``` **Summary** Constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | message | Error message | | int | code | HTTP status code | | string[] | responseHeaders | HTTP header | | string OR null | responseBody | HTTP body | **Returns:** mixed - #### public getResponseBody() : ?string ```php public getResponseBody() : ?string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** ?string - #### public getResponseHeaders() : string[] ```php public getResponseHeaders() : string[] ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** string[] - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md000064400000021453150364342670026214 0ustar00# [YooKassa API SDK](../home.md) # Interface: SelfEmployedRequestInterface ### Namespace: [\YooKassa\Request\SelfEmployed](../namespaces/yookassa-request-selfemployed.md) --- **Summary:** Interface SelfEmployedRequestInterface. **Description:** Запрос на создание объекта самозанятого. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getConfirmation()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md#method_getConfirmation) | | Возвращает сценарий подтверждения. | | public | [getItn()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md#method_getItn) | | Возвращает ИНН самозанятого. | | public | [getPhone()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md#method_getPhone) | | Возвращает телефон самозанятого. | | public | [hasConfirmation()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md#method_hasConfirmation) | | Проверяет наличие сценария подтверждения самозанятого в запросе. | | public | [hasItn()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md#method_hasItn) | | Проверяет наличие ИНН самозанятого в запросе. | | public | [hasPhone()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md#method_hasPhone) | | Проверяет наличие телефона самозанятого в запросе. | | public | [setConfirmation()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md#method_setConfirmation) | | Устанавливает сценарий подтверждения. | | public | [setItn()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md#method_setItn) | | Устанавливает ИНН самозанятого. | | public | [setPhone()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md#method_setPhone) | | Устанавливает телефон самозанятого. | | public | [validate()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md#method_validate) | | Проверяет на валидность текущий объект | --- ### Details * File: [lib/Request/SelfEmployed/SelfEmployedRequestInterface.php](../../lib/Request/SelfEmployed/SelfEmployedRequestInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | ИНН самозанятого. | | property | | Телефон самозанятого, который привязан к личному кабинету в сервисе Мой налог. | | property | | Сценарий подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. | --- ## Methods #### public getItn() : null|string ```php public getItn() : null|string ``` **Summary** Возвращает ИНН самозанятого. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md) **Returns:** null|string - ИНН самозанятого #### public setItn() : $this ```php public setItn(null|string $itn = null) : $this ``` **Summary** Устанавливает ИНН самозанятого. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | itn | ИНН самозанятого | **Returns:** $this - #### public hasItn() : bool ```php public hasItn() : bool ``` **Summary** Проверяет наличие ИНН самозанятого в запросе. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md) **Returns:** bool - True если ИНН самозанятого задан, false если нет #### public getPhone() : null|string ```php public getPhone() : null|string ``` **Summary** Возвращает телефон самозанятого. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md) **Returns:** null|string - Телефон самозанятого #### public setPhone() : $this ```php public setPhone(null|string $phone = null) : $this ``` **Summary** Устанавливает телефон самозанятого. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | phone | Телефон самозанятого | **Returns:** $this - #### public hasPhone() : bool ```php public hasPhone() : bool ``` **Summary** Проверяет наличие телефона самозанятого в запросе. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md) **Returns:** bool - True если телефон самозанятого задан, false если нет #### public getConfirmation() : ?\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation ```php public getConfirmation() : ?\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation ``` **Summary** Возвращает сценарий подтверждения. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md) **Returns:** ?\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation - #### public setConfirmation() : $this ```php public setConfirmation(null|array|\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation $confirmation = null) : $this ``` **Summary** Устанавливает сценарий подтверждения. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation | confirmation | Сценарий подтверждения | **Returns:** $this - #### public hasConfirmation() : bool ```php public hasConfirmation() : bool ``` **Summary** Проверяет наличие сценария подтверждения самозанятого в запросе. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md) **Returns:** bool - True если сценарий подтверждения самозанятого задан, false если нет #### public validate() : bool ```php public validate() : bool ``` **Summary** Проверяет на валидность текущий объект **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md) **Returns:** bool - True если объект запроса валиден, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataSberLoan.md000064400000034506150364342670025707 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataSberLoan ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentDataSberLoan. **Description:** Данные для оплаты с использованием Кредита от СберБанка. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataSberLoan.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataSberLoan.php](../../lib/Request/Payments/PaymentData/PaymentDataSberLoan.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataSberLoan * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) #### protected $_type : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataSberLoan](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataSberLoan.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCard.md000064400000040776150364342670025655 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataBankCard ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentMethodDataBankCard. **Description:** Данные для оплаты банковской картой. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$card](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCard.md#property_card) | | Данные банковской карты | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCard.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCard()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCard.md#method_getCard) | | Возвращает данные банковской карты. | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCard()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCard.md#method_setCard) | | Устанавливает данные банковской карты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataBankCard.php](../../lib/Request/Payments/PaymentData/PaymentDataBankCard.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataBankCard * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $card : \YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard --- ***Description*** Данные банковской карты **Type:** PaymentDataBankCardCard **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) #### protected $_type : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCard() : \YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard|null ```php public getCard() : \YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard|null ``` **Summary** Возвращает данные банковской карты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCard.md) **Returns:** \YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard|null - Данные банковской карты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCard() : self ```php public setCard(\YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard|array|null $card) : self ``` **Summary** Устанавливает данные банковской карты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard OR array OR null | card | Данные банковской карты | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Client-CurlClient.md000064400000035364150364342670017704 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Client\CurlClient ### Namespace: [\YooKassa\Client](../namespaces/yookassa-client.md) --- **Summary:** Класс, представляющий модель CurlClient. **Description:** Класс клиента Curl запросов. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Client-CurlClient.md#method___construct) | | CurlClient constructor. | | public | [call()](../classes/YooKassa-Client-CurlClient.md#method_call) | | Создает CURL запрос, получает и возвращает обработанный ответ | | public | [closeCurlConnection()](../classes/YooKassa-Client-CurlClient.md#method_closeCurlConnection) | | Close connection. | | public | [getConfig()](../classes/YooKassa-Client-CurlClient.md#method_getConfig) | | Возвращает настройки. | | public | [getConnectionTimeout()](../classes/YooKassa-Client-CurlClient.md#method_getConnectionTimeout) | | Возвращает значение параметра CURLOPT_CONNECTTIMEOUT. | | public | [getProxy()](../classes/YooKassa-Client-CurlClient.md#method_getProxy) | | Возвращает настройки прокси. | | public | [getTimeout()](../classes/YooKassa-Client-CurlClient.md#method_getTimeout) | | Возвращает значение параметра CURLOPT_TIMEOUT. | | public | [getUserAgent()](../classes/YooKassa-Client-CurlClient.md#method_getUserAgent) | | Возвращает UserAgent. | | public | [sendRequest()](../classes/YooKassa-Client-CurlClient.md#method_sendRequest) | | Выполняет запрос, получает и возвращает обработанный ответ | | public | [setAdvancedCurlOptions()](../classes/YooKassa-Client-CurlClient.md#method_setAdvancedCurlOptions) | | Устанавливает дополнительные настройки curl. | | public | [setBearerToken()](../classes/YooKassa-Client-CurlClient.md#method_setBearerToken) | | Устанавливает OAuth-токен магазина. | | public | [setBody()](../classes/YooKassa-Client-CurlClient.md#method_setBody) | | Устанавливает тело запроса. | | public | [setConfig()](../classes/YooKassa-Client-CurlClient.md#method_setConfig) | | Устанавливает настройки. | | public | [setConnectionTimeout()](../classes/YooKassa-Client-CurlClient.md#method_setConnectionTimeout) | | Устанавливает значение параметра CURLOPT_CONNECTTIMEOUT. | | public | [setCurlOption()](../classes/YooKassa-Client-CurlClient.md#method_setCurlOption) | | Устанавливает параметры CURL. | | public | [setKeepAlive()](../classes/YooKassa-Client-CurlClient.md#method_setKeepAlive) | | Устанавливает флаг сохранения соединения. | | public | [setLogger()](../classes/YooKassa-Client-CurlClient.md#method_setLogger) | | Устанавливает объект для логирования. | | public | [setProxy()](../classes/YooKassa-Client-CurlClient.md#method_setProxy) | | Устанавливает настройки прокси. | | public | [setShopId()](../classes/YooKassa-Client-CurlClient.md#method_setShopId) | | Устанавливает shopId магазина. | | public | [setShopPassword()](../classes/YooKassa-Client-CurlClient.md#method_setShopPassword) | | Устанавливает секретный ключ магазина. | | public | [setTimeout()](../classes/YooKassa-Client-CurlClient.md#method_setTimeout) | | Устанавливает значение параметра CURLOPT_TIMEOUT. | --- ### Details * File: [lib/Client/CurlClient.php](../../lib/Client/CurlClient.php) * Package: YooKassa * Class Hierarchy: * \YooKassa\Client\CurlClient * Implements: * [\YooKassa\Client\ApiClientInterface](../classes/YooKassa-Client-ApiClientInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** CurlClient constructor. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) **Returns:** mixed - #### public call() : \YooKassa\Common\ResponseObject ```php public call(string $path, string $method, array $queryParams, null|string $httpBody = null, array $headers = []) : \YooKassa\Common\ResponseObject ``` **Summary** Создает CURL запрос, получает и возвращает обработанный ответ **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | path | URL запроса | | string | method | HTTP метод | | array | queryParams | Массив GET параметров запроса | | null OR string | httpBody | Тело запроса | | array | headers | Массив заголовков запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiConnectionException | | | \YooKassa\Common\Exceptions\ApiException | | | \YooKassa\Common\Exceptions\AuthorizeException | | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | | **Returns:** \YooKassa\Common\ResponseObject - #### public closeCurlConnection() : void ```php public closeCurlConnection() : void ``` **Summary** Close connection. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) **Returns:** void - #### public getConfig() : array ```php public getConfig() : array ``` **Summary** Возвращает настройки. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) **Returns:** array - #### public getConnectionTimeout() : int ```php public getConnectionTimeout() : int ``` **Summary** Возвращает значение параметра CURLOPT_CONNECTTIMEOUT. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) **Returns:** int - #### public getProxy() : string ```php public getProxy() : string ``` **Summary** Возвращает настройки прокси. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) **Returns:** string - #### public getTimeout() : int ```php public getTimeout() : int ``` **Summary** Возвращает значение параметра CURLOPT_TIMEOUT. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) **Returns:** int - #### public getUserAgent() : \YooKassa\Client\UserAgent ```php public getUserAgent() : \YooKassa\Client\UserAgent ``` **Summary** Возвращает UserAgent. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) **Returns:** \YooKassa\Client\UserAgent - #### public sendRequest() : array ```php public sendRequest() : array ``` **Summary** Выполняет запрос, получает и возвращает обработанный ответ **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiConnectionException | | **Returns:** array - #### public setAdvancedCurlOptions() : void ```php public setAdvancedCurlOptions() : void ``` **Summary** Устанавливает дополнительные настройки curl. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) **Returns:** void - #### public setBearerToken() : $this ```php public setBearerToken(null|string $bearerToken) : $this ``` **Summary** Устанавливает OAuth-токен магазина. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | bearerToken | OAuth-токен магазина | **Returns:** $this - #### public setBody() : void ```php public setBody(string $method, string|null $httpBody = null) : void ``` **Summary** Устанавливает тело запроса. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | method | HTTP метод | | string OR null | httpBody | Тело запроса | **Returns:** void - #### public setConfig() : void ```php public setConfig(array $config) : void ``` **Summary** Устанавливает настройки. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | config | Настройки клиента | **Returns:** void - #### public setConnectionTimeout() : void ```php public setConnectionTimeout(int $connectionTimeout = 30) : void ``` **Summary** Устанавливает значение параметра CURLOPT_CONNECTTIMEOUT. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | connectionTimeout | Число секунд ожидания при попытке подключения | **Returns:** void - #### public setCurlOption() : bool ```php public setCurlOption(string $optionName, mixed $optionValue) : bool ``` **Summary** Устанавливает параметры CURL. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | optionName | Имя параметра | | mixed | optionValue | Значение параметра | **Returns:** bool - #### public setKeepAlive() : $this ```php public setKeepAlive(bool $keepAlive) : $this ``` **Summary** Устанавливает флаг сохранения соединения. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | keepAlive | Флаг сохранения настроек | **Returns:** $this - #### public setLogger() : void ```php public setLogger(?\Psr\Log\LoggerInterface $logger) : void ``` **Summary** Устанавливает объект для логирования. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?\Psr\Log\LoggerInterface | logger | Объект для логирования | **Returns:** void - #### public setProxy() : void ```php public setProxy(string $proxy) : void ``` **Summary** Устанавливает настройки прокси. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | proxy | Прокси сервер | **Returns:** void - #### public setShopId() : $this ```php public setShopId(mixed $shopId) : $this ``` **Summary** Устанавливает shopId магазина. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | shopId | shopId магазина | **Returns:** $this - #### public setShopPassword() : $this ```php public setShopPassword(string|null $shopPassword) : $this ``` **Summary** Устанавливает секретный ключ магазина. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | shopPassword | Секретный ключ магазина | **Returns:** $this - #### public setTimeout() : void ```php public setTimeout(int $timeout) : void ``` **Summary** Устанавливает значение параметра CURLOPT_TIMEOUT. **Details:** * Inherited From: [\YooKassa\Client\CurlClient](../classes/YooKassa-Client-CurlClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | timeout | Максимальное количество секунд для выполнения функций cURL | **Returns:** void - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Notification-NotificationFactory.md000064400000010271150364342670024052 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Notification\NotificationFactory ### Namespace: [\YooKassa\Model\Notification](../namespaces/yookassa-model-notification.md) --- **Summary:** Фабрика для получения конкретного объекта уведомления. --- ### Examples Пример скрипта обработки уведомления ```php require_once '../vendor/autoload.php'; try { $source = file_get_contents('php://input'); $data = json_decode($source, true); $factory = new \YooKassa\Model\Notification\NotificationFactory(); $notificationObject = $factory->factory($data); $responseObject = $notificationObject->getObject(); $client = new \YooKassa\Client(); if (!$client->isNotificationIPTrusted($_SERVER['REMOTE_ADDR'])) { header('HTTP/1.1 400 Something went wrong'); exit; } if (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_CANCELED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::REFUND_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'refundId' => $responseObject->getId(), 'refundStatus' => $responseObject->getStatus(), 'paymentId' => $responseObject->getPaymentId(), ]; // ... // Специфичная логика } else { header('HTTP/1.1 400 Something went wrong'); exit; } // Специфичная логика // ... $client->setAuth('xxxxxx', 'test_XXXXXXX'); // Получим актуальную информацию о платеже if ($paymentInfo = $client->getPaymentInfo($someData['paymentId'])) { $paymentStatus = $paymentInfo->getStatus(); // Специфичная логика // ... } else { header('HTTP/1.1 400 Something went wrong'); exit; } } catch (Exception $e) { header('HTTP/1.1 400 Something went wrong'); exit; } ``` --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [factory()](../classes/YooKassa-Model-Notification-NotificationFactory.md#method_factory) | | | --- ### Details * File: [lib/Model/Notification/NotificationFactory.php](../../lib/Model/Notification/NotificationFactory.php) * Package: Default * Class Hierarchy: * \YooKassa\Model\Notification\NotificationFactory --- ## Methods #### public factory() : \YooKassa\Model\Notification\AbstractNotification ```php public factory(array $data) : \YooKassa\Model\Notification\AbstractNotification ``` **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationFactory](../classes/YooKassa-Model-Notification-NotificationFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | data | | **Returns:** \YooKassa\Model\Notification\AbstractNotification - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-ReceiptCustomerInterface.md000064400000011667150364342670024011 0ustar00# [YooKassa API SDK](../home.md) # Interface: ReceiptCustomerInterface ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Interface ReceiptCustomerInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEmail()](../classes/YooKassa-Model-Receipt-ReceiptCustomerInterface.md#method_getEmail) | | Возвращает адрес электронной почты на который будет выслан чек. | | public | [getFullName()](../classes/YooKassa-Model-Receipt-ReceiptCustomerInterface.md#method_getFullName) | | Возвращает название организации или ФИО физического лица. | | public | [getInn()](../classes/YooKassa-Model-Receipt-ReceiptCustomerInterface.md#method_getInn) | | Возвращает ИНН плательщика. | | public | [getPhone()](../classes/YooKassa-Model-Receipt-ReceiptCustomerInterface.md#method_getPhone) | | Возвращает номер телефона плательщика в формате ITU-T E.164 на который будет выслан чек. | | public | [jsonSerialize()](../classes/YooKassa-Model-Receipt-ReceiptCustomerInterface.md#method_jsonSerialize) | | Возвращает массив полей плательщика. | --- ### Details * File: [lib/Model/Receipt/ReceiptCustomerInterface.php](../../lib/Model/Receipt/ReceiptCustomerInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Для юрлица — название организации, для ИП и физического лица — ФИО. | | property | | Для юрлица — название организации, для ИП и физического лица — ФИО. | | property | | Номер телефона плательщика в формате ITU-T E.164 на который будет выслан чек. | | property | | E-mail адрес плательщика на который будет выслан чек. | | property | | ИНН плательщика (10 или 12 цифр). | --- ## Methods #### public getFullName() : string|null ```php public getFullName() : string|null ``` **Summary** Возвращает название организации или ФИО физического лица. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomerInterface](../classes/YooKassa-Model-Receipt-ReceiptCustomerInterface.md) **Returns:** string|null - Название организации или ФИО физического лица #### public getPhone() : string|null ```php public getPhone() : string|null ``` **Summary** Возвращает номер телефона плательщика в формате ITU-T E.164 на который будет выслан чек. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomerInterface](../classes/YooKassa-Model-Receipt-ReceiptCustomerInterface.md) **Returns:** string|null - Номер телефона плательщика #### public getEmail() : string|null ```php public getEmail() : string|null ``` **Summary** Возвращает адрес электронной почты на который будет выслан чек. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomerInterface](../classes/YooKassa-Model-Receipt-ReceiptCustomerInterface.md) **Returns:** string|null - E-mail адрес плательщика #### public getInn() : string|null ```php public getInn() : string|null ``` **Summary** Возвращает ИНН плательщика. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomerInterface](../classes/YooKassa-Model-Receipt-ReceiptCustomerInterface.md) **Returns:** string|null - ИНН плательщика #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает массив полей плательщика. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomerInterface](../classes/YooKassa-Model-Receipt-ReceiptCustomerInterface.md) **Returns:** array - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataInstallments.md000064400000034622150364342670026656 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataInstallments ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentMethodDataInstallments. **Description:** Данные для оплаты через сервис «Заплатить по частям» (в кредит или рассрочку). --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataInstallments.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataInstallments.php](../../lib/Request/Payments/PaymentData/PaymentDataInstallments.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataInstallments * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) #### protected $_type : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataInstallments](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataInstallments.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md000064400000043161150364342670024773 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ### Namespace: [\YooKassa\Request\Payouts](../namespaces/yookassa-request-payouts.md) --- **Summary:** Класс, представляющий модель CreatePayoutRequestBuilder. **Description:** Класс билдера объектов запросов к API на создание платежа. --- ### Examples Пример использования билдера ```php try { $payoutBuilder = \YooKassa\Request\Payouts\CreatePayoutRequest::builder(); $payoutBuilder ->setAmount(new \YooKassa\Model\MonetaryAmount(80)) ->setPayoutDestinationData( new \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataYooMoney( [ 'type' => \YooKassa\Model\Payment\PaymentMethodType::YOO_MONEY, 'account_number' => '4100116075156746' ] ) ) ->setDeal(new \YooKassa\Model\Deal\PayoutDealInfo(['id' => 'dl-2909e77d-0022-5000-8000-0c37205b3208'])) ->setDescription('Выплата по заказу №37') ; // Создаем объект запроса $request = $payoutBuilder->build(); $idempotenceKey = uniqid('', true); $response = $client->createPayout($request, $idempotenceKey); } catch (Exception $e) { $response = $e; } var_dump($response); ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$currentObject](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md#property_currentObject) | | Собираемый объект запроса. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. | | public | [build()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md#method_build) | | Строит и возвращает объект запроса для отправки в API ЮKassa. | | public | [setAmount()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md#method_setAmount) | | Устанавливает сумму. | | public | [setDeal()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md#method_setDeal) | | Устанавливает сделку, в рамках которой нужно провести выплату. | | public | [setDescription()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md#method_setDescription) | | Устанавливает описание транзакции. | | public | [setMetadata()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md#method_setMetadata) | | Устанавливает метаданные, привязанные к платежу. | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива. | | public | [setPaymentMethodId()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md#method_setPaymentMethodId) | | Устанавливает идентификатор сохраненного способа оплаты. | | public | [setPayoutDestinationData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md#method_setPayoutDestinationData) | | Устанавливает объект с информацией для создания метода оплаты. | | public | [setPayoutToken()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md#method_setPayoutToken) | | Устанавливает одноразовый токен для проведения выплаты. | | public | [setPersonalData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md#method_setPersonalData) | | Устанавливает персональные данные получателя выплаты. | | public | [setReceiptData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md#method_setReceiptData) | | Устанавливает данные для формирования чека в сервисе Мой налог. | | public | [setSelfEmployed()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md#method_setSelfEmployed) | | Устанавливает данные самозанятого, который получит выплату. | | protected | [initCurrentObject()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md#method_initCurrentObject) | | Инициализирует объект запроса, который в дальнейшем будет собираться билдером | --- ### Details * File: [lib/Request/Payouts/CreatePayoutRequestBuilder.php](../../lib/Request/Payouts/CreatePayoutRequestBuilder.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) * \YooKassa\Request\Payouts\CreatePayoutRequestBuilder * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### protected $currentObject : ?\YooKassa\Common\AbstractRequestInterface --- **Summary** Собираемый объект запроса. **Type:** AbstractRequestInterface **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public build() : \YooKassa\Request\Payouts\CreatePayoutRequestInterface|\YooKassa\Common\AbstractRequestInterface ```php public build(null|array $options = null) : \YooKassa\Request\Payouts\CreatePayoutRequestInterface|\YooKassa\Common\AbstractRequestInterface ``` **Summary** Строит и возвращает объект запроса для отправки в API ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestBuilder](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array | options | Массив параметров для установки в объект запроса | **Returns:** \YooKassa\Request\Payouts\CreatePayoutRequestInterface|\YooKassa\Common\AbstractRequestInterface - Инстанс объекта запроса #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|string $value) : self ``` **Summary** Устанавливает сумму. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestBuilder](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR string | value | Сумма выплаты | **Returns:** self - Инстанс билдера запросов #### public setDeal() : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ```php public setDeal(array|\YooKassa\Model\Deal\PayoutDealInfo $value) : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ``` **Summary** Устанавливает сделку, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestBuilder](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Deal\PayoutDealInfo | value | Сделка, в рамках которой нужно провести выплату | **Returns:** \YooKassa\Request\Payouts\CreatePayoutRequestBuilder - #### public setDescription() : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ```php public setDescription(string|null $value) : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ``` **Summary** Устанавливает описание транзакции. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestBuilder](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Описание транзакции | **Returns:** \YooKassa\Request\Payouts\CreatePayoutRequestBuilder - Инстанс текущего билдера #### public setMetadata() : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ```php public setMetadata(null|array|\YooKassa\Model\Metadata $value) : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ``` **Summary** Устанавливает метаданные, привязанные к платежу. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestBuilder](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Metadata | value | Метаданные платежа, устанавливаемые мерчантом | **Returns:** \YooKassa\Request\Payouts\CreatePayoutRequestBuilder - Инстанс текущего билдера #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(iterable|null $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable OR null | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### public setPaymentMethodId() : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ```php public setPaymentMethodId(null|string $value) : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ``` **Summary** Устанавливает идентификатор сохраненного способа оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestBuilder](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | value | Идентификатор сохраненного способа оплаты | **Returns:** \YooKassa\Request\Payouts\CreatePayoutRequestBuilder - #### public setPayoutDestinationData() : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ```php public setPayoutDestinationData(null|\YooKassa\Model\Payout\AbstractPayoutDestination|array $value) : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ``` **Summary** Устанавливает объект с информацией для создания метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestBuilder](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \YooKassa\Model\Payout\AbstractPayoutDestination OR array | value | Объект создания метода оплаты или null | **Returns:** \YooKassa\Request\Payouts\CreatePayoutRequestBuilder - #### public setPayoutToken() : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ```php public setPayoutToken(string|null $value) : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ``` **Summary** Устанавливает одноразовый токен для проведения выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestBuilder](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Одноразовый токен для проведения выплаты | **Returns:** \YooKassa\Request\Payouts\CreatePayoutRequestBuilder - Инстанс текущего билдера #### public setPersonalData() : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ```php public setPersonalData(null|array|\YooKassa\Request\Payouts\PayoutPersonalData[] $value) : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ``` **Summary** Устанавливает персональные данные получателя выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestBuilder](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Payouts\PayoutPersonalData[] | value | Персональные данные получателя выплаты | **Returns:** \YooKassa\Request\Payouts\CreatePayoutRequestBuilder - #### public setReceiptData() : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ```php public setReceiptData(null|array|\YooKassa\Request\Payouts\IncomeReceiptData $value) : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ``` **Summary** Устанавливает данные для формирования чека в сервисе Мой налог. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestBuilder](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Payouts\IncomeReceiptData | value | Данные для формирования чека в сервисе Мой налог | **Returns:** \YooKassa\Request\Payouts\CreatePayoutRequestBuilder - #### public setSelfEmployed() : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ```php public setSelfEmployed(null|array|\YooKassa\Request\Payouts\PayoutSelfEmployedInfo $value) : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ``` **Summary** Устанавливает данные самозанятого, который получит выплату. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestBuilder](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Payouts\PayoutSelfEmployedInfo | value | Данные самозанятого, который получит выплату | **Returns:** \YooKassa\Request\Payouts\CreatePayoutRequestBuilder - #### protected initCurrentObject() : \YooKassa\Request\Payouts\CreatePayoutRequest ```php protected initCurrentObject() : \YooKassa\Request\Payouts\CreatePayoutRequest ``` **Summary** Инициализирует объект запроса, который в дальнейшем будет собираться билдером **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestBuilder](../classes/YooKassa-Request-Payouts-CreatePayoutRequestBuilder.md) **Returns:** \YooKassa\Request\Payouts\CreatePayoutRequest - Инстанс собираемого объекта запроса к API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Notification-NotificationInterface.md000064400000007633150364342670024353 0ustar00# [YooKassa API SDK](../home.md) # Interface: NotificationInterface ### Namespace: [\YooKassa\Model\Notification](../namespaces/yookassa-model-notification.md) --- --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEvent()](../classes/YooKassa-Model-Notification-NotificationInterface.md#method_getEvent) | | Возвращает тип события. | | public | [getObject()](../classes/YooKassa-Model-Notification-NotificationInterface.md#method_getObject) | | Возвращает объект с информацией о платеже или возврате, уведомление о котором хранится в текущем объекте. | | public | [getType()](../classes/YooKassa-Model-Notification-NotificationInterface.md#method_getType) | | Возвращает тип уведомления. | --- ### Details * File: [lib/Model/Notification/NotificationInterface.php](../../lib/Model/Notification/NotificationInterface.php) * Package: \Default --- ## Methods #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип уведомления. **Description** Тип уведомления - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationInterface](../classes/YooKassa-Model-Notification-NotificationInterface.md) **Returns:** string|null - Тип уведомления в виде строки #### public getEvent() : string|null ```php public getEvent() : string|null ``` **Summary** Возвращает тип события. **Description** Тип события - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationInterface](../classes/YooKassa-Model-Notification-NotificationInterface.md) **Returns:** string|null - Тип события #### public getObject() : \YooKassa\Model\Payment\PaymentInterface|\YooKassa\Model\Refund\RefundInterface|\YooKassa\Model\Payout\PayoutInterface|\YooKassa\Model\Deal\DealInterface|null ```php public getObject() : \YooKassa\Model\Payment\PaymentInterface|\YooKassa\Model\Refund\RefundInterface|\YooKassa\Model\Payout\PayoutInterface|\YooKassa\Model\Deal\DealInterface|null ``` **Summary** Возвращает объект с информацией о платеже или возврате, уведомление о котором хранится в текущем объекте. **Description** Так как нотификация может быть сгенерирована и поставлена в очередь на отправку гораздо раньше, чем она будет получена на сайте, то опираться на статус пришедшего платежа не стоит, лучше запросить текущую информацию о платеже у API. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationInterface](../classes/YooKassa-Model-Notification-NotificationInterface.md) **Returns:** \YooKassa\Model\Payment\PaymentInterface|\YooKassa\Model\Refund\RefundInterface|\YooKassa\Model\Payout\PayoutInterface|\YooKassa\Model\Deal\DealInterface|null - Объект с информацией о платеже --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md000064400000071646150364342670027166 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails ### Namespace: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank](../namespaces/yookassa-model-payment-paymentmethod-b2b-sberbank.md) --- **Summary:** Класс, представляющий модель B2bSberbankPayerBankDetails. **Description:** Банковские реквизиты плательщика (юридического лица или ИП). --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$account](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#property_account) | | Номер счета организации | | public | [$address](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#property_address) | | Адрес организации | | public | [$bankBik](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#property_bankBik) | | БИК банка организации | | public | [$bankBranch](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#property_bankBranch) | | Отделение банка организации | | public | [$bankName](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#property_bankName) | | Наименование банка организации | | public | [$fullName](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#property_fullName) | | Полное наименование организации | | public | [$inn](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#property_inn) | | ИНН организации | | public | [$kpp](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#property_kpp) | | КПП организации | | public | [$shortName](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#property_shortName) | | Сокращенное наименование организации | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAccount()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_getAccount) | | Возвращает номер счета организации. | | public | [getAddress()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_getAddress) | | Возвращает адрес организации. | | public | [getBankBik()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_getBankBik) | | Возвращает БИК банка организации. | | public | [getBankBranch()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_getBankBranch) | | Возвращает отделение банка организации. | | public | [getBankName()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_getBankName) | | Возвращает наименование банка организации. | | public | [getFullName()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_getFullName) | | Возвращает полное наименование организации. | | public | [getInn()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_getInn) | | Возвращает ИНН организации. | | public | [getKpp()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_getKpp) | | Возвращает КПП организации. | | public | [getShortName()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_getShortName) | | Возвращает сокращенное наименование организации. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAccount()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_setAccount) | | Устанавливает номер счета организации. | | public | [setAddress()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_setAddress) | | Устанавливает адрес организации. | | public | [setBankBik()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_setBankBik) | | Устанавливает БИК банка организации. | | public | [setBankBranch()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_setBankBranch) | | Устанавливает отделение банка организации. | | public | [setBankName()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_setBankName) | | Устанавливает наименование банка организации. | | public | [setFullName()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_setFullName) | | Устанавливает полное наименование организации. | | public | [setInn()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_setInn) | | Устанавливает ИНН организации. | | public | [setKpp()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_setKpp) | | Устанавливает КПП организации. | | public | [setShortName()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md#method_setShortName) | | Устанавливает сокращенное наименование организации. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/B2b/Sberbank/PayerBankDetails.php](../../lib/Model/Payment/PaymentMethod/B2b/Sberbank/PayerBankDetails.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails * Implements: * [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetailsInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $account : string --- ***Description*** Номер счета организации **Type:** string **Details:** #### public $address : string --- ***Description*** Адрес организации **Type:** string **Details:** #### public $bankBik : string --- ***Description*** БИК банка организации **Type:** string **Details:** #### public $bankBranch : string --- ***Description*** Отделение банка организации **Type:** string **Details:** #### public $bankName : string --- ***Description*** Наименование банка организации **Type:** string **Details:** #### public $fullName : string --- ***Description*** Полное наименование организации **Type:** string **Details:** #### public $inn : string --- ***Description*** ИНН организации **Type:** string **Details:** #### public $kpp : string --- ***Description*** КПП организации **Type:** string **Details:** #### public $shortName : string --- ***Description*** Сокращенное наименование организации **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAccount() : string|null ```php public getAccount() : string|null ``` **Summary** Возвращает номер счета организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) **Returns:** string|null - Номер счета организации #### public getAddress() : string|null ```php public getAddress() : string|null ``` **Summary** Возвращает адрес организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) **Returns:** string|null - Адрес организации #### public getBankBik() : string|null ```php public getBankBik() : string|null ``` **Summary** Возвращает БИК банка организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) **Returns:** string|null - БИК банка организации #### public getBankBranch() : string|null ```php public getBankBranch() : string|null ``` **Summary** Возвращает отделение банка организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) **Returns:** string|null - Отделение банка организации #### public getBankName() : string|null ```php public getBankName() : string|null ``` **Summary** Возвращает наименование банка организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) **Returns:** string|null - Наименование банка организации #### public getFullName() : string|null ```php public getFullName() : string|null ``` **Summary** Возвращает полное наименование организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) **Returns:** string|null - Полное наименование организации #### public getInn() : string|null ```php public getInn() : string|null ``` **Summary** Возвращает ИНН организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) **Returns:** string|null - ИНН организации #### public getKpp() : string|null ```php public getKpp() : string|null ``` **Summary** Возвращает КПП организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) **Returns:** string|null - КПП организации #### public getShortName() : string|null ```php public getShortName() : string|null ``` **Summary** Возвращает сокращенное наименование организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) **Returns:** string|null - Сокращенное наименование организации #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAccount() : self ```php public setAccount(string|null $account) : self ``` **Summary** Устанавливает номер счета организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | account | Номер счета организации | **Returns:** self - #### public setAddress() : self ```php public setAddress(string|null $address) : self ``` **Summary** Устанавливает адрес организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | address | Адрес организации | **Returns:** self - #### public setBankBik() : self ```php public setBankBik(string|null $bank_bik) : self ``` **Summary** Устанавливает БИК банка организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | bank_bik | БИК банка организации | **Returns:** self - #### public setBankBranch() : self ```php public setBankBranch(string|null $bank_branch) : self ``` **Summary** Устанавливает отделение банка организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | bank_branch | Отделение банка организации | **Returns:** self - #### public setBankName() : self ```php public setBankName(string|null $bank_name) : self ``` **Summary** Устанавливает наименование банка организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | bank_name | Наименование банка организации | **Returns:** self - #### public setFullName() : self ```php public setFullName(string|null $full_name) : self ``` **Summary** Устанавливает полное наименование организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | full_name | Полное наименование организации | **Returns:** self - #### public setInn() : self ```php public setInn(string|null $inn) : self ``` **Summary** Устанавливает ИНН организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | inn | ИНН организации | **Returns:** self - #### public setKpp() : self ```php public setKpp(string|null $kpp) : self ``` **Summary** Устанавливает КПП организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | kpp | КПП организации | **Returns:** self - #### public setShortName() : self ```php public setShortName(string|null $short_name) : self ``` **Summary** Устанавливает сокращенное наименование организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetails](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | short_name | Сокращенное наименование организации | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-BaseDeal.md000064400000032571150364342670017762 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Model\Deal\BaseDeal ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Класс, представляющий модель BaseDeal. **Description:** Базовая сущность сделки. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Model-Deal-BaseDeal.md#property_type) | | Тип сделки | | protected | [$_type](../classes/YooKassa-Model-Deal-BaseDeal.md#property__type) | | Тип сделки | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getType()](../classes/YooKassa-Model-Deal-BaseDeal.md#method_getType) | | Возвращает тип сделки. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setType()](../classes/YooKassa-Model-Deal-BaseDeal.md#method_setType) | | Устанавливает тип сделки. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Deal/BaseDeal.php](../../lib/Model/Deal/BaseDeal.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Deal\BaseDeal * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Abstract Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип сделки **Type:** string **Details:** #### protected $_type : ?string --- **Summary** Тип сделки **Type:** ?string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-PersonalData-PersonalData.md000064400000102156150364342670022404 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\PersonalData\PersonalData ### Namespace: [\YooKassa\Model\PersonalData](../namespaces/yookassa-model-personaldata.md) --- **Summary:** Класс, представляющий модель PersonalData. **Description:** Информация о персональных данных --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$cancellation_details](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_cancellation_details) | | Комментарий к отмене выплаты | | public | [$cancellationDetails](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_cancellationDetails) | | Комментарий к отмене выплаты | | public | [$created_at](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_created_at) | | Время создания персональных данных | | public | [$createdAt](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_createdAt) | | Время создания персональных данных | | public | [$expires_at](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_expires_at) | | Срок жизни объекта персональных данных | | public | [$expiresAt](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_expiresAt) | | Срок жизни объекта персональных данных | | public | [$id](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_id) | | Идентификатор персональных данных | | public | [$metadata](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_metadata) | | Метаданные выплаты указанные мерчантом | | public | [$status](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_status) | | Текущий статус персональных данных | | public | [$type](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_type) | | Тип персональных данных | | protected | [$_cancellation_details](../classes/YooKassa-Model-PersonalData-PersonalData.md#property__cancellation_details) | | Комментарий к статусу canceled: кто и по какой причине аннулировал хранение данных. | | protected | [$_created_at](../classes/YooKassa-Model-PersonalData-PersonalData.md#property__created_at) | | Время создания персональных данных. | | protected | [$_expires_at](../classes/YooKassa-Model-PersonalData-PersonalData.md#property__expires_at) | | Срок жизни объекта персональных данных — время, до которого вы можете использовать персональные данные при проведении операций. | | protected | [$_id](../classes/YooKassa-Model-PersonalData-PersonalData.md#property__id) | | Идентификатор персональных данных, сохраненных в ЮKassa. | | protected | [$_metadata](../classes/YooKassa-Model-PersonalData-PersonalData.md#property__metadata) | | Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). | | protected | [$_status](../classes/YooKassa-Model-PersonalData-PersonalData.md#property__status) | | Статус персональных данных. | | protected | [$_type](../classes/YooKassa-Model-PersonalData-PersonalData.md#property__type) | | Тип персональных данных — цель, для которой вы будете использовать данные. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCancellationDetails()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_getCancellationDetails) | | Возвращает комментарий к статусу canceled: кто и по какой причине аннулировал хранение данных. | | public | [getCreatedAt()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_getCreatedAt) | | Возвращает время создания персональных данных. | | public | [getExpiresAt()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_getExpiresAt) | | Возвращает срок жизни объекта персональных данных. | | public | [getId()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_getId) | | Возвращает идентификатор персональных данных, сохраненных в ЮKassa. | | public | [getMetadata()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_getMetadata) | | Возвращает любые дополнительные данные. | | public | [getStatus()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_getStatus) | | Возвращает статус персональных данных. | | public | [getType()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_getType) | | Возвращает тип персональных данных. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCancellationDetails()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_setCancellationDetails) | | Устанавливает Комментарий к статусу canceled: кто и по какой причине аннулировал хранение данных. | | public | [setCreatedAt()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_setCreatedAt) | | Устанавливает время создания персональных данных. | | public | [setExpiresAt()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_setExpiresAt) | | Устанавливает срок жизни объекта персональных данных. | | public | [setId()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_setId) | | Устанавливает идентификатор персональных данных, сохраненных в ЮKassa. | | public | [setMetadata()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_setMetadata) | | Устанавливает любые дополнительные данные. | | public | [setStatus()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_setStatus) | | Устанавливает статус персональных данных. | | public | [setType()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_setType) | | Устанавливает тип персональных данных. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/PersonalData/PersonalData.php](../../lib/Model/PersonalData/PersonalData.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\PersonalData\PersonalData * Implements: * [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $cancellation_details : \YooKassa\Model\PersonalData\PersonalDataCancellationDetails --- ***Description*** Комментарий к отмене выплаты **Type:** PersonalDataCancellationDetails **Details:** #### public $cancellationDetails : \YooKassa\Model\PersonalData\PersonalDataCancellationDetails --- ***Description*** Комментарий к отмене выплаты **Type:** PersonalDataCancellationDetails **Details:** #### public $created_at : \DateTime --- ***Description*** Время создания персональных данных **Type:** \DateTime **Details:** #### public $createdAt : \DateTime --- ***Description*** Время создания персональных данных **Type:** \DateTime **Details:** #### public $expires_at : null|\DateTime --- ***Description*** Срок жизни объекта персональных данных **Type:** DateTime **Details:** #### public $expiresAt : null|\DateTime --- ***Description*** Срок жизни объекта персональных данных **Type:** DateTime **Details:** #### public $id : string --- ***Description*** Идентификатор персональных данных **Type:** string **Details:** #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные выплаты указанные мерчантом **Type:** Metadata **Details:** #### public $status : string --- ***Description*** Текущий статус персональных данных **Type:** string **Details:** #### public $type : string --- ***Description*** Тип персональных данных **Type:** string **Details:** #### protected $_cancellation_details : ?\YooKassa\Model\PersonalData\PersonalDataCancellationDetails --- **Summary** Комментарий к статусу canceled: кто и по какой причине аннулировал хранение данных. **Type:** PersonalDataCancellationDetails **Details:** #### protected $_created_at : ?\DateTime --- **Summary** Время создания персональных данных. ***Description*** Указывается по [UTC](https://ru.wikipedia.org/wiki/Всемирное_координированное_время) и передается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). Пример: ~`2017-11-03T11:52:31.827Z` **Type:** DateTime **Details:** #### protected $_expires_at : ?\DateTime --- **Summary** Срок жизни объекта персональных данных — время, до которого вы можете использовать персональные данные при проведении операций. ***Description*** Указывается только для объекта в статусе ~`active`. Указывается по [UTC](https://ru.wikipedia.org/wiki/Всемирное_координированное_время) и передается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). Пример: ~`2017-11-03T11:52:31.827Z` **Type:** DateTime **Details:** #### protected $_id : ?string --- **Summary** Идентификатор персональных данных, сохраненных в ЮKassa. **Type:** ?string **Details:** #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Summary** Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). ***Description*** Передаются в виде набора пар «ключ-значение» и возвращаются в ответе от ЮKassa. Ограничения: максимум 16 ключей, имя ключа не больше 32 символов, значение ключа не больше 512 символов, тип данных — строка в формате UTF-8. **Type:** Metadata **Details:** #### protected $_status : ?string --- **Summary** Статус персональных данных. ***Description*** Возможные значения: * `waiting_for_operation` — данные сохранены, но не использованы при проведении выплаты; * `active` — данные сохранены и использованы при проведении выплаты; данные можно использовать повторно до срока, указанного в параметре `expires_at`; * `canceled` — хранение данных отменено, данные удалены, инициатор и причина отмены указаны в объекте `cancellation_details` (финальный и неизменяемый статус). **Type:** ?string **Details:** #### protected $_type : ?string --- **Summary** Тип персональных данных — цель, для которой вы будете использовать данные. ***Description*** Возможное значение: `sbp_payout_recipient` — выплаты с [проверкой получателя](/developers/payouts/scenario-extensions/recipient-check). **Type:** ?string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCancellationDetails() : \YooKassa\Model\PersonalData\PersonalDataCancellationDetails|null ```php public getCancellationDetails() : \YooKassa\Model\PersonalData\PersonalDataCancellationDetails|null ``` **Summary** Возвращает комментарий к статусу canceled: кто и по какой причине аннулировал хранение данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) **Returns:** \YooKassa\Model\PersonalData\PersonalDataCancellationDetails|null - Комментарий к статусу canceled #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) **Returns:** \DateTime|null - Время создания персональных данных #### public getExpiresAt() : \DateTime|null ```php public getExpiresAt() : \DateTime|null ``` **Summary** Возвращает срок жизни объекта персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) **Returns:** \DateTime|null - Срок жизни объекта персональных данных #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор персональных данных, сохраненных в ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) **Returns:** string|null - #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает любые дополнительные данные. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) **Returns:** \YooKassa\Model\Metadata|null - Любые дополнительные данные #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) **Returns:** string|null - Статус персональных данных #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) **Returns:** string|null - Тип персональных данных #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\PersonalData\PersonalDataCancellationDetails|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает Комментарий к статусу canceled: кто и по какой причине аннулировал хранение данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\PersonalData\PersonalDataCancellationDetails OR array OR null | cancellation_details | Комментарий к статусу canceled | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания персональных данных. | **Returns:** self - #### public setExpiresAt() : self ```php public setExpiresAt(\DateTime|string|null $expires_at = null) : self ``` **Summary** Устанавливает срок жизни объекта персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at | Срок жизни объекта персональных данных | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор персональных данных, сохраненных в ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор персональных данных, сохраненных в ЮKassa. | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает любые дополнительные данные. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Любые дополнительные данные | **Returns:** self - #### public setStatus() : $this ```php public setStatus(string|null $status = null) : $this ``` **Summary** Устанавливает статус персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус персональных данных | **Returns:** $this - #### public setType() : self ```php public setType(?string $type = null) : self ``` **Summary** Устанавливает тип персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?string | type | Тип персональных данных | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentInterface.md000064400000043100150364342670022316 0ustar00# [YooKassa API SDK](../home.md) # Interface: PaymentInterface ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Interface PaymentInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAmount()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getAmount) | | Возвращает сумму. | | public | [getAuthorizationDetails()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getAuthorizationDetails) | | Возвращает данные об авторизации платежа. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getCancellationDetails) | | Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [getCapturedAt()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getCapturedAt) | | Возвращает время подтверждения платежа магазином или null, если время не задано. | | public | [getConfirmation()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getConfirmation) | | Возвращает способ подтверждения платежа. | | public | [getCreatedAt()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getCreatedAt) | | Возвращает время создания заказа. | | public | [getDeal()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getDeal) | | Возвращает сделку, в рамках которой нужно провести платеж. | | public | [getExpiresAt()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getExpiresAt) | | Возвращает время до которого можно бесплатно отменить или подтвердить платеж, или null, если оно не задано. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getId) | | Возвращает идентификатор платежа. | | public | [getIncomeAmount()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getIncomeAmount) | | Возвращает сумму перечисляемая магазину за вычетом комиссий платежной системы.(только для успешных платежей). | | public | [getMetadata()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getMetadata) | | Возвращает метаданные платежа установленные мерчантом | | public | [getPaid()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getPaid) | | Проверяет, был ли уже оплачен заказ. | | public | [getPaymentMethod()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getPaymentMethod) | | Возвращает используемый способ проведения платежа. | | public | [getReceiptRegistration()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getReceiptRegistration) | | Возвращает состояние регистрации фискального чека. | | public | [getRecipient()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getRecipient) | | Возвращает получателя платежа. | | public | [getRefundable()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getRefundable) | | Возможность провести возврат по API. | | public | [getRefundedAmount()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getRefundedAmount) | | Возвращает сумму возвращенных средств. | | public | [getStatus()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getStatus) | | Возвращает состояние платежа. | | public | [getTransfers()](../classes/YooKassa-Model-Payment-PaymentInterface.md#method_getTransfers) | | Возвращает данные о распределении платежа между магазинами. | --- ### Details * File: [lib/Model/Payment/PaymentInterface.php](../../lib/Model/Payment/PaymentInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Идентификатор платежа | | property | | Текущее состояние платежа | | property | | Получатель платежа | | property | | Сумма заказа | | property | | Описание транзакции | | property | | Способ проведения платежа | | property | | Способ проведения платежа | | property | | Время создания заказа | | property | | Время создания заказа | | property | | Время подтверждения платежа магазином | | property | | Время подтверждения платежа магазином | | property | | Время, до которого можно бесплатно отменить или подтвердить платеж | | property | | Время, до которого можно бесплатно отменить или подтвердить платеж | | property | | Способ подтверждения платежа | | property | | Сумма возвращенных средств платежа | | property | | Сумма возвращенных средств платежа | | property | | Признак оплаты заказа | | property | | Возможность провести возврат по API | | property | | Состояние регистрации фискального чека | | property | | Состояние регистрации фискального чека | | property | | Метаданные платежа указанные мерчантом | | property | | Признак тестовой операции | | property | | Комментарий к отмене платежа | | property | | Комментарий к отмене платежа | | property | | Данные об авторизации платежа | | property | | Данные об авторизации платежа | | property | | Данные о распределении платежа между магазинами | | property | | Сумма платежа, которую получит магазин | | property | | Сумма платежа, которую получит магазин | | property | | Данные о сделке, в составе которой проходит платеж | | property | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | property | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | --- ## Methods #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** string|null - Идентификатор платежа #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает состояние платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** string|null - Текущее состояние платежа #### public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ```php public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ``` **Summary** Возвращает получателя платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** null|\YooKassa\Model\Payment\RecipientInterface - Получатель платежа или null, если получатель не задан #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма платежа #### public getPaymentMethod() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null ```php public getPaymentMethod() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null ``` **Summary** Возвращает используемый способ проведения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null - Способ проведения платежа #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** \DateTime|null - Время создания заказа #### public getCapturedAt() : null|\DateTime ```php public getCapturedAt() : null|\DateTime ``` **Summary** Возвращает время подтверждения платежа магазином или null, если время не задано. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** null|\DateTime - Время подтверждения платежа магазином #### public getConfirmation() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null ```php public getConfirmation() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null ``` **Summary** Возвращает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null - Способ подтверждения платежа #### public getRefundedAmount() : \YooKassa\Model\AmountInterface|null ```php public getRefundedAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму возвращенных средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма возвращенных средств платежа #### public getPaid() : bool ```php public getPaid() : bool ``` **Summary** Проверяет, был ли уже оплачен заказ. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** bool - Признак оплаты заказа, true если заказ оплачен, false если нет #### public getRefundable() : bool ```php public getRefundable() : bool ``` **Summary** Возможность провести возврат по API. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** bool - Возможность провести возврат по API #### public getReceiptRegistration() : string|null ```php public getReceiptRegistration() : string|null ``` **Summary** Возвращает состояние регистрации фискального чека. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** string|null - Состояние регистрации фискального чека #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает метаданные платежа установленные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные платежа указанные мерчантом #### public getExpiresAt() : null|\DateTime ```php public getExpiresAt() : null|\DateTime ``` **Summary** Возвращает время до которого можно бесплатно отменить или подтвердить платеж, или null, если оно не задано. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** null|\DateTime - Время, до которого можно бесплатно отменить или подтвердить платеж #### public getCancellationDetails() : null|\YooKassa\Model\CancellationDetailsInterface ```php public getCancellationDetails() : null|\YooKassa\Model\CancellationDetailsInterface ``` **Summary** Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** null|\YooKassa\Model\CancellationDetailsInterface - Комментарий к статусу canceled #### public getAuthorizationDetails() : null|\YooKassa\Model\Payment\AuthorizationDetailsInterface ```php public getAuthorizationDetails() : null|\YooKassa\Model\Payment\AuthorizationDetailsInterface ``` **Summary** Возвращает данные об авторизации платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** null|\YooKassa\Model\Payment\AuthorizationDetailsInterface - Данные об авторизации платежа #### public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface ```php public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает данные о распределении платежа между магазинами. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface - #### public getIncomeAmount() : ?\YooKassa\Model\AmountInterface ```php public getIncomeAmount() : ?\YooKassa\Model\AmountInterface ``` **Summary** Возвращает сумму перечисляемая магазину за вычетом комиссий платежной системы.(только для успешных платежей). **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** ?\YooKassa\Model\AmountInterface - #### public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ``` **Summary** Возвращает сделку, в рамках которой нужно провести платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) **Returns:** \YooKassa\Model\Deal\PaymentDealInfo|null - Сделка, в рамках которой нужно провести платеж --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-SafeDeal.md000064400000113004150364342670017755 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Deal\SafeDeal ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Класс, представляющий модель SafeDeal. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_ID](../classes/YooKassa-Model-Deal-SafeDeal.md#constant_MAX_LENGTH_ID) | | | | public | [MIN_LENGTH_ID](../classes/YooKassa-Model-Deal-SafeDeal.md#constant_MIN_LENGTH_ID) | | | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Deal-SafeDeal.md#constant_MAX_LENGTH_DESCRIPTION) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property_balance) | | Баланс сделки. | | public | [$created_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property_created_at) | | Время создания сделки. | | public | [$createdAt](../classes/YooKassa-Model-Deal-SafeDeal.md#property_createdAt) | | Время создания сделки. | | public | [$description](../classes/YooKassa-Model-Deal-SafeDeal.md#property_description) | | Описание сделки (не более 128 символов). | | public | [$expires_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property_expires_at) | | Время автоматического закрытия сделки. | | public | [$expiresAt](../classes/YooKassa-Model-Deal-SafeDeal.md#property_expiresAt) | | Время автоматического закрытия сделки. | | public | [$fee_moment](../classes/YooKassa-Model-Deal-SafeDeal.md#property_fee_moment) | | Момент перечисления вам вознаграждения платформы. | | public | [$feeMoment](../classes/YooKassa-Model-Deal-SafeDeal.md#property_feeMoment) | | Момент перечисления вам вознаграждения платформы. | | public | [$id](../classes/YooKassa-Model-Deal-SafeDeal.md#property_id) | | Идентификатор сделки. | | public | [$metadata](../classes/YooKassa-Model-Deal-SafeDeal.md#property_metadata) | | Любые дополнительные данные, которые нужны вам для работы. | | public | [$payout_balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property_payout_balance) | | Сумма вознаграждения продавцаю. | | public | [$payoutBalance](../classes/YooKassa-Model-Deal-SafeDeal.md#property_payoutBalance) | | Сумма вознаграждения продавца. | | public | [$status](../classes/YooKassa-Model-Deal-SafeDeal.md#property_status) | | Статус сделки. | | public | [$test](../classes/YooKassa-Model-Deal-SafeDeal.md#property_test) | | Признак тестовой операции. | | public | [$type](../classes/YooKassa-Model-Deal-BaseDeal.md#property_type) | | Тип сделки | | protected | [$_balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property__balance) | | Баланс сделки | | protected | [$_created_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property__created_at) | | Время создания сделки. | | protected | [$_description](../classes/YooKassa-Model-Deal-SafeDeal.md#property__description) | | Описание сделки (не более 128 символов). Используется для фильтрации при [получении списка сделок](/developers/api#get_deals_list). | | protected | [$_expires_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property__expires_at) | | Время автоматического закрытия сделки. | | protected | [$_fee_moment](../classes/YooKassa-Model-Deal-SafeDeal.md#property__fee_moment) | | Момент перечисления вам вознаграждения платформы | | protected | [$_id](../classes/YooKassa-Model-Deal-SafeDeal.md#property__id) | | Идентификатор сделки. | | protected | [$_metadata](../classes/YooKassa-Model-Deal-SafeDeal.md#property__metadata) | | Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). | | protected | [$_payout_balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property__payout_balance) | | Сумма вознаграждения продавца | | protected | [$_status](../classes/YooKassa-Model-Deal-SafeDeal.md#property__status) | | Статус сделки | | protected | [$_test](../classes/YooKassa-Model-Deal-SafeDeal.md#property__test) | | Признак тестовой операции. | | protected | [$_type](../classes/YooKassa-Model-Deal-BaseDeal.md#property__type) | | Тип сделки | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Deal-SafeDeal.md#method___construct) | | Конструктор SafeDeal. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getBalance) | | Возвращает баланс сделки. | | public | [getCreatedAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getCreatedAt) | | Возвращает время создания сделки. | | public | [getDescription()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getDescription) | | Возвращает описание сделки (не более 128 символов). | | public | [getExpiresAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getExpiresAt) | | Возвращает время автоматического закрытия сделки. | | public | [getFeeMoment()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getFeeMoment) | | Возвращает момент перечисления вам вознаграждения платформы. | | public | [getId()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getId) | | Возвращает Id сделки. | | public | [getMetadata()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getMetadata) | | Возвращает дополнительные данные сделки. | | public | [getPayoutBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getPayoutBalance) | | Возвращает сумму вознаграждения продавца. | | public | [getStatus()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getStatus) | | Возвращает статус сделки. | | public | [getTest()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getType()](../classes/YooKassa-Model-Deal-BaseDeal.md#method_getType) | | Возвращает тип сделки. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setBalance) | | Устанавливает баланс сделки. | | public | [setCreatedAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setCreatedAt) | | Устанавливает created_at. | | public | [setDescription()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setDescription) | | Устанавливает описание сделки (не более 128 символов). | | public | [setExpiresAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setExpiresAt) | | Устанавливает время автоматического закрытия сделки. | | public | [setFeeMoment()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setFeeMoment) | | Устанавливает момент перечисления вам вознаграждения платформы. | | public | [setId()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setId) | | Устанавливает Id сделки. | | public | [setMetadata()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setMetadata) | | Устанавливает metadata. | | public | [setPayoutBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setPayoutBalance) | | Устанавливает сумму вознаграждения продавца. | | public | [setStatus()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setStatus) | | Устанавливает статус сделки. | | public | [setTest()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [setType()](../classes/YooKassa-Model-Deal-BaseDeal.md#method_setType) | | Устанавливает тип сделки. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Deal/SafeDeal.php](../../lib/Model/Deal/SafeDeal.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) * \YooKassa\Model\Deal\SafeDeal * Implements: * [\YooKassa\Model\Deal\DealInterface](../classes/YooKassa-Model-Deal-DealInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_ID ```php MAX_LENGTH_ID = 50 : int ``` ###### MIN_LENGTH_ID ```php MIN_LENGTH_ID = 36 : int ``` ###### MAX_LENGTH_DESCRIPTION ```php MAX_LENGTH_DESCRIPTION = 128 : int ``` --- ## Properties #### public $balance : \YooKassa\Model\AmountInterface --- ***Description*** Баланс сделки. **Type:** AmountInterface **Details:** #### public $created_at : \DateTime --- ***Description*** Время создания сделки. **Type:** \DateTime **Details:** #### public $createdAt : \DateTime --- ***Description*** Время создания сделки. **Type:** \DateTime **Details:** #### public $description : string --- ***Description*** Описание сделки (не более 128 символов). **Type:** string **Details:** #### public $expires_at : \DateTime --- ***Description*** Время автоматического закрытия сделки. **Type:** \DateTime **Details:** #### public $expiresAt : \DateTime --- ***Description*** Время автоматического закрытия сделки. **Type:** \DateTime **Details:** #### public $fee_moment : string --- ***Description*** Момент перечисления вам вознаграждения платформы. **Type:** string **Details:** #### public $feeMoment : string --- ***Description*** Момент перечисления вам вознаграждения платформы. **Type:** string **Details:** #### public $id : string --- ***Description*** Идентификатор сделки. **Type:** string **Details:** #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Любые дополнительные данные, которые нужны вам для работы. **Type:** Metadata **Details:** #### public $payout_balance : \YooKassa\Model\AmountInterface --- ***Description*** Сумма вознаграждения продавцаю. **Type:** AmountInterface **Details:** #### public $payoutBalance : \YooKassa\Model\AmountInterface --- ***Description*** Сумма вознаграждения продавца. **Type:** AmountInterface **Details:** #### public $status : string --- ***Description*** Статус сделки. **Type:** string **Details:** #### public $test : bool --- ***Description*** Признак тестовой операции. **Type:** bool **Details:** #### public $type : string --- ***Description*** Тип сделки **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) #### protected $_balance : ?\YooKassa\Model\AmountInterface --- **Summary** Баланс сделки **Type:** AmountInterface **Details:** #### protected $_created_at : ?\DateTime --- **Summary** Время создания сделки. **Type:** DateTime **Details:** #### protected $_description : ?string --- **Summary** Описание сделки (не более 128 символов). Используется для фильтрации при [получении списка сделок](/developers/api#get_deals_list). **Type:** ?string **Details:** #### protected $_expires_at : ?\DateTime --- **Summary** Время автоматического закрытия сделки. **Type:** DateTime **Details:** #### protected $_fee_moment : ?string --- **Summary** Момент перечисления вам вознаграждения платформы **Type:** ?string **Details:** #### protected $_id : ?string --- **Summary** Идентификатор сделки. **Type:** ?string **Details:** #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Summary** Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). **Type:** Metadata **Details:** #### protected $_payout_balance : ?\YooKassa\Model\AmountInterface --- **Summary** Сумма вознаграждения продавца **Type:** AmountInterface **Details:** #### protected $_status : ?string --- **Summary** Статус сделки **Type:** ?string **Details:** #### protected $_test : ?bool --- **Summary** Признак тестовой операции. **Type:** ?bool **Details:** #### protected $_type : ?string --- **Summary** Тип сделки **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** Конструктор SafeDeal. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getBalance() : \YooKassa\Model\AmountInterface|null ```php public getBalance() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает баланс сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \YooKassa\Model\AmountInterface|null - Баланс сделки #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \DateTime|null - Время создания сделки #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание сделки (не более 128 символов). **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Описание сделки #### public getExpiresAt() : \DateTime|null ```php public getExpiresAt() : \DateTime|null ``` **Summary** Возвращает время автоматического закрытия сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \DateTime|null - Время автоматического закрытия сделки #### public getFeeMoment() : string|null ```php public getFeeMoment() : string|null ``` **Summary** Возвращает момент перечисления вам вознаграждения платформы. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Момент перечисления вознаграждения #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Id сделки #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает дополнительные данные сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \YooKassa\Model\Metadata|null - Дополнительные данные сделки #### public getPayoutBalance() : \YooKassa\Model\AmountInterface|null ```php public getPayoutBalance() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму вознаграждения продавца. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма вознаграждения продавца #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Статус сделки #### public getTest() : bool|null ```php public getTest() : bool|null ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** bool|null - Признак тестовой операции #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setBalance() : self ```php public setBalance(\YooKassa\Model\AmountInterface|array|null $balance = null) : self ``` **Summary** Устанавливает баланс сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | balance | | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает created_at. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания сделки. | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание сделки (не более 128 символов). **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Описание сделки (не более 128 символов). | **Returns:** self - #### public setExpiresAt() : self ```php public setExpiresAt(\DateTime|string|null $expires_at = null) : self ``` **Summary** Устанавливает время автоматического закрытия сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at | Время автоматического закрытия сделки. | **Returns:** self - #### public setFeeMoment() : self ```php public setFeeMoment(string|null $fee_moment = null) : self ``` **Summary** Устанавливает момент перечисления вам вознаграждения платформы. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fee_moment | Момент перечисления вам вознаграждения платформы | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор сделки. | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает metadata. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Любые дополнительные данные, которые нужны вам для работы. | **Returns:** self - #### public setPayoutBalance() : self ```php public setPayoutBalance(\YooKassa\Model\AmountInterface|array|null $payout_balance = null) : self ``` **Summary** Устанавливает сумму вознаграждения продавца. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | payout_balance | Сумма вознаграждения продавца | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус сделки | **Returns:** self - #### public setTest() : self ```php public setTest(bool|null $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | test | Признак тестовой операции | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md000064400000016646150364342670024162 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\BankCardType ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель BankCardType. **Description:** Тип банковской карты. Возможные значения: - `MasterCard` (для карт Mastercard и Maestro), - `Visa` (для карт Visa и Visa Electron), - `Mir`, - `UnionPay`, - `JCB`, - `AmericanExpress`, - `DinersClub`, - `DiscoverCard`, - `InstaPayment`, - `InstaPaymentTM`, - `Laser`, - `Dankort`, - `Solo`, - `Switch`, - `Unknown`. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MASTER_CARD](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_MASTER_CARD) | | | | public | [VISA](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_VISA) | | | | public | [MIR](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_MIR) | | | | public | [UNION_PAY](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_UNION_PAY) | | | | public | [JCB](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_JCB) | | | | public | [AMERICAN_EXPRESS](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_AMERICAN_EXPRESS) | | | | public | [DINERS_CLUB](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_DINERS_CLUB) | | | | public | [DISCOVER_CARD_CLUB](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_DISCOVER_CARD_CLUB) | | | | public | [INSTA_PAYMENT_CLUB](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_INSTA_PAYMENT_CLUB) | | | | public | [INSTA_PAYMENT_TM_CLUB](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_INSTA_PAYMENT_TM_CLUB) | | | | public | [LASER_CLUB](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_LASER_CLUB) | | | | public | [DANKORT_CLUB](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_DANKORT_CLUB) | | | | public | [SOLO_CLUB](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_SOLO_CLUB) | | | | public | [SWITCH_CLUB](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_SWITCH_CLUB) | | | | public | [UNKNOWN](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#constant_UNKNOWN) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardType.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payment/PaymentMethod/BankCardType.php](../../lib/Model/Payment/PaymentMethod/BankCardType.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payment\PaymentMethod\BankCardType * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MASTER_CARD ```php MASTER_CARD = 'MasterCard' ``` ###### VISA ```php VISA = 'Visa' ``` ###### MIR ```php MIR = 'Mir' ``` ###### UNION_PAY ```php UNION_PAY = 'UnionPay' ``` ###### JCB ```php JCB = 'JCB' ``` ###### AMERICAN_EXPRESS ```php AMERICAN_EXPRESS = 'AmericanExpress' ``` ###### DINERS_CLUB ```php DINERS_CLUB = 'DinersClub' ``` ###### DISCOVER_CARD_CLUB ```php DISCOVER_CARD_CLUB = 'DiscoverCard' ``` ###### INSTA_PAYMENT_CLUB ```php INSTA_PAYMENT_CLUB = 'InstaPayment' ``` ###### INSTA_PAYMENT_TM_CLUB ```php INSTA_PAYMENT_TM_CLUB = 'InstaPaymentTM' ``` ###### LASER_CLUB ```php LASER_CLUB = 'Laser' ``` ###### DANKORT_CLUB ```php DANKORT_CLUB = 'Dankort' ``` ###### SOLO_CLUB ```php SOLO_CLUB = 'Solo' ``` ###### SWITCH_CLUB ```php SWITCH_CLUB = 'Switch' ``` ###### UNKNOWN ```php UNKNOWN = 'Unknown' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Deals-CreateDealResponse.md000064400000120420150364342670022574 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Deals\CreateDealResponse ### Namespace: [\YooKassa\Request\Deals](../namespaces/yookassa-request-deals.md) --- **Summary:** Класс, представляющий CreateDealResponse. **Description:** Класс объекта ответа возвращаемого API при запросе на создание сделки. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_ID](../classes/YooKassa-Model-Deal-SafeDeal.md#constant_MAX_LENGTH_ID) | | | | public | [MIN_LENGTH_ID](../classes/YooKassa-Model-Deal-SafeDeal.md#constant_MIN_LENGTH_ID) | | | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Deal-SafeDeal.md#constant_MAX_LENGTH_DESCRIPTION) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property_balance) | | Баланс сделки. | | public | [$created_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property_created_at) | | Время создания сделки. | | public | [$createdAt](../classes/YooKassa-Model-Deal-SafeDeal.md#property_createdAt) | | Время создания сделки. | | public | [$description](../classes/YooKassa-Model-Deal-SafeDeal.md#property_description) | | Описание сделки (не более 128 символов). | | public | [$expires_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property_expires_at) | | Время автоматического закрытия сделки. | | public | [$expiresAt](../classes/YooKassa-Model-Deal-SafeDeal.md#property_expiresAt) | | Время автоматического закрытия сделки. | | public | [$fee_moment](../classes/YooKassa-Model-Deal-SafeDeal.md#property_fee_moment) | | Момент перечисления вам вознаграждения платформы. | | public | [$feeMoment](../classes/YooKassa-Model-Deal-SafeDeal.md#property_feeMoment) | | Момент перечисления вам вознаграждения платформы. | | public | [$id](../classes/YooKassa-Model-Deal-SafeDeal.md#property_id) | | Идентификатор сделки. | | public | [$metadata](../classes/YooKassa-Model-Deal-SafeDeal.md#property_metadata) | | Любые дополнительные данные, которые нужны вам для работы. | | public | [$payout_balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property_payout_balance) | | Сумма вознаграждения продавцаю. | | public | [$payoutBalance](../classes/YooKassa-Model-Deal-SafeDeal.md#property_payoutBalance) | | Сумма вознаграждения продавца. | | public | [$status](../classes/YooKassa-Model-Deal-SafeDeal.md#property_status) | | Статус сделки. | | public | [$test](../classes/YooKassa-Model-Deal-SafeDeal.md#property_test) | | Признак тестовой операции. | | public | [$type](../classes/YooKassa-Model-Deal-BaseDeal.md#property_type) | | Тип сделки | | protected | [$_balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property__balance) | | Баланс сделки | | protected | [$_created_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property__created_at) | | Время создания сделки. | | protected | [$_description](../classes/YooKassa-Model-Deal-SafeDeal.md#property__description) | | Описание сделки (не более 128 символов). Используется для фильтрации при [получении списка сделок](/developers/api#get_deals_list). | | protected | [$_expires_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property__expires_at) | | Время автоматического закрытия сделки. | | protected | [$_fee_moment](../classes/YooKassa-Model-Deal-SafeDeal.md#property__fee_moment) | | Момент перечисления вам вознаграждения платформы | | protected | [$_id](../classes/YooKassa-Model-Deal-SafeDeal.md#property__id) | | Идентификатор сделки. | | protected | [$_metadata](../classes/YooKassa-Model-Deal-SafeDeal.md#property__metadata) | | Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). | | protected | [$_payout_balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property__payout_balance) | | Сумма вознаграждения продавца | | protected | [$_status](../classes/YooKassa-Model-Deal-SafeDeal.md#property__status) | | Статус сделки | | protected | [$_test](../classes/YooKassa-Model-Deal-SafeDeal.md#property__test) | | Признак тестовой операции. | | protected | [$_type](../classes/YooKassa-Model-Deal-BaseDeal.md#property__type) | | Тип сделки | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getBalance) | | Возвращает баланс сделки. | | public | [getCreatedAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getCreatedAt) | | Возвращает время создания сделки. | | public | [getDescription()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getDescription) | | Возвращает описание сделки (не более 128 символов). | | public | [getExpiresAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getExpiresAt) | | Возвращает время автоматического закрытия сделки. | | public | [getFeeMoment()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getFeeMoment) | | Возвращает момент перечисления вам вознаграждения платформы. | | public | [getId()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getId) | | Возвращает Id сделки. | | public | [getMetadata()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getMetadata) | | Возвращает дополнительные данные сделки. | | public | [getPayoutBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getPayoutBalance) | | Возвращает сумму вознаграждения продавца. | | public | [getStatus()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getStatus) | | Возвращает статус сделки. | | public | [getTest()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getType()](../classes/YooKassa-Model-Deal-BaseDeal.md#method_getType) | | Возвращает тип сделки. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setBalance) | | Устанавливает баланс сделки. | | public | [setCreatedAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setCreatedAt) | | Устанавливает created_at. | | public | [setDescription()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setDescription) | | Устанавливает описание сделки (не более 128 символов). | | public | [setExpiresAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setExpiresAt) | | Устанавливает время автоматического закрытия сделки. | | public | [setFeeMoment()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setFeeMoment) | | Устанавливает момент перечисления вам вознаграждения платформы. | | public | [setId()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setId) | | Устанавливает Id сделки. | | public | [setMetadata()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setMetadata) | | Устанавливает metadata. | | public | [setPayoutBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setPayoutBalance) | | Устанавливает сумму вознаграждения продавца. | | public | [setStatus()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setStatus) | | Устанавливает статус сделки. | | public | [setTest()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [setType()](../classes/YooKassa-Model-Deal-BaseDeal.md#method_setType) | | Устанавливает тип сделки. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Deals/CreateDealResponse.php](../../lib/Request/Deals/CreateDealResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) * [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) * [\YooKassa\Request\Deals\AbstractDealResponse](../classes/YooKassa-Request-Deals-AbstractDealResponse.md) * \YooKassa\Request\Deals\CreateDealResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Abstract Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_ID Inherited from [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ```php MAX_LENGTH_ID = 50 : int ``` ###### MIN_LENGTH_ID Inherited from [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ```php MIN_LENGTH_ID = 36 : int ``` ###### MAX_LENGTH_DESCRIPTION Inherited from [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ```php MAX_LENGTH_DESCRIPTION = 128 : int ``` --- ## Properties #### public $balance : \YooKassa\Model\AmountInterface --- ***Description*** Баланс сделки. **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $created_at : \DateTime --- ***Description*** Время создания сделки. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $createdAt : \DateTime --- ***Description*** Время создания сделки. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $description : string --- ***Description*** Описание сделки (не более 128 символов). **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $expires_at : \DateTime --- ***Description*** Время автоматического закрытия сделки. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $expiresAt : \DateTime --- ***Description*** Время автоматического закрытия сделки. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $fee_moment : string --- ***Description*** Момент перечисления вам вознаграждения платформы. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $feeMoment : string --- ***Description*** Момент перечисления вам вознаграждения платформы. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $id : string --- ***Description*** Идентификатор сделки. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Любые дополнительные данные, которые нужны вам для работы. **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $payout_balance : \YooKassa\Model\AmountInterface --- ***Description*** Сумма вознаграждения продавцаю. **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $payoutBalance : \YooKassa\Model\AmountInterface --- ***Description*** Сумма вознаграждения продавца. **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $status : string --- ***Description*** Статус сделки. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $test : bool --- ***Description*** Признак тестовой операции. **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $type : string --- ***Description*** Тип сделки **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) #### protected $_balance : ?\YooKassa\Model\AmountInterface --- **Summary** Баланс сделки **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_created_at : ?\DateTime --- **Summary** Время создания сделки. **Type:** DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_description : ?string --- **Summary** Описание сделки (не более 128 символов). Используется для фильтрации при [получении списка сделок](/developers/api#get_deals_list). **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_expires_at : ?\DateTime --- **Summary** Время автоматического закрытия сделки. **Type:** DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_fee_moment : ?string --- **Summary** Момент перечисления вам вознаграждения платформы **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_id : ?string --- **Summary** Идентификатор сделки. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Summary** Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_payout_balance : ?\YooKassa\Model\AmountInterface --- **Summary** Сумма вознаграждения продавца **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_status : ?string --- **Summary** Статус сделки **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_test : ?bool --- **Summary** Признак тестовой операции. **Type:** ?bool **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_type : ?string --- **Summary** Тип сделки **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getBalance() : \YooKassa\Model\AmountInterface|null ```php public getBalance() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает баланс сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \YooKassa\Model\AmountInterface|null - Баланс сделки #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \DateTime|null - Время создания сделки #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание сделки (не более 128 символов). **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Описание сделки #### public getExpiresAt() : \DateTime|null ```php public getExpiresAt() : \DateTime|null ``` **Summary** Возвращает время автоматического закрытия сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \DateTime|null - Время автоматического закрытия сделки #### public getFeeMoment() : string|null ```php public getFeeMoment() : string|null ``` **Summary** Возвращает момент перечисления вам вознаграждения платформы. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Момент перечисления вознаграждения #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Id сделки #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает дополнительные данные сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \YooKassa\Model\Metadata|null - Дополнительные данные сделки #### public getPayoutBalance() : \YooKassa\Model\AmountInterface|null ```php public getPayoutBalance() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму вознаграждения продавца. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма вознаграждения продавца #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Статус сделки #### public getTest() : bool|null ```php public getTest() : bool|null ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** bool|null - Признак тестовой операции #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setBalance() : self ```php public setBalance(\YooKassa\Model\AmountInterface|array|null $balance = null) : self ``` **Summary** Устанавливает баланс сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | balance | | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает created_at. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания сделки. | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание сделки (не более 128 символов). **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Описание сделки (не более 128 символов). | **Returns:** self - #### public setExpiresAt() : self ```php public setExpiresAt(\DateTime|string|null $expires_at = null) : self ``` **Summary** Устанавливает время автоматического закрытия сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at | Время автоматического закрытия сделки. | **Returns:** self - #### public setFeeMoment() : self ```php public setFeeMoment(string|null $fee_moment = null) : self ``` **Summary** Устанавливает момент перечисления вам вознаграждения платформы. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fee_moment | Момент перечисления вам вознаграждения платформы | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор сделки. | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает metadata. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Любые дополнительные данные, которые нужны вам для работы. | **Returns:** self - #### public setPayoutBalance() : self ```php public setPayoutBalance(\YooKassa\Model\AmountInterface|array|null $payout_balance = null) : self ``` **Summary** Устанавливает сумму вознаграждения продавца. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | payout_balance | Сумма вознаграждения продавца | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус сделки | **Returns:** self - #### public setTest() : self ```php public setTest(bool|null $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | test | Признак тестовой операции | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodWechat.md000064400000054734150364342670025565 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodWechat ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodWeChat. **Description:** Оплата через WeChat. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodWechat.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodWechat.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodWechat.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodWechat * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | deprecated | | Будет удален в следующих версиях | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodWechat](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodWechat.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedResponse.md000064400000076044150364342670024547 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\SelfEmployed\SelfEmployedResponse ### Namespace: [\YooKassa\Request\SelfEmployed](../namespaces/yookassa-request-selfemployed.md) --- **Summary:** Класс, представляющий модель SelfEmployedResponse. **Description:** Класс объекта ответа, возвращаемого API при запросе информация о самозанятом. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$confirmation](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_confirmation) | | Сценарий подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. | | public | [$created_at](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_created_at) | | Время создания объекта самозанятого. | | public | [$createdAt](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_createdAt) | | Время создания объекта самозанятого. | | public | [$id](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_id) | | Идентификатор самозанятого в ЮKassa. | | public | [$itn](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_itn) | | ИНН самозанятого. | | public | [$phone](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_phone) | | Телефон самозанятого, который привязан к личному кабинету в сервисе Мой налог. | | public | [$status](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_status) | | Статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков. | | public | [$test](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_test) | | Признак тестовой операции. | | protected | [$_confirmation](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property__confirmation) | | Сценарий подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. | | protected | [$_created_at](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property__created_at) | | Время создания объекта самозанятого. | | protected | [$_id](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property__id) | | Идентификатор самозанятого в ЮKassa. | | protected | [$_itn](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property__itn) | | ИНН самозанятого. Формат: 12 цифр без пробелов. | | protected | [$_phone](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property__phone) | | Телефон самозанятого, который привязан к личному кабинету в сервисе Мой налог. | | protected | [$_status](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property__status) | | Статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков | | protected | [$_test](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property__test) | | Признак тестовой операции | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getConfirmation()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_getConfirmation) | | Возвращает сценарий подтверждения. | | public | [getCreatedAt()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_getCreatedAt) | | Возвращает время создания объекта самозанятого. | | public | [getId()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_getId) | | Возвращает идентификатор самозанятого в ЮKassa. | | public | [getItn()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_getItn) | | Возвращает ИНН самозанятого. | | public | [getPhone()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_getPhone) | | Возвращает телефон самозанятого. | | public | [getStatus()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_getStatus) | | Возвращает статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков. | | public | [getTest()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setConfirmation()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_setConfirmation) | | Устанавливает сценарий подтверждения. | | public | [setCreatedAt()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_setCreatedAt) | | Устанавливает время создания объекта самозанятого. | | public | [setId()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_setId) | | Устанавливает идентификатор самозанятого в ЮKassa. | | public | [setItn()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_setItn) | | Устанавливает ИНН самозанятого. | | public | [setPhone()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_setPhone) | | Устанавливает телефон самозанятого. | | public | [setStatus()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_setStatus) | | Устанавливает статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков. | | public | [setTest()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/SelfEmployed/SelfEmployedResponse.php](../../lib/Request/SelfEmployed/SelfEmployedResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) * \YooKassa\Request\SelfEmployed\SelfEmployedResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $confirmation : null|\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation --- ***Description*** Сценарий подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. **Type:** SelfEmployedConfirmation **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) #### public $created_at : \DateTime --- ***Description*** Время создания объекта самозанятого. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) #### public $createdAt : \DateTime --- ***Description*** Время создания объекта самозанятого. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) #### public $id : string --- ***Description*** Идентификатор самозанятого в ЮKassa. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) #### public $itn : null|string --- ***Description*** ИНН самозанятого. **Type:** null|string **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) #### public $phone : null|string --- ***Description*** Телефон самозанятого, который привязан к личному кабинету в сервисе Мой налог. **Type:** null|string **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) #### public $status : string --- ***Description*** Статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) #### public $test : bool --- ***Description*** Признак тестовой операции. **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) #### protected $_confirmation : ?\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation --- **Summary** Сценарий подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. **Type:** SelfEmployedConfirmation **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) #### protected $_created_at : ?\DateTime --- **Summary** Время создания объекта самозанятого. ***Description*** Указывается по [UTC](https://ru.wikipedia.org/wiki/Всемирное_координированное_время) и передается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). Пример: ~`2017-11-03T11:52:31.827Z **Type:** DateTime **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) #### protected $_id : ?string --- **Summary** Идентификатор самозанятого в ЮKassa. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) #### protected $_itn : ?string --- **Summary** ИНН самозанятого. Формат: 12 цифр без пробелов. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) #### protected $_phone : ?string --- **Summary** Телефон самозанятого, который привязан к личному кабинету в сервисе Мой налог. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) #### protected $_status : ?string --- **Summary** Статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) #### protected $_test : ?bool --- **Summary** Признак тестовой операции **Type:** ?bool **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getConfirmation() : \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation|null ```php public getConfirmation() : \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation|null ``` **Summary** Возвращает сценарий подтверждения. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) **Returns:** \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation|null - Сценарий подтверждения #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания объекта самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) **Returns:** \DateTime|null - Время создания объекта самозанятого #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор самозанятого в ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) **Returns:** string|null - #### public getItn() : string|null ```php public getItn() : string|null ``` **Summary** Возвращает ИНН самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) **Returns:** string|null - #### public getPhone() : string|null ```php public getPhone() : string|null ``` **Summary** Возвращает телефон самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) **Returns:** string|null - Телефон самозанятого #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) **Returns:** string|null - #### public getTest() : bool ```php public getTest() : bool ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) **Returns:** bool - Признак тестовой операции #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setConfirmation() : $this ```php public setConfirmation(\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation|array|null $confirmation = null) : $this ``` **Summary** Устанавливает сценарий подтверждения. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation OR array OR null | confirmation | Сценарий подтверждения | **Returns:** $this - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания объекта самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания объекта самозанятого. | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор самозанятого в ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор самозанятого в ЮKassa. | **Returns:** self - #### public setItn() : self ```php public setItn(string|null $itn = null) : self ``` **Summary** Устанавливает ИНН самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | itn | ИНН самозанятого | **Returns:** self - #### public setPhone() : self ```php public setPhone(string|null $phone = null) : self ``` **Summary** Устанавливает телефон самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | phone | Телефон самозанятого | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус подключения самозанятого | **Returns:** self - #### public setTest() : self ```php public setTest(bool|null $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | test | Признак тестовой операции | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-PaymentMode.md000064400000013344150364342670021267 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\PaymentMode ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Класс, представляющий модель PaymentMode. **Description:** Признак способа расчета (тег в 54 ФЗ — 1214) — отражает тип оплаты и факт передачи товара. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [FULL_PREPAYMENT](../classes/YooKassa-Model-Receipt-PaymentMode.md#constant_FULL_PREPAYMENT) | | Полная предоплата | | public | [PARTIAL_PREPAYMENT](../classes/YooKassa-Model-Receipt-PaymentMode.md#constant_PARTIAL_PREPAYMENT) | | Частичная предоплата | | public | [ADVANCE](../classes/YooKassa-Model-Receipt-PaymentMode.md#constant_ADVANCE) | | Аванс | | public | [FULL_PAYMENT](../classes/YooKassa-Model-Receipt-PaymentMode.md#constant_FULL_PAYMENT) | | Полный расчет | | public | [PARTIAL_PAYMENT](../classes/YooKassa-Model-Receipt-PaymentMode.md#constant_PARTIAL_PAYMENT) | | Частичный расчет и кредит | | public | [CREDIT](../classes/YooKassa-Model-Receipt-PaymentMode.md#constant_CREDIT) | | Кредит | | public | [CREDIT_PAYMENT](../classes/YooKassa-Model-Receipt-PaymentMode.md#constant_CREDIT_PAYMENT) | | Выплата по кредиту | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Receipt-PaymentMode.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Receipt/PaymentMode.php](../../lib/Model/Receipt/PaymentMode.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Receipt\PaymentMode * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### FULL_PREPAYMENT Полная предоплата ```php FULL_PREPAYMENT = 'full_prepayment' ``` ###### PARTIAL_PREPAYMENT Частичная предоплата ```php PARTIAL_PREPAYMENT = 'partial_prepayment' ``` ###### ADVANCE Аванс ```php ADVANCE = 'advance' ``` ###### FULL_PAYMENT Полный расчет ```php FULL_PAYMENT = 'full_payment' ``` ###### PARTIAL_PAYMENT Частичный расчет и кредит ```php PARTIAL_PAYMENT = 'partial_payment' ``` ###### CREDIT Кредит ```php CREDIT = 'credit' ``` ###### CREDIT_PAYMENT Выплата по кредиту ```php CREDIT_PAYMENT = 'credit_payment' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodPsb.md000064400000054730150364342670025072 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodPsb ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodPsb. **Description:** Оплата через Промсвязьбанк. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodPsb.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodPsb.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodPsb.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodPsb * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | deprecated | | Будет удален в следующих версиях | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodPsb](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodPsb.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-LegInterface.md000064400000014423150364342670022171 0ustar00# [YooKassa API SDK](../home.md) # Interface: LegInterface ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Interface PassengerInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getDepartureAirport()](../classes/YooKassa-Request-Payments-LegInterface.md#method_getDepartureAirport) | | Возвращает трёхбуквенный IATA-код аэропорта вылета. | | public | [getDepartureDate()](../classes/YooKassa-Request-Payments-LegInterface.md#method_getDepartureDate) | | Возвращает дату вылета в формате YYYY-MM-DD ISO 8601:2004. | | public | [getDestinationAirport()](../classes/YooKassa-Request-Payments-LegInterface.md#method_getDestinationAirport) | | Возвращает трёхбуквенный IATA-код аэропорта прилёта. | | public | [setDepartureAirport()](../classes/YooKassa-Request-Payments-LegInterface.md#method_setDepartureAirport) | | Устанавливает трёхбуквенный IATA-код аэропорта вылета. | | public | [setDepartureDate()](../classes/YooKassa-Request-Payments-LegInterface.md#method_setDepartureDate) | | Устанавливает дату вылета в формате YYYY-MM-DD ISO 8601:2004. | | public | [setDestinationAirport()](../classes/YooKassa-Request-Payments-LegInterface.md#method_setDestinationAirport) | | Устанавливает трёхбуквенный IATA-код аэропорта прилёта. | --- ### Details * File: [lib/Request/Payments/LegInterface.php](../../lib/Request/Payments/LegInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Трёхбуквенный IATA-код аэропорта вылета | | property | | Трёхбуквенный IATA-код аэропорта вылета | | property | | Трёхбуквенный IATA-код аэропорта прилёта | | property | | Трёхбуквенный IATA-код аэропорта прилёта | | property | | Дата вылета в формате YYYY-MM-DD ISO 8601:2004 | | property | | Дата вылета в формате YYYY-MM-DD ISO 8601:2004 | | property | | Код авиакомпании по справочнику | | property | | Код авиакомпании по справочнику | --- ## Methods #### public getDepartureAirport() : string|null ```php public getDepartureAirport() : string|null ``` **Summary** Возвращает трёхбуквенный IATA-код аэропорта вылета. **Details:** * Inherited From: [\YooKassa\Request\Payments\LegInterface](../classes/YooKassa-Request-Payments-LegInterface.md) **Returns:** string|null - Трёхбуквенный IATA-код аэропорта вылета #### public getDestinationAirport() : string|null ```php public getDestinationAirport() : string|null ``` **Summary** Возвращает трёхбуквенный IATA-код аэропорта прилёта. **Details:** * Inherited From: [\YooKassa\Request\Payments\LegInterface](../classes/YooKassa-Request-Payments-LegInterface.md) **Returns:** string|null - Трёхбуквенный IATA-код аэропорта прилёта #### public getDepartureDate() : \DateTime|null ```php public getDepartureDate() : \DateTime|null ``` **Summary** Возвращает дату вылета в формате YYYY-MM-DD ISO 8601:2004. **Details:** * Inherited From: [\YooKassa\Request\Payments\LegInterface](../classes/YooKassa-Request-Payments-LegInterface.md) **Returns:** \DateTime|null - Дата вылета в формате YYYY-MM-DD ISO 8601:2004 #### public setDepartureAirport() : self ```php public setDepartureAirport(string|null $value) : self ``` **Summary** Устанавливает трёхбуквенный IATA-код аэропорта вылета. **Details:** * Inherited From: [\YooKassa\Request\Payments\LegInterface](../classes/YooKassa-Request-Payments-LegInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Трёхбуквенный IATA-код аэропорта вылета | **Returns:** self - #### public setDestinationAirport() : self ```php public setDestinationAirport(string|null $value) : self ``` **Summary** Устанавливает трёхбуквенный IATA-код аэропорта прилёта. **Details:** * Inherited From: [\YooKassa\Request\Payments\LegInterface](../classes/YooKassa-Request-Payments-LegInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Трёхбуквенный IATA-код аэропорта прилёта | **Returns:** self - #### public setDepartureDate() : self ```php public setDepartureDate(\DateTime|string|null $value) : self ``` **Summary** Устанавливает дату вылета в формате YYYY-MM-DD ISO 8601:2004. **Details:** * Inherited From: [\YooKassa\Request\Payments\LegInterface](../classes/YooKassa-Request-Payments-LegInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | value | Дата вылета в формате YYYY-MM-DD ISO 8601:2004 | **Returns:** self - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-PaymentSubject.md000064400000037172150364342670022007 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\PaymentSubject ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Класс, представляющий модель PaymentSubject. **Description:** Признак предмета расчета (тег в 54 ФЗ — 1212) — это то, за что принимается оплата, например товар, услуга. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [COMMODITY](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_COMMODITY) | | Товар | | public | [EXCISE](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_EXCISE) | | Подакцизный товар | | public | [JOB](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_JOB) | | Работа | | public | [SERVICE](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_SERVICE) | | Услуга | | public | [GAMBLING_BET](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_GAMBLING_BET) | | Ставка в азартной игре | | public | [GAMBLING_PRIZE](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_GAMBLING_PRIZE) | | Выигрыш азартной игры | | public | [LOTTERY](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_LOTTERY) | | Лотерейный билет | | public | [LOTTERY_PRIZE](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_LOTTERY_PRIZE) | | Выигрыш в лотерею | | public | [INTELLECTUAL_ACTIVITY](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_INTELLECTUAL_ACTIVITY) | | Результаты интеллектуальной деятельности | | public | [PAYMENT](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_PAYMENT) | | Платеж | | public | [AGENT_COMMISSION](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_AGENT_COMMISSION) | | Агентское вознаграждение | | public | [PROPERTY_RIGHT](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_PROPERTY_RIGHT) | | Имущественное право | | public | [NON_OPERATING_GAIN](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_NON_OPERATING_GAIN) | | Внереализационный доход | | public | [INSURANCE_PREMIUM](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_INSURANCE_PREMIUM) | | Страховой сбор | | public | [SALES_TAX](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_SALES_TAX) | | Торговый сбор | | public | [RESORT_FEE](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_RESORT_FEE) | | Курортный сбор | | public | [COMPOSITE](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_COMPOSITE) | | Несколько вариантов | | public | [ANOTHER](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_ANOTHER) | | Другое | | public | [FINE](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_FINE) | | Выплата | | public | [TAX](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_TAX) | | Страховые взносы | | public | [LIEN](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_LIEN) | | Залог | | public | [COST](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_COST) | | Расход | | public | [PENSION_INSURANCE_WITHOUT_PAYOUTS](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_PENSION_INSURANCE_WITHOUT_PAYOUTS) | | Взносы на обязательное пенсионное страхование ИП | | public | [PENSION_INSURANCE_WITH_PAYOUTS](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_PENSION_INSURANCE_WITH_PAYOUTS) | | Взносы на обязательное пенсионное страхование | | public | [HEALTH_INSURANCE_WITHOUT_PAYOUTS](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_HEALTH_INSURANCE_WITHOUT_PAYOUTS) | | Взносы на обязательное медицинское страхование ИП | | public | [HEALTH_INSURANCE_WITH_PAYOUTS](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_HEALTH_INSURANCE_WITH_PAYOUTS) | | Взносы на обязательное медицинское страхование | | public | [HEALTH_INSURANCE](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_HEALTH_INSURANCE) | | Взносы на обязательное социальное страхование | | public | [CASINO](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_CASINO) | | Платеж казино | | public | [AGENT_WITHDRAWALS](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_AGENT_WITHDRAWALS) | | Выдача денежных средств | | public | [NON_MARKED_EXCISE](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_NON_MARKED_EXCISE) | | Подакцизный товар, подлежащий маркировке средством идентификации, не имеющим кода маркировки (в чеке — АТНМ). Пример: алкогольная продукция | | public | [MARKED_EXCISE](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_MARKED_EXCISE) | | Подакцизный товар, подлежащий маркировке средством идентификации, имеющим код маркировки (в чеке — АТМ). Пример: табак | | public | [MARKED](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_MARKED) | | Товар, подлежащий маркировке средством идентификации, имеющим код маркировки, за исключением подакцизного товара (в чеке — ТМ). Пример: обувь, духи, товары легкой промышленности | | public | [NON_MARKED](../classes/YooKassa-Model-Receipt-PaymentSubject.md#constant_NON_MARKED) | | Товар, подлежащий маркировке средством идентификации, не имеющим кода маркировки, за исключением подакцизного товара (в чеке — ТНМ). Пример: меховые изделия | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Receipt-PaymentSubject.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Receipt/PaymentSubject.php](../../lib/Model/Receipt/PaymentSubject.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Receipt\PaymentSubject * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### COMMODITY Товар ```php COMMODITY = 'commodity' ``` ###### EXCISE Подакцизный товар ```php EXCISE = 'excise' ``` ###### JOB Работа ```php JOB = 'job' ``` ###### SERVICE Услуга ```php SERVICE = 'service' ``` ###### GAMBLING_BET Ставка в азартной игре ```php GAMBLING_BET = 'gambling_bet' ``` ###### GAMBLING_PRIZE Выигрыш азартной игры ```php GAMBLING_PRIZE = 'gambling_prize' ``` ###### LOTTERY Лотерейный билет ```php LOTTERY = 'lottery' ``` ###### LOTTERY_PRIZE Выигрыш в лотерею ```php LOTTERY_PRIZE = 'lottery_prize' ``` ###### INTELLECTUAL_ACTIVITY Результаты интеллектуальной деятельности ```php INTELLECTUAL_ACTIVITY = 'intellectual_activity' ``` ###### PAYMENT Платеж ```php PAYMENT = 'payment' ``` ###### AGENT_COMMISSION Агентское вознаграждение ```php AGENT_COMMISSION = 'agent_commission' ``` ###### PROPERTY_RIGHT Имущественное право ```php PROPERTY_RIGHT = 'property_right' ``` ###### NON_OPERATING_GAIN Внереализационный доход ```php NON_OPERATING_GAIN = 'non_operating_gain' ``` ###### INSURANCE_PREMIUM Страховой сбор ```php INSURANCE_PREMIUM = 'insurance_premium' ``` ###### SALES_TAX Торговый сбор ```php SALES_TAX = 'sales_tax' ``` ###### RESORT_FEE Курортный сбор ```php RESORT_FEE = 'resort_fee' ``` ###### COMPOSITE Несколько вариантов ```php COMPOSITE = 'composite' ``` ###### ANOTHER Другое ```php ANOTHER = 'another' ``` ###### FINE Выплата ```php FINE = 'fine' ``` ###### TAX Страховые взносы ```php TAX = 'tax' ``` ###### LIEN Залог ```php LIEN = 'lien' ``` ###### COST Расход ```php COST = 'cost' ``` ###### PENSION_INSURANCE_WITHOUT_PAYOUTS Взносы на обязательное пенсионное страхование ИП ```php PENSION_INSURANCE_WITHOUT_PAYOUTS = 'pension_insurance_without_payouts' ``` ###### PENSION_INSURANCE_WITH_PAYOUTS Взносы на обязательное пенсионное страхование ```php PENSION_INSURANCE_WITH_PAYOUTS = 'pension_insurance_with_payouts' ``` ###### HEALTH_INSURANCE_WITHOUT_PAYOUTS Взносы на обязательное медицинское страхование ИП ```php HEALTH_INSURANCE_WITHOUT_PAYOUTS = 'health_insurance_without_payouts' ``` ###### HEALTH_INSURANCE_WITH_PAYOUTS Взносы на обязательное медицинское страхование ```php HEALTH_INSURANCE_WITH_PAYOUTS = 'health_insurance_with_payouts' ``` ###### HEALTH_INSURANCE Взносы на обязательное социальное страхование ```php HEALTH_INSURANCE = 'health_insurance' ``` ###### CASINO Платеж казино ```php CASINO = 'casino' ``` ###### AGENT_WITHDRAWALS Выдача денежных средств ```php AGENT_WITHDRAWALS = 'agent_withdrawals' ``` ###### NON_MARKED_EXCISE Подакцизный товар, подлежащий маркировке средством идентификации, не имеющим кода маркировки (в чеке — АТНМ). Пример: алкогольная продукция ```php NON_MARKED_EXCISE = 'non_marked_excise' ``` ###### MARKED_EXCISE Подакцизный товар, подлежащий маркировке средством идентификации, имеющим код маркировки (в чеке — АТМ). Пример: табак ```php MARKED_EXCISE = 'marked_excise' ``` ###### MARKED Товар, подлежащий маркировке средством идентификации, имеющим код маркировки, за исключением подакцизного товара (в чеке — ТМ). Пример: обувь, духи, товары легкой промышленности ```php MARKED = 'marked' ``` ###### NON_MARKED Товар, подлежащий маркировке средством идентификации, не имеющим кода маркировки, за исключением подакцизного товара (в чеке — ТНМ). Пример: меховые изделия ```php NON_MARKED = 'non_marked' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-ReceiptResponseItem.md000064400000154611150364342670023554 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Receipts\ReceiptResponseItem ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Класс, описывающий товар в чеке. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [COUNTRY_CODE_LENGTH](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#constant_COUNTRY_CODE_LENGTH) | | | | public | [MAX_DECLARATION_NUMBER_LENGTH](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#constant_MAX_DECLARATION_NUMBER_LENGTH) | | | | public | [MAX_PRODUCT_CODE_LENGTH](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#constant_MAX_PRODUCT_CODE_LENGTH) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$agent_type](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_agent_type) | | Тип посредника, реализующего товар или услугу | | public | [$agentType](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_agentType) | | Тип посредника, реализующего товар или услугу | | public | [$amount](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_amount) | | Суммарная стоимость покупаемого товара в копейках/центах | | public | [$country_of_origin_code](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_country_of_origin_code) | | Код страны происхождения товара (тег в 54 ФЗ — 1230) | | public | [$countryOfOriginCode](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_countryOfOriginCode) | | Код страны происхождения товара (тег в 54 ФЗ — 1230) | | public | [$customs_declaration_number](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_customs_declaration_number) | | Номер таможенной декларации (от 1 до 32 символов). Тег в 54 ФЗ — 1231 | | public | [$customsDeclarationNumber](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_customsDeclarationNumber) | | Номер таможенной декларации (от 1 до 32 символов). Тег в 54 ФЗ — 1231 | | public | [$description](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_description) | | Наименование товара (тег в 54 ФЗ — 1030) | | public | [$excise](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_excise) | | Сумма акциза товара с учетом копеек (тег в 54 ФЗ — 1229) | | public | [$mark_code_info](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_mark_code_info) | | Код товара (тег в 54 ФЗ — 1163) | | public | [$mark_mode](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_mark_mode) | | Режим обработки кода маркировки (тег в 54 ФЗ — 2102) | | public | [$mark_quantity](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_mark_quantity) | | Дробное количество маркированного товара (тег в 54 ФЗ — 1291) | | public | [$markCodeInfo](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_markCodeInfo) | | Код товара (тег в 54 ФЗ — 1163) | | public | [$markMode](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_markMode) | | Режим обработки кода маркировки (тег в 54 ФЗ — 2102) | | public | [$markQuantity](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_markQuantity) | | Дробное количество маркированного товара (тег в 54 ФЗ — 1291) | | public | [$measure](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_measure) | | Мера количества предмета расчета (тег в 54 ФЗ — 2108) | | public | [$payment_mode](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_payment_mode) | | Признак способа расчета (тег в 54 ФЗ — 1214) | | public | [$payment_subject](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_payment_subject) | | Признак предмета расчета (тег в 54 ФЗ — 1212) | | public | [$payment_subject_industry_details](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_payment_subject_industry_details) | | Отраслевой реквизит предмета расчета (тег в 54 ФЗ — 1260) | | public | [$paymentMode](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_paymentMode) | | Признак способа расчета (тег в 54 ФЗ — 1214) | | public | [$paymentSubject](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_paymentSubject) | | Признак предмета расчета (тег в 54 ФЗ — 1212) | | public | [$paymentSubjectIndustryDetails](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_paymentSubjectIndustryDetails) | | Отраслевой реквизит предмета расчета (тег в 54 ФЗ — 1260) | | public | [$price](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_price) | | Цена товара (тег в 54 ФЗ — 1079) | | public | [$product_code](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_product_code) | | Код товара — уникальный номер, который присваивается экземпляру товара при маркировке (тег в 54 ФЗ — 1162) | | public | [$productCode](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_productCode) | | Код товара — уникальный номер, который присваивается экземпляру товара при маркировке (тег в 54 ФЗ — 1162) | | public | [$quantity](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_quantity) | | Количество (тег в 54 ФЗ — 1023) | | public | [$supplier](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_supplier) | | Информация о поставщике товара или услуги (тег в 54 ФЗ — 1224) | | public | [$vat_code](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_vat_code) | | Ставка НДС, число 1-6 (тег в 54 ФЗ — 1199) | | public | [$vatCode](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#property_vatCode) | | Ставка НДС, число 1-6 (тег в 54 ФЗ — 1199) | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAgentType()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getAgentType) | | Возвращает тип посредника, реализующего товар или услугу. | | public | [getAmount()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getAmount) | | Возвращает общую стоимость покупаемого товара в копейках/центах. | | public | [getCountryOfOriginCode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getCountryOfOriginCode) | | Возвращает код страны происхождения товара по общероссийскому классификатору стран мира. | | public | [getCustomsDeclarationNumber()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getCustomsDeclarationNumber) | | Возвращает номер таможенной декларации. | | public | [getDescription()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getDescription) | | Возвращает наименование товара. | | public | [getExcise()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getExcise) | | Возвращает сумму акциза товара с учетом копеек. | | public | [getMarkCodeInfo()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getMarkCodeInfo) | | Возвращает код товара. | | public | [getMarkMode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getMarkMode) | | Возвращает режим обработки кода маркировки. | | public | [getMarkQuantity()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getMarkQuantity) | | Возвращает дробное количество маркированного товара. | | public | [getMeasure()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getMeasure) | | Возвращает меру количества предмета расчета. | | public | [getPaymentMode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getPaymentMode) | | Возвращает признак способа расчета. | | public | [getPaymentSubject()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getPaymentSubject) | | Возвращает признак предмета расчета. | | public | [getPaymentSubjectIndustryDetails()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getPaymentSubjectIndustryDetails) | | Возвращает отраслевой реквизит чека. | | public | [getPrice()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getPrice) | | Возвращает цену товара. | | public | [getProductCode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getProductCode) | | Возвращает код товара — уникальный номер, который присваивается экземпляру товара при маркировке. | | public | [getQuantity()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getQuantity) | | Возвращает количество товара. | | public | [getSupplier()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getSupplier) | | Возвращает информацию о поставщике товара или услуги | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [getVatCode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_getVatCode) | | Возвращает ставку НДС | | public | [jsonSerialize()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAgentType()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setAgentType) | | Устанавливает тип посредника, реализующего товар или услугу. | | public | [setCountryOfOriginCode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setCountryOfOriginCode) | | Устанавливает код страны происхождения товара по общероссийскому классификатору стран мира. | | public | [setCustomsDeclarationNumber()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setCustomsDeclarationNumber) | | Устанавливает номер таможенной декларации (от 1 до 32 символов). | | public | [setDescription()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setDescription) | | Устанавливает наименование товара. | | public | [setExcise()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setExcise) | | Устанавливает сумму акциза товара с учетом копеек. | | public | [setMarkCodeInfo()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setMarkCodeInfo) | | Устанавливает код товара. | | public | [setMarkMode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setMarkMode) | | Устанавливает режим обработки кода маркировки. | | public | [setMarkQuantity()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setMarkQuantity) | | Устанавливает дробное количество маркированного товара. | | public | [setMeasure()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setMeasure) | | Устанавливает меру количества предмета расчета. | | public | [setPaymentMode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setPaymentMode) | | Устанавливает признак способа расчета. | | public | [setPaymentSubject()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setPaymentSubject) | | Устанавливает признак предмета расчета. | | public | [setPaymentSubjectIndustryDetails()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setPaymentSubjectIndustryDetails) | | Устанавливает отраслевой реквизит чека. | | public | [setPrice()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setPrice) | | Устанавливает цену товара. | | public | [setProductCode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setProductCode) | | Устанавливает код товара — уникальный номер, который присваивается экземпляру товара при маркировке. | | public | [setQuantity()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setQuantity) | | Устанавливает количество покупаемого товара. | | public | [setSupplier()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setSupplier) | | Устанавливает информацию о поставщике товара или услуги. | | public | [setVatCode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md#method_setVatCode) | | Устанавливает ставку НДС | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Receipts/ReceiptResponseItem.php](../../lib/Request/Receipts/ReceiptResponseItem.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\Receipts\ReceiptResponseItem * Implements: * [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### COUNTRY_CODE_LENGTH ```php COUNTRY_CODE_LENGTH = 2 : int ``` ###### MAX_DECLARATION_NUMBER_LENGTH ```php MAX_DECLARATION_NUMBER_LENGTH = 32 : int ``` ###### MAX_PRODUCT_CODE_LENGTH ```php MAX_PRODUCT_CODE_LENGTH = 96 : int ``` --- ## Properties #### public $agent_type : string --- ***Description*** Тип посредника, реализующего товар или услугу **Type:** string **Details:** #### public $agentType : string --- ***Description*** Тип посредника, реализующего товар или услугу **Type:** string **Details:** #### public $amount : float --- ***Description*** Суммарная стоимость покупаемого товара в копейках/центах **Type:** float **Details:** #### public $country_of_origin_code : string --- ***Description*** Код страны происхождения товара (тег в 54 ФЗ — 1230) **Type:** string **Details:** #### public $countryOfOriginCode : string --- ***Description*** Код страны происхождения товара (тег в 54 ФЗ — 1230) **Type:** string **Details:** #### public $customs_declaration_number : string --- ***Description*** Номер таможенной декларации (от 1 до 32 символов). Тег в 54 ФЗ — 1231 **Type:** string **Details:** #### public $customsDeclarationNumber : string --- ***Description*** Номер таможенной декларации (от 1 до 32 символов). Тег в 54 ФЗ — 1231 **Type:** string **Details:** #### public $description : string --- ***Description*** Наименование товара (тег в 54 ФЗ — 1030) **Type:** string **Details:** #### public $excise : float --- ***Description*** Сумма акциза товара с учетом копеек (тег в 54 ФЗ — 1229) **Type:** float **Details:** #### public $mark_code_info : \YooKassa\Model\Receipt\MarkCodeInfo --- ***Description*** Код товара (тег в 54 ФЗ — 1163) **Type:** MarkCodeInfo **Details:** #### public $mark_mode : string --- ***Description*** Режим обработки кода маркировки (тег в 54 ФЗ — 2102) **Type:** string **Details:** #### public $mark_quantity : \YooKassa\Model\Receipt\MarkQuantity --- ***Description*** Дробное количество маркированного товара (тег в 54 ФЗ — 1291) **Type:** MarkQuantity **Details:** #### public $markCodeInfo : \YooKassa\Model\Receipt\MarkCodeInfo --- ***Description*** Код товара (тег в 54 ФЗ — 1163) **Type:** MarkCodeInfo **Details:** #### public $markMode : string --- ***Description*** Режим обработки кода маркировки (тег в 54 ФЗ — 2102) **Type:** string **Details:** #### public $markQuantity : \YooKassa\Model\Receipt\MarkQuantity --- ***Description*** Дробное количество маркированного товара (тег в 54 ФЗ — 1291) **Type:** MarkQuantity **Details:** #### public $measure : string --- ***Description*** Мера количества предмета расчета (тег в 54 ФЗ — 2108) **Type:** string **Details:** #### public $payment_mode : string --- ***Description*** Признак способа расчета (тег в 54 ФЗ — 1214) **Type:** string **Details:** #### public $payment_subject : string --- ***Description*** Признак предмета расчета (тег в 54 ФЗ — 1212) **Type:** string **Details:** #### public $payment_subject_industry_details : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\IndustryDetails[] --- ***Description*** Отраслевой реквизит предмета расчета (тег в 54 ФЗ — 1260) **Type:** IndustryDetails[] **Details:** #### public $paymentMode : string --- ***Description*** Признак способа расчета (тег в 54 ФЗ — 1214) **Type:** string **Details:** #### public $paymentSubject : string --- ***Description*** Признак предмета расчета (тег в 54 ФЗ — 1212) **Type:** string **Details:** #### public $paymentSubjectIndustryDetails : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\IndustryDetails[] --- ***Description*** Отраслевой реквизит предмета расчета (тег в 54 ФЗ — 1260) **Type:** IndustryDetails[] **Details:** #### public $price : \YooKassa\Model\AmountInterface --- ***Description*** Цена товара (тег в 54 ФЗ — 1079) **Type:** AmountInterface **Details:** #### public $product_code : string --- ***Description*** Код товара — уникальный номер, который присваивается экземпляру товара при маркировке (тег в 54 ФЗ — 1162) **Type:** string **Details:** #### public $productCode : string --- ***Description*** Код товара — уникальный номер, который присваивается экземпляру товара при маркировке (тег в 54 ФЗ — 1162) **Type:** string **Details:** #### public $quantity : float --- ***Description*** Количество (тег в 54 ФЗ — 1023) **Type:** float **Details:** #### public $supplier : \YooKassa\Model\Receipt\Supplier --- ***Description*** Информация о поставщике товара или услуги (тег в 54 ФЗ — 1224) **Type:** Supplier **Details:** #### public $vat_code : int --- ***Description*** Ставка НДС, число 1-6 (тег в 54 ФЗ — 1199) **Type:** int **Details:** #### public $vatCode : int --- ***Description*** Ставка НДС, число 1-6 (тег в 54 ФЗ — 1199) **Type:** int **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | sourceArray | Массив с информацией о товаре, пришедший от API | **Returns:** void - #### public getAgentType() : string|null ```php public getAgentType() : string|null ``` **Summary** Возвращает тип посредника, реализующего товар или услугу. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** string|null - Тип посредника #### public getAmount() : int|null ```php public getAmount() : int|null ``` **Summary** Возвращает общую стоимость покупаемого товара в копейках/центах. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** int|null - Сумма стоимости покупаемого товара #### public getCountryOfOriginCode() : null|string ```php public getCountryOfOriginCode() : null|string ``` **Summary** Возвращает код страны происхождения товара по общероссийскому классификатору стран мира. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** null|string - Код страны происхождения товара #### public getCustomsDeclarationNumber() : null|string ```php public getCustomsDeclarationNumber() : null|string ``` **Summary** Возвращает номер таможенной декларации. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** null|string - Номер таможенной декларации (от 1 до 32 символов) #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает наименование товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** string|null - Наименование товара #### public getExcise() : null|float ```php public getExcise() : null|float ``` **Summary** Возвращает сумму акциза товара с учетом копеек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** null|float - Сумма акциза товара с учетом копеек #### public getMarkCodeInfo() : \YooKassa\Model\Receipt\MarkCodeInfo|null ```php public getMarkCodeInfo() : \YooKassa\Model\Receipt\MarkCodeInfo|null ``` **Summary** Возвращает код товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** \YooKassa\Model\Receipt\MarkCodeInfo|null - Код товара #### public getMarkMode() : string|null ```php public getMarkMode() : string|null ``` **Summary** Возвращает режим обработки кода маркировки. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** string|null - Режим обработки кода маркировки #### public getMarkQuantity() : \YooKassa\Model\Receipt\MarkQuantity|null ```php public getMarkQuantity() : \YooKassa\Model\Receipt\MarkQuantity|null ``` **Summary** Возвращает дробное количество маркированного товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** \YooKassa\Model\Receipt\MarkQuantity|null - Дробное количество маркированного товара #### public getMeasure() : string|null ```php public getMeasure() : string|null ``` **Summary** Возвращает меру количества предмета расчета. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** string|null - Мера количества предмета расчета #### public getPaymentMode() : null|string ```php public getPaymentMode() : null|string ``` **Summary** Возвращает признак способа расчета. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** null|string - Признак способа расчета #### public getPaymentSubject() : null|string ```php public getPaymentSubject() : null|string ``` **Summary** Возвращает признак предмета расчета. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** null|string - Признак предмета расчета #### public getPaymentSubjectIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ```php public getPaymentSubjectIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface - Отраслевой реквизит чека #### public getPrice() : \YooKassa\Model\AmountInterface|null ```php public getPrice() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает цену товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** \YooKassa\Model\AmountInterface|null - Цена товара #### public getProductCode() : null|string ```php public getProductCode() : null|string ``` **Summary** Возвращает код товара — уникальный номер, который присваивается экземпляру товара при маркировке. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** null|string - Код товара #### public getQuantity() : float ```php public getQuantity() : float ``` **Summary** Возвращает количество товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** float - Количество купленного товара #### public getSupplier() : \YooKassa\Model\Receipt\SupplierInterface|null ```php public getSupplier() : \YooKassa\Model\Receipt\SupplierInterface|null ``` **Summary** Возвращает информацию о поставщике товара или услуги **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** \YooKassa\Model\Receipt\SupplierInterface|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public getVatCode() : null|int ```php public getVatCode() : null|int ``` **Summary** Возвращает ставку НДС **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** null|int - Ставка НДС, число 1-6, или null, если ставка не задана #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAgentType() : self ```php public setAgentType(string|null $agent_type = null) : self ``` **Summary** Устанавливает тип посредника, реализующего товар или услугу. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | agent_type | Тип посредника | **Returns:** self - #### public setCountryOfOriginCode() : self ```php public setCountryOfOriginCode(string|null $country_of_origin_code = null) : self ``` **Summary** Устанавливает код страны происхождения товара по общероссийскому классификатору стран мира. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | country_of_origin_code | Код страны происхождения товара | **Returns:** self - #### public setCustomsDeclarationNumber() : self ```php public setCustomsDeclarationNumber(string|null $customs_declaration_number = null) : self ``` **Summary** Устанавливает номер таможенной декларации (от 1 до 32 символов). **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | customs_declaration_number | Номер таможенной декларации | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description) : self ``` **Summary** Устанавливает наименование товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Наименование товара | **Returns:** self - #### public setExcise() : self ```php public setExcise(float|null $excise = null) : self ``` **Summary** Устанавливает сумму акциза товара с учетом копеек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | float OR null | excise | Сумма акциза товара с учетом копеек | **Returns:** self - #### public setMarkCodeInfo() : self ```php public setMarkCodeInfo(array|\YooKassa\Model\Receipt\MarkCodeInfo|null $mark_code_info = null) : self ``` **Summary** Устанавливает код товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\MarkCodeInfo OR null | mark_code_info | Код товара | **Returns:** self - #### public setMarkMode() : self ```php public setMarkMode(string|null $mark_mode = null) : self ``` **Summary** Устанавливает режим обработки кода маркировки. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | mark_mode | Режим обработки кода маркировки | **Returns:** self - #### public setMarkQuantity() : self ```php public setMarkQuantity(array|\YooKassa\Model\Receipt\MarkQuantity|null $mark_quantity = null) : self ``` **Summary** Устанавливает дробное количество маркированного товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\MarkQuantity OR null | mark_quantity | Дробное количество маркированного товара | **Returns:** self - #### public setMeasure() : self ```php public setMeasure(string|null $measure) : self ``` **Summary** Устанавливает меру количества предмета расчета. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | measure | Мера количества предмета расчета | **Returns:** self - #### public setPaymentMode() : self ```php public setPaymentMode(string|null $payment_mode = null) : self ``` **Summary** Устанавливает признак способа расчета. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_mode | Признак способа расчета | **Returns:** self - #### public setPaymentSubject() : self ```php public setPaymentSubject(null|string $payment_subject = null) : self ``` **Summary** Устанавливает признак предмета расчета. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | payment_subject | Признак предмета расчета | **Returns:** self - #### public setPaymentSubjectIndustryDetails() : self ```php public setPaymentSubjectIndustryDetails(array|\YooKassa\Model\Receipt\IndustryDetails[]|null $payment_subject_industry_details = null) : self ``` **Summary** Устанавливает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\IndustryDetails[] OR null | payment_subject_industry_details | Отраслевой реквизит чека | **Returns:** self - #### public setPrice() : void ```php public setPrice(\YooKassa\Model\AmountInterface|array|null $value) : void ``` **Summary** Устанавливает цену товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | value | Цена товара | **Returns:** void - #### public setProductCode() : self ```php public setProductCode(\YooKassa\Helpers\ProductCode|string $product_code) : self ``` **Summary** Устанавливает код товара — уникальный номер, который присваивается экземпляру товара при маркировке. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Helpers\ProductCode OR string | product_code | Код товара | **Returns:** self - #### public setQuantity() : self ```php public setQuantity(float|null $quantity) : self ``` **Summary** Устанавливает количество покупаемого товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | float OR null | quantity | Количество | **Returns:** self - #### public setSupplier() : self ```php public setSupplier(array|\YooKassa\Model\Receipt\SupplierInterface|null $supplier = null) : self ``` **Summary** Устанавливает информацию о поставщике товара или услуги. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\SupplierInterface OR null | supplier | Информация о поставщике товара или услуги | **Returns:** self - #### public setVatCode() : self ```php public setVatCode(int|null $vat_code = null) : self ``` **Summary** Устанавливает ставку НДС **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItem](../classes/YooKassa-Request-Receipts-ReceiptResponseItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | vat_code | Ставка НДС, число 1-6 | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-AbstractEnum.md000064400000007005150364342670020231 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Common\AbstractEnum ### Namespace: [\YooKassa\Common](../namespaces/yookassa-common.md) --- **Summary:** Класс, представляющий модель AbstractEnum. **Description:** Базовый класс генерируемых enum'ов. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Common-AbstractEnum.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Common/AbstractEnum.php](../../lib/Common/AbstractEnum.php) * Package: YooKassa * Class Hierarchy: * \YooKassa\Common\AbstractEnum * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodAlfaBank.md000064400000060272150364342670026003 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodAlfaBank ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodAlfabank. **Description:** Оплата через Альфа-Клик. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$login](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodAlfaBank.md#property_login) | | Имя пользователя в Альфа-Клике | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodAlfaBank.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getLogin()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodAlfaBank.md#method_getLogin) | | Возвращает login. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setLogin()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodAlfaBank.md#method_setLogin) | | Устанавливает login. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodAlfaBank.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodAlfaBank.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodAlfaBank * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | deprecated | | Будет удален в следующих версиях | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $login : string --- ***Description*** Имя пользователя в Альфа-Клике **Type:** string **Details:** #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodAlfaBank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodAlfaBank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getLogin() : string|null ```php public getLogin() : string|null ``` **Summary** Возвращает login. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodAlfaBank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodAlfaBank.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setLogin() : self ```php public setLogin(string|null $login = null) : self ``` **Summary** Устанавливает login. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodAlfaBank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodAlfaBank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | login | Логин пользователя в Альфа-Клике (привязанный телефон или дополнительный логин). | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-AuthorizeException.md000064400000007315150364342670023615 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\AuthorizeException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- **Summary:** Ошибка авторизации. Не установлен заголовок. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$responseBody](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseBody) | | | | protected | [$responseHeaders](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseHeaders) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-ApiException.md#method___construct) | | Constructor. | | public | [getResponseBody()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseBody) | | | | public | [getResponseHeaders()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseHeaders) | | | --- ### Details * File: [lib/Common/Exceptions/AuthorizeException.php](../../lib/Common/Exceptions/AuthorizeException.php) * Package: Default * Class Hierarchy: * [\Exception](\Exception) * [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) * \YooKassa\Common\Exceptions\AuthorizeException --- ## Properties #### protected $responseBody : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) #### protected $responseHeaders : array --- **Type:** array **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) --- ## Methods #### public __construct() : mixed ```php public __construct(string $message = '', int $code, string[] $responseHeaders = [], string|null $responseBody = '') : mixed ``` **Summary** Constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | message | Error message | | int | code | HTTP status code | | string[] | responseHeaders | HTTP header | | string OR null | responseBody | HTTP body | **Returns:** mixed - #### public getResponseBody() : ?string ```php public getResponseBody() : ?string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** ?string - #### public getResponseHeaders() : string[] ```php public getResponseHeaders() : string[] ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** string[] - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-AbstractPayoutDestination.md000064400000033527150364342670024107 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Model\Payout\AbstractPayoutDestination ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель PayoutDestination. **Description:** Платежное средство продавца, на которое ЮKassa переводит оплату. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property__type) | | Тип метода оплаты | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_setType) | | Устанавливает тип метода оплаты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payout/AbstractPayoutDestination.php](../../lib/Model/Payout/AbstractPayoutDestination.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payout\AbstractPayoutDestination * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Abstract Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** #### protected $_type : ?string --- **Summary** Тип метода оплаты **Type:** ?string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataFactory.md000064400000007021150364342670026642 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataFactory ### Namespace: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank](../namespaces/yookassa-model-payment-paymentmethod-b2b-sberbank.md) --- **Summary:** Класс, представляющий модель PaymentMethodDataCash. **Description:** Фабрика создания объекта данных об НДС. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [factory()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataFactory.md#method_factory) | | Фабричный метод создания данных об НДС по типу. | | public | [factoryFromArray()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataFactory.md#method_factoryFromArray) | | Фабричный метод создания данных об НДС из массива. | --- ### Details * File: [lib/Model/Payment/PaymentMethod/B2b/Sberbank/VatDataFactory.php](../../lib/Model/Payment/PaymentMethod/B2b/Sberbank/VatDataFactory.php) * Package: YooKassa\Model * Class Hierarchy: * \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataFactory * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public factory() : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData ```php public factory(string|null $type = null, ?array $data = []) : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData ``` **Summary** Фабричный метод создания данных об НДС по типу. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataFactory](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип данных об НДС | | ?array | data | | **Returns:** \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData - #### public factoryFromArray() : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData ```php public factoryFromArray(array|null $data = [], string|null $type = null) : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData ``` **Summary** Фабричный метод создания данных об НДС из массива. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataFactory](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | Массив данных об НДС | | string OR null | type | Тип данных об НДС | **Returns:** \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-AgentType.md000064400000014661150364342670020750 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\AgentType ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** AgentType - Тип посредника. **Description:** Тип посредника передается в запросе на создание чека в массиве `items`, в параметре `agent_type`, если вы отправляете данные для формирования чека по сценарию Сначала платеж, потом чек. Параметр `agent_type` нужно передавать, начиная с ФФД 1.1. Убедитесь, что ваша онлайн-касса обновлена до этой версии. Возможные значения: - `banking_payment_agent` - Безналичный расчет - `banking_payment_subagent` - Предоплата (аванс) - `payment_agent` - Постоплата (кредит) - `payment_subagent` - Встречное предоставление - `attorney` - Встречное предоставление - `commissioner` - Встречное предоставление - `agent` - Встречное предоставление --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [BANKING_PAYMENT_AGENT](../classes/YooKassa-Model-Receipt-AgentType.md#constant_BANKING_PAYMENT_AGENT) | | Банковский платежный агент | | public | [BANKING_PAYMENT_SUBAGENT](../classes/YooKassa-Model-Receipt-AgentType.md#constant_BANKING_PAYMENT_SUBAGENT) | | Банковский платежный субагент | | public | [PAYMENT_AGENT](../classes/YooKassa-Model-Receipt-AgentType.md#constant_PAYMENT_AGENT) | | Платежный агент | | public | [PAYMENT_SUBAGENT](../classes/YooKassa-Model-Receipt-AgentType.md#constant_PAYMENT_SUBAGENT) | | Платежный субагент | | public | [ATTORNEY](../classes/YooKassa-Model-Receipt-AgentType.md#constant_ATTORNEY) | | Поверенный | | public | [COMMISSIONER](../classes/YooKassa-Model-Receipt-AgentType.md#constant_COMMISSIONER) | | Комиссионер | | public | [AGENT](../classes/YooKassa-Model-Receipt-AgentType.md#constant_AGENT) | | Агент | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Receipt-AgentType.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Receipt/AgentType.php](../../lib/Model/Receipt/AgentType.php) * Package: Default * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Receipt\AgentType --- ## Constants ###### BANKING_PAYMENT_AGENT Банковский платежный агент ```php BANKING_PAYMENT_AGENT = 'banking_payment_agent' ``` ###### BANKING_PAYMENT_SUBAGENT Банковский платежный субагент ```php BANKING_PAYMENT_SUBAGENT = 'banking_payment_subagent' ``` ###### PAYMENT_AGENT Платежный агент ```php PAYMENT_AGENT = 'payment_agent' ``` ###### PAYMENT_SUBAGENT Платежный субагент ```php PAYMENT_SUBAGENT = 'payment_subagent' ``` ###### ATTORNEY Поверенный ```php ATTORNEY = 'attorney' ``` ###### COMMISSIONER Комиссионер ```php COMMISSIONER = 'commissioner' ``` ###### AGENT Агент ```php AGENT = 'agent' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-TransferStatus.md000064400000013222150364342670022052 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\TransferStatus ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Класс, представляющий модель TransferStatus. **Description:** Статус распределения денег между магазинами. Возможные значения: - `pending` - Ожидает оплаты покупателем - `waiting_for_capture` - Успешно оплачен покупателем, ожидает подтверждения магазином (capture или aviso) - `succeeded` - Успешно оплачен и получен магазином - `canceled` - Неуспех оплаты или отменен магазином (cancel) --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [PENDING](../classes/YooKassa-Model-Payment-TransferStatus.md#constant_PENDING) | | Ожидает оплаты покупателем | | public | [WAITING_FOR_CAPTURE](../classes/YooKassa-Model-Payment-TransferStatus.md#constant_WAITING_FOR_CAPTURE) | | Успешно оплачен покупателем, ожидает подтверждения магазином (capture или aviso) | | public | [SUCCEEDED](../classes/YooKassa-Model-Payment-TransferStatus.md#constant_SUCCEEDED) | | Успешно оплачен и получен магазином | | public | [CANCELED](../classes/YooKassa-Model-Payment-TransferStatus.md#constant_CANCELED) | | Неуспех оплаты или отменен магазином (cancel) | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payment-TransferStatus.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payment/TransferStatus.php](../../lib/Model/Payment/TransferStatus.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payment\TransferStatus * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | author | | cms@yoomoney.ru | --- ## Constants ###### PENDING Ожидает оплаты покупателем ```php PENDING = 'pending' ``` ###### WAITING_FOR_CAPTURE Успешно оплачен покупателем, ожидает подтверждения магазином (capture или aviso) ```php WAITING_FOR_CAPTURE = 'waiting_for_capture' ``` ###### SUCCEEDED Успешно оплачен и получен магазином ```php SUCCEEDED = 'succeeded' ``` ###### CANCELED Неуспех оплаты или отменен магазином (cancel) ```php CANCELED = 'canceled' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-PaymentDealInfo.md000064400000040035150364342670021333 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Deal\PaymentDealInfo ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Класс, представляющий модель PaymentDealInfo. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_ID](../classes/YooKassa-Model-Deal-PaymentDealInfo.md#constant_MAX_LENGTH_ID) | | | | public | [MIN_LENGTH_ID](../classes/YooKassa-Model-Deal-PaymentDealInfo.md#constant_MIN_LENGTH_ID) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Deal-PaymentDealInfo.md#property_id) | | Идентификатор сделки | | public | [$settlements](../classes/YooKassa-Model-Deal-PaymentDealInfo.md#property_settlements) | | Данные о распределении денег | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Deal-PaymentDealInfo.md#method_getId) | | Возвращает Id сделки. | | public | [getSettlements()](../classes/YooKassa-Model-Deal-PaymentDealInfo.md#method_getSettlements) | | Возвращает массив оплат, обеспечивающих выдачу товара. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Deal-PaymentDealInfo.md#method_setId) | | Устанавливает Id сделки. | | public | [setSettlements()](../classes/YooKassa-Model-Deal-PaymentDealInfo.md#method_setSettlements) | | Устанавливает массив оплат, обеспечивающих выдачу товара. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Deal/PaymentDealInfo.php](../../lib/Model/Deal/PaymentDealInfo.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Deal\PaymentDealInfo * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_ID ```php MAX_LENGTH_ID = 50 : int ``` ###### MIN_LENGTH_ID ```php MIN_LENGTH_ID = 36 : int ``` --- ## Properties #### public $id : string --- ***Description*** Идентификатор сделки **Type:** string **Details:** #### public $settlements : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\SettlementInterface[] --- ***Description*** Данные о распределении денег **Type:** SettlementInterface[] **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\PaymentDealInfo](../classes/YooKassa-Model-Deal-PaymentDealInfo.md) **Returns:** string|null - #### public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Model\Deal\PaymentDealInfo](../classes/YooKassa-Model-Deal-PaymentDealInfo.md) **Returns:** \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface - Массив оплат, обеспечивающих выдачу товара #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\PaymentDealInfo](../classes/YooKassa-Model-Deal-PaymentDealInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор сделки. | **Returns:** self - #### public setSettlements() : self ```php public setSettlements(\YooKassa\Common\ListObjectInterface|array|null $settlements = null) : self ``` **Summary** Устанавливает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Model\Deal\PaymentDealInfo](../classes/YooKassa-Model-Deal-PaymentDealInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | settlements | Данные о распределении денег. | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-SettlementPayoutRefund.md000064400000037100150364342670023005 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Deal\SettlementPayoutRefund ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Класс, представляющий модель SettlementPayoutRefund. **Description:** Данные о распределении денег в возврате. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Deal-SettlementPayoutRefund.md#property_amount) | | Размер оплаты | | public | [$type](../classes/YooKassa-Model-Deal-SettlementPayoutRefund.md#property_type) | | Вид оплаты в чеке | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Deal-SettlementPayoutRefund.md#method_getAmount) | | Возвращает размер оплаты. | | public | [getType()](../classes/YooKassa-Model-Deal-SettlementPayoutRefund.md#method_getType) | | Возвращает тип операции (payout - выплата продавцу). | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Deal-SettlementPayoutRefund.md#method_setAmount) | | Устанавливает сумму, на которую необходимо уменьшить вознаграждение продавца. | | public | [setType()](../classes/YooKassa-Model-Deal-SettlementPayoutRefund.md#method_setType) | | Устанавливает вид оплаты в чеке. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Deal/SettlementPayoutRefund.php](../../lib/Model/Deal/SettlementPayoutRefund.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Deal\SettlementPayoutRefund * Implements: * [\YooKassa\Model\Receipt\SettlementInterface](../classes/YooKassa-Model-Receipt-SettlementInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Размер оплаты **Type:** AmountInterface **Details:** #### public $type : string --- ***Description*** Вид оплаты в чеке **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает размер оплаты. **Details:** * Inherited From: [\YooKassa\Model\Deal\SettlementPayoutRefund](../classes/YooKassa-Model-Deal-SettlementPayoutRefund.md) **Returns:** \YooKassa\Model\AmountInterface|null - Размер оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип операции (payout - выплата продавцу). **Details:** * Inherited From: [\YooKassa\Model\Deal\SettlementPayoutRefund](../classes/YooKassa-Model-Deal-SettlementPayoutRefund.md) **Returns:** string|null - Тип операции #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму, на которую необходимо уменьшить вознаграждение продавца. **Description** Должна быть меньше суммы возврата или равна ей. **Details:** * Inherited From: [\YooKassa\Model\Deal\SettlementPayoutRefund](../classes/YooKassa-Model-Deal-SettlementPayoutRefund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма платежа | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает вид оплаты в чеке. **Details:** * Inherited From: [\YooKassa\Model\Deal\SettlementPayoutRefund](../classes/YooKassa-Model-Deal-SettlementPayoutRefund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md000064400000016426150364342670024557 0ustar00# [YooKassa API SDK](../home.md) # Interface: ReceiptResponseInterface ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Interface ReceiptInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getId()](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md#method_getId) | | Возвращает идентификатор чека в ЮKassa. | | public | [getItems()](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md#method_getItems) | | Возвращает список товаров в заказ. | | public | [getOnBehalfOf()](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md#method_getOnBehalfOf) | | Возвращает идентификатор магазин | | public | [getSettlements()](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md#method_getSettlements) | | Возвращает список расчетов. | | public | [getStatus()](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md#method_getStatus) | | Возвращает статус доставки данных для чека в онлайн-кассу. | | public | [getTaxSystemCode()](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md#method_getTaxSystemCode) | | Возвращает код системы налогообложения. | | public | [getType()](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md#method_getType) | | Возвращает тип чека в онлайн-кассе. | | public | [notEmpty()](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md#method_notEmpty) | | Проверяет есть ли в чеке хотя бы одна позиция. | --- ### Details * File: [lib/Request/Receipts/ReceiptResponseInterface.php](../../lib/Request/Receipts/ReceiptResponseInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Идентификатор чека в ЮKassa. | | property | | Тип чека в онлайн-кассе: приход "payment" или возврат "refund". | | property | | Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled"). | | property | | Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled"). | | property | | Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled"). | | property | | Код системы налогообложения. Число 1-6. | | property | | Код системы налогообложения. Число 1-6. | | property | | Список товаров в заказе | | property | | Список товаров в заказе | --- ## Methods #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор чека в ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md) **Returns:** string|null - Идентификатор чека в ЮKassa #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md) **Returns:** string|null - Тип чека в онлайн-кассе: приход "payment" или возврат "refund" #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус доставки данных для чека в онлайн-кассу. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md) **Returns:** string|null - Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled") #### public getTaxSystemCode() : int|null ```php public getTaxSystemCode() : int|null ``` **Summary** Возвращает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md) **Returns:** int|null - Код системы налогообложения. Число 1-6. #### public getItems() : \YooKassa\Common\ListObjectInterface ```php public getItems() : \YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список товаров в заказ. **Description** @return ReceiptResponseItemInterface[]|ListObjectInterface **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md) **Returns:** \YooKassa\Common\ListObjectInterface - #### public getSettlements() : \YooKassa\Common\ListObjectInterface ```php public getSettlements() : \YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список расчетов. **Description** @return SettlementInterface[]|ListObjectInterface **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md) **Returns:** \YooKassa\Common\ListObjectInterface - #### public getOnBehalfOf() : string|null ```php public getOnBehalfOf() : string|null ``` **Summary** Возвращает идентификатор магазин **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md) **Returns:** string|null - #### public notEmpty() : bool ```php public notEmpty() : bool ``` **Summary** Проверяет есть ли в чеке хотя бы одна позиция. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md) **Returns:** bool - True если чек не пуст, false если в чеке нет ни одной позиции --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataCash.md000064400000041575150364342670025064 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataCash ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentMethodDataCash. **Description:** Данные для оплаты наличными в терминалах России или СНГ. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$phone](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataCash.md#property_phone) | | Телефон пользователя, на который придет смс с кодом платежа (для внесения наличных). Указывается в формате [ITU-T E.164](https://ru.wikipedia.org/wiki/E.164), например ~`79000000000`. Поле можно оставить пустым: пользователь сможет заполнить его при оплате на стороне ЮKassa. | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataCash.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getPhone()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataCash.md#method_getPhone) | | Возвращает номер телефона в формате ITU-T E.164. | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setPhone()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataCash.md#method_setPhone) | | Устанавливает номер телефона в формате ITU-T E.164. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataCash.php](../../lib/Request/Payments/PaymentData/PaymentDataCash.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataCash * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $phone : string --- ***Description*** Телефон пользователя, на который придет смс с кодом платежа (для внесения наличных). Указывается в формате [ITU-T E.164](https://ru.wikipedia.org/wiki/E.164), например ~`79000000000`. Поле можно оставить пустым: пользователь сможет заполнить его при оплате на стороне ЮKassa. **Type:** string **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) #### protected $_type : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataCash](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataCash.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getPhone() : string|null ```php public getPhone() : string|null ``` **Summary** Возвращает номер телефона в формате ITU-T E.164. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataCash](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataCash.md) **Returns:** string|null - Номер телефона в формате ITU-T E.164 #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setPhone() : self ```php public setPhone(string|null $phone = null) : self ``` **Summary** Устанавливает номер телефона в формате ITU-T E.164. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataCash](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataCash.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | phone | Номер телефона в формате ITU-T E.164 | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-ReceiptInterface.md000064400000014747150364342670022271 0ustar00# [YooKassa API SDK](../home.md) # Interface: ReceiptInterface ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Interface ReceiptInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getCustomer()](../classes/YooKassa-Model-Receipt-ReceiptInterface.md#method_getCustomer) | | Возвращает информацию о плательщике. | | public | [getItems()](../classes/YooKassa-Model-Receipt-ReceiptInterface.md#method_getItems) | | Возвращает список позиций в текущем чеке. | | public | [getObjectId()](../classes/YooKassa-Model-Receipt-ReceiptInterface.md#method_getObjectId) | | Возвращает Id объекта чека. | | public | [getSettlements()](../classes/YooKassa-Model-Receipt-ReceiptInterface.md#method_getSettlements) | | Возвращает массив оплат, обеспечивающих выдачу товара. | | public | [getTaxSystemCode()](../classes/YooKassa-Model-Receipt-ReceiptInterface.md#method_getTaxSystemCode) | | Возвращает код системы налогообложения. | | public | [normalize()](../classes/YooKassa-Model-Receipt-ReceiptInterface.md#method_normalize) | | Подгоняет стоимость товаров в чеке к общей цене заказа. | | public | [notEmpty()](../classes/YooKassa-Model-Receipt-ReceiptInterface.md#method_notEmpty) | | Проверяет есть ли в чеке хотя бы одна позиция. | --- ### Details * File: [lib/Model/Receipt/ReceiptInterface.php](../../lib/Model/Receipt/ReceiptInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Информация о плательщике | | property | | Список товаров в заказе | | property | | Код системы налогообложения. Число 1-6. | | property | | Код системы налогообложения. Число 1-6. | --- ## Methods #### public getObjectId() : null|string ```php public getObjectId() : null|string ``` **Summary** Возвращает Id объекта чека. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptInterface](../classes/YooKassa-Model-Receipt-ReceiptInterface.md) **Returns:** null|string - Id объекта чека #### public getCustomer() : \YooKassa\Model\Receipt\ReceiptCustomerInterface ```php public getCustomer() : \YooKassa\Model\Receipt\ReceiptCustomerInterface ``` **Summary** Возвращает информацию о плательщике. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptInterface](../classes/YooKassa-Model-Receipt-ReceiptInterface.md) **Returns:** \YooKassa\Model\Receipt\ReceiptCustomerInterface - Информация о плательщике #### public getItems() : \YooKassa\Model\Receipt\ReceiptItemInterface[]|\YooKassa\Common\ListObjectInterface ```php public getItems() : \YooKassa\Model\Receipt\ReceiptItemInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список позиций в текущем чеке. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptInterface](../classes/YooKassa-Model-Receipt-ReceiptInterface.md) **Returns:** \YooKassa\Model\Receipt\ReceiptItemInterface[]|\YooKassa\Common\ListObjectInterface - Список товаров в заказе #### public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptInterface](../classes/YooKassa-Model-Receipt-ReceiptInterface.md) **Returns:** \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface - Массив оплат, обеспечивающих выдачу товара #### public getTaxSystemCode() : int|null ```php public getTaxSystemCode() : int|null ``` **Summary** Возвращает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptInterface](../classes/YooKassa-Model-Receipt-ReceiptInterface.md) **Returns:** int|null - Код системы налогообложения. Число 1-6. #### public notEmpty() : bool ```php public notEmpty() : bool ``` **Summary** Проверяет есть ли в чеке хотя бы одна позиция. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptInterface](../classes/YooKassa-Model-Receipt-ReceiptInterface.md) **Returns:** bool - True если чек не пуст, false если в чеке нет ни одной позиции #### public normalize() : mixed ```php public normalize(\YooKassa\Model\AmountInterface $orderAmount, bool $withShipping = false) : mixed ``` **Summary** Подгоняет стоимость товаров в чеке к общей цене заказа. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptInterface](../classes/YooKassa-Model-Receipt-ReceiptInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface | orderAmount | Общая стоимость заказа | | bool | withShipping | Поменять ли заодно и цену доставки | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-DealType.md000064400000010331150364342670020017 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Deal\DealType ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Класс, представляющий модель DealType. **Description:** Тип сделки. Фиксированное значение: ~`safe_deal` — Безопасная сделка. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [SAFE_DEAL](../classes/YooKassa-Model-Deal-DealType.md#constant_SAFE_DEAL) | | Безопасная сделка | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Deal-DealType.md#property_validValues) | | Возвращает список доступных значений | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Deal/DealType.php](../../lib/Model/Deal/DealType.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Deal\DealType * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### SAFE_DEAL Безопасная сделка ```php SAFE_DEAL = 'safe_deal' ``` --- ## Properties #### protected $validValues : array --- **Summary** Возвращает список доступных значений **Type:** array Массив принимаемых enum'ом значений **Details:** ##### Tags | Tag | Version | Description | | --- | ------- | ----------- | | return | | | --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-ExtensionNotFoundException.md000064400000003320150364342670025264 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\ExtensionNotFoundException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- **Summary:** Требуемое PHP расширение не установлено. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-ExtensionNotFoundException.md#method___construct) | | Constructor. | --- ### Details * File: [lib/Common/Exceptions/ExtensionNotFoundException.php](../../lib/Common/Exceptions/ExtensionNotFoundException.php) * Package: Default * Class Hierarchy: * [\Exception](\Exception) * \YooKassa\Common\Exceptions\ExtensionNotFoundException --- ## Methods #### public __construct() : mixed ```php public __construct(string $name, int $code) : mixed ``` **Summary** Constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ExtensionNotFoundException](../classes/YooKassa-Common-Exceptions-ExtensionNotFoundException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | name | extension name | | int | code | error code | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataTinkoffBank.md000064400000034523150364342670026375 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataTinkoffBank ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentMethodDataTinkoffBank. **Description:** Данные для оплаты через интернет-банк Тинькофф. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataTinkoffBank.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataTinkoffBank.php](../../lib/Request/Payments/PaymentData/PaymentDataTinkoffBank.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataTinkoffBank * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) #### protected $_type : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataTinkoffBank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataTinkoffBank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Deals-DealsRequestSerializer.md000064400000004730150364342670023524 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Deals\DealsRequestSerializer ### Namespace: [\YooKassa\Request\Deals](../namespaces/yookassa-request-deals.md) --- **Summary:** Класс, представляющий модель DealsRequestSerializer. **Description:** Класс объекта осуществляющего сериализацию объектов запросов к API для получения списка сделок. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [serialize()](../classes/YooKassa-Request-Deals-DealsRequestSerializer.md#method_serialize) | | Сериализует объект запроса к API для дальнейшей его отправки. | --- ### Details * File: [lib/Request/Deals/DealsRequestSerializer.php](../../lib/Request/Deals/DealsRequestSerializer.php) * Package: YooKassa\Request * Class Hierarchy: * \YooKassa\Request\Deals\DealsRequestSerializer * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public serialize() : array ```php public serialize(\YooKassa\Common\AbstractRequest|\YooKassa\Request\Deals\DealsRequest|\YooKassa\Request\Deals\DealsRequestInterface $request) : array ``` **Summary** Сериализует объект запроса к API для дальнейшей его отправки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestSerializer](../classes/YooKassa-Request-Deals-DealsRequestSerializer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\AbstractRequest OR \YooKassa\Request\Deals\DealsRequest OR \YooKassa\Request\Deals\DealsRequestInterface | request | Сериализуемый объект | **Returns:** array - Массив с информацией, отправляемый в дальнейшем в API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Notification-NotificationRefundSucceeded.md000064400000055646150364342670025512 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Notification\NotificationRefundSucceeded ### Namespace: [\YooKassa\Model\Notification](../namespaces/yookassa-model-notification.md) --- **Summary:** Класс объекта, присылаемого API при изменении статуса возврата на "succeeded". --- ### Examples Пример скрипта обработки уведомления ```php require_once '../vendor/autoload.php'; try { $source = file_get_contents('php://input'); $data = json_decode($source, true); $factory = new \YooKassa\Model\Notification\NotificationFactory(); $notificationObject = $factory->factory($data); $responseObject = $notificationObject->getObject(); $client = new \YooKassa\Client(); if (!$client->isNotificationIPTrusted($_SERVER['REMOTE_ADDR'])) { header('HTTP/1.1 400 Something went wrong'); exit; } if (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_CANCELED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::REFUND_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'refundId' => $responseObject->getId(), 'refundStatus' => $responseObject->getStatus(), 'paymentId' => $responseObject->getPaymentId(), ]; // ... // Специфичная логика } else { header('HTTP/1.1 400 Something went wrong'); exit; } // Специфичная логика // ... $client->setAuth('xxxxxx', 'test_XXXXXXX'); // Получим актуальную информацию о платеже if ($paymentInfo = $client->getPaymentInfo($someData['paymentId'])) { $paymentStatus = $paymentInfo->getStatus(); // Специфичная логика // ... } else { header('HTTP/1.1 400 Something went wrong'); exit; } } catch (Exception $e) { header('HTTP/1.1 400 Something went wrong'); exit; } ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_event) | | Тип события | | public | [$object](../classes/YooKassa-Model-Notification-NotificationRefundSucceeded.md#property_object) | | Объект с информацией о возврате | | public | [$type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_type) | | Тип уведомления в виде строки | | protected | [$_event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__event) | | | | protected | [$_type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Model-Notification-NotificationRefundSucceeded.md#method_fromArray) | | Конструктор объекта нотификации. | | public | [getEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getEvent) | | Возвращает тип события. | | public | [getObject()](../classes/YooKassa-Model-Notification-NotificationRefundSucceeded.md#method_getObject) | | Возвращает объект с информацией о возврате, уведомление о котором хранится в текущем объекте. | | public | [getType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getType) | | Возвращает тип уведомления. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setObject()](../classes/YooKassa-Model-Notification-NotificationRefundSucceeded.md#method_setObject) | | Устанавливает объект с информацией о возврате, уведомление о которой хранится в текущем объекте. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setEvent) | | Устанавливает тип события. | | protected | [setType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setType) | | Устанавливает тип уведомления. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Notification/NotificationRefundSucceeded.php](../../lib/Model/Notification/NotificationRefundSucceeded.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) * \YooKassa\Model\Notification\NotificationRefundSucceeded * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $event : string --- ***Description*** Тип события **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### public $object : \YooKassa\Model\Refund\RefundInterface --- ***Description*** Объект с информацией о возврате **Type:** RefundInterface **Details:** #### public $type : string --- ***Description*** Тип уведомления в виде строки **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### protected $_event : ?string --- **Type:** ?string Тип произошедшего события **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### protected $_type : ?string --- **Type:** ?string Тип уведомления **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array $sourceArray) : void ``` **Summary** Конструктор объекта нотификации. **Description** Инициализирует текущий объект из ассоциативного массива, который просто путём JSON десериализации получен из тела пришедшего запроса. При конструировании проверяется валидность типа передаваемого уведомления, если передать уведомление не того типа, будет сгенерировано исключение типа {@link} **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationRefundSucceeded](../classes/YooKassa-Model-Notification-NotificationRefundSucceeded.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | sourceArray | Ассоциативный массив с информацией об уведомлении | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если значение типа нотификации или события не равны "notification" и "refund.succeeded" соответственно, что может говорить о том, что переданные в конструктор данные не являются уведомлением нужного типа. | **Returns:** void - #### public getEvent() : string|null ```php public getEvent() : string|null ``` **Summary** Возвращает тип события. **Description** Тип события - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип события #### public getObject() : \YooKassa\Model\Refund\RefundInterface ```php public getObject() : \YooKassa\Model\Refund\RefundInterface ``` **Summary** Возвращает объект с информацией о возврате, уведомление о котором хранится в текущем объекте. **Description** Так как нотификация может быть сгенерирована и поставлена в очередь на отправку гораздо раньше, чем она будет получена на сайте, то опираться на статус пришедшего возврата не стоит, лучше запросить текущую информацию о возврате у API. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationRefundSucceeded](../classes/YooKassa-Model-Notification-NotificationRefundSucceeded.md) **Returns:** \YooKassa\Model\Refund\RefundInterface - Объект с информацией о возврате #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип уведомления. **Description** Тип уведомления - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип уведомления в виде строки #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setObject() : self ```php public setObject(\YooKassa\Model\Refund\RefundInterface|array $object) : self ``` **Summary** Устанавливает объект с информацией о возврате, уведомление о которой хранится в текущем объекте. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationRefundSucceeded](../classes/YooKassa-Model-Notification-NotificationRefundSucceeded.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Refund\RefundInterface OR array | object | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setEvent() : self ```php protected setEvent(string|null $event) : self ``` **Summary** Устанавливает тип события. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | event | Тип события | **Returns:** self - #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип уведомления. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип уведомления | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-Confirmation-ConfirmationEmbedded.md000064400000045615150364342670025565 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\Confirmation\ConfirmationEmbedded ### Namespace: [\YooKassa\Model\Payment\Confirmation](../namespaces/yookassa-model-payment-confirmation.md) --- **Summary:** Класс, представляющий модель ConfirmationEmbedded. **Description:** Сценарий, при котором действия, необходимые для подтверждения платежа, будут зависеть от способа оплаты, который пользователь выберет в виджете ЮKassa. Подтверждение от пользователя получит ЮKassa — вам необходимо только встроить виджет к себе на страницу. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$confirmation_token](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationEmbedded.md#property_confirmation_token) | | Токен для платежного виджета | | public | [$confirmationToken](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationEmbedded.md#property_confirmationToken) | | Токен для платежного виджета | | public | [$type](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#property_type) | | Тип подтверждения платежа | | protected | [$_type](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#property__type) | | Тип подтверждения платежа. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationEmbedded.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getConfirmationData()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationData) | | | | public | [getConfirmationToken()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationEmbedded.md#method_getConfirmationToken) | | Возвращает токен для инициализации платежного виджета. | | public | [getConfirmationToken()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationToken) | | | | public | [getConfirmationUrl()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationUrl) | | | | public | [getType()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getType) | | Возвращает тип подтверждения платежа. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setConfirmationToken()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationEmbedded.md#method_setConfirmationToken) | | Устанавливает токен для инициализации платежного виджета. | | public | [setType()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_setType) | | Устанавливает тип подтверждения платежа | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/Confirmation/ConfirmationEmbedded.php](../../lib/Model/Payment/Confirmation/ConfirmationEmbedded.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) * \YooKassa\Model\Payment\Confirmation\ConfirmationEmbedded * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $confirmation_token : string --- ***Description*** Токен для платежного виджета **Type:** string **Details:** #### public $confirmationToken : string --- ***Description*** Токен для платежного виджета **Type:** string **Details:** #### public $type : string --- ***Description*** Тип подтверждения платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) #### protected $_type : ?string --- **Summary** Тип подтверждения платежа. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationEmbedded](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationEmbedded.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getConfirmationData() ```php public getConfirmationData() ``` **Description** Для ConfirmationQr **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationToken() : string|null ```php public getConfirmationToken() : string|null ``` **Summary** Возвращает токен для инициализации платежного виджета. **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationEmbedded](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationEmbedded.md) **Returns:** string|null - Токен для инициализации платежного виджета #### public getConfirmationToken() ```php public getConfirmationToken() ``` **Description** Для ConfirmationEmbedded **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationUrl() ```php public getConfirmationUrl() ``` **Description** Для ConfirmationRedirect **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getType() : ?string ```php public getType() : ?string ``` **Summary** Возвращает тип подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** ?string - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setConfirmationToken() : self ```php public setConfirmationToken(string|null $confirmation_token = null) : self ``` **Summary** Устанавливает токен для инициализации платежного виджета. **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationEmbedded](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationEmbedded.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | confirmation_token | Токен для инициализации платежного виджета | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип подтверждения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип подтверждения платежа | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-TransferInterface.md000064400000030227150364342670022473 0ustar00# [YooKassa API SDK](../home.md) # Interface: TransferInterface ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Interface TransferInterface. **Description:** Данные о распределении денег — сколько и в какой магазин нужно перевести. Присутствует, если вы используете [Сплитование платежей](/developers/solutions-for-platforms/split-payments/basics). --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAccountId()](../classes/YooKassa-Model-Payment-TransferInterface.md#method_getAccountId) | | Возвращает идентификатор магазина-получателя средств. | | public | [getAmount()](../classes/YooKassa-Model-Payment-TransferInterface.md#method_getAmount) | | Возвращает сумму оплаты. | | public | [getDescription()](../classes/YooKassa-Model-Payment-TransferInterface.md#method_getDescription) | | Возвращает описание транзакции. | | public | [getMetadata()](../classes/YooKassa-Model-Payment-TransferInterface.md#method_getMetadata) | | Возвращает метаданные. | | public | [getPlatformFeeAmount()](../classes/YooKassa-Model-Payment-TransferInterface.md#method_getPlatformFeeAmount) | | Возвращает комиссию за проданные товары и услуги, которая удерживается с магазина в вашу пользу. | | public | [getStatus()](../classes/YooKassa-Model-Payment-TransferInterface.md#method_getStatus) | | Возвращает статус операции распределения средств конечному получателю. | | public | [setAccountId()](../classes/YooKassa-Model-Payment-TransferInterface.md#method_setAccountId) | | Устанавливает идентификатор магазина-получателя средств. | | public | [setAmount()](../classes/YooKassa-Model-Payment-TransferInterface.md#method_setAmount) | | Устанавливает сумму оплаты. | | public | [setDescription()](../classes/YooKassa-Model-Payment-TransferInterface.md#method_setDescription) | | Устанавливает описание транзакции. | | public | [setMetadata()](../classes/YooKassa-Model-Payment-TransferInterface.md#method_setMetadata) | | Устанавливает метаданные. | | public | [setPlatformFeeAmount()](../classes/YooKassa-Model-Payment-TransferInterface.md#method_setPlatformFeeAmount) | | Устанавливает комиссию за проданные товары и услуги, которая удерживается с магазина в вашу пользу. | | public | [setStatus()](../classes/YooKassa-Model-Payment-TransferInterface.md#method_setStatus) | | Устанавливает статус операции распределения средств конечному получателю. | --- ### Details * File: [lib/Model/Payment/TransferInterface.php](../../lib/Model/Payment/TransferInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Идентификатор магазина, в пользу которого вы принимаете оплату | | property | | Идентификатор магазина, в пользу которого вы принимаете оплату | | property | | Сумма, которую необходимо перечислить магазину | | property | | Комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу | | property | | Комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу | | property | | Статус распределения денег между магазинами. Возможные значения: `pending`, `waiting_for_capture`, `succeeded`, `canceled` | | property | | Описание транзакции, которое продавец увидит в личном кабинете ЮKassa. (например: «Заказ маркетплейса №72») | | property | | Любые дополнительные данные, которые нужны вам для работы с платежами (например, ваш внутренний идентификатор заказа) | | property | | Порядок перевода денег продавцам: ~`true` — перевести сразу, ~`false` — сначала захолдировать | | property | | Порядок перевода денег продавцам: ~`true` — перевести сразу, ~`false` — сначала захолдировать | | property | | Идентификатор продавца, подключенного к вашей платформе | | property | | Идентификатор продавца, подключенного к вашей платформе | --- ## Methods #### public setAccountId() : self ```php public setAccountId(string $value) : self ``` **Summary** Устанавливает идентификатор магазина-получателя средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\TransferInterface](../classes/YooKassa-Model-Payment-TransferInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Идентификатор магазина-получателя средств | **Returns:** self - #### public getAccountId() : null|string ```php public getAccountId() : null|string ``` **Summary** Возвращает идентификатор магазина-получателя средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\TransferInterface](../classes/YooKassa-Model-Payment-TransferInterface.md) **Returns:** null|string - Идентификатор магазина-получателя средств #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\TransferInterface](../classes/YooKassa-Model-Payment-TransferInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма оплаты #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $value) : self ``` **Summary** Устанавливает сумму оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\TransferInterface](../classes/YooKassa-Model-Payment-TransferInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | value | Сумма оплаты | **Returns:** self - #### public getPlatformFeeAmount() : \YooKassa\Model\AmountInterface|null ```php public getPlatformFeeAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает комиссию за проданные товары и услуги, которая удерживается с магазина в вашу пользу. **Details:** * Inherited From: [\YooKassa\Model\Payment\TransferInterface](../classes/YooKassa-Model-Payment-TransferInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма комиссии #### public setPlatformFeeAmount() : self ```php public setPlatformFeeAmount(\YooKassa\Model\AmountInterface|array|null $value) : self ``` **Summary** Устанавливает комиссию за проданные товары и услуги, которая удерживается с магазина в вашу пользу. **Details:** * Inherited From: [\YooKassa\Model\Payment\TransferInterface](../classes/YooKassa-Model-Payment-TransferInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | value | Сумма комиссии | **Returns:** self - #### public getStatus() : null|string ```php public getStatus() : null|string ``` **Summary** Возвращает статус операции распределения средств конечному получателю. **Details:** * Inherited From: [\YooKassa\Model\Payment\TransferInterface](../classes/YooKassa-Model-Payment-TransferInterface.md) **Returns:** null|string - Статус операции распределения средств конечному получателю #### public setStatus() : mixed ```php public setStatus(?string $value) : mixed ``` **Summary** Устанавливает статус операции распределения средств конечному получателю. **Details:** * Inherited From: [\YooKassa\Model\Payment\TransferInterface](../classes/YooKassa-Model-Payment-TransferInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?string | value | | **Returns:** mixed - #### public setDescription() : self ```php public setDescription(null|string $value) : self ``` **Summary** Устанавливает описание транзакции. **Details:** * Inherited From: [\YooKassa\Model\Payment\TransferInterface](../classes/YooKassa-Model-Payment-TransferInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | value | Описание транзакции | **Returns:** self - #### public getDescription() : null|string ```php public getDescription() : null|string ``` **Summary** Возвращает описание транзакции. **Details:** * Inherited From: [\YooKassa\Model\Payment\TransferInterface](../classes/YooKassa-Model-Payment-TransferInterface.md) **Returns:** null|string - Описание транзакции #### public setMetadata() : self ```php public setMetadata(null|array|\YooKassa\Model\Metadata $value) : self ``` **Summary** Устанавливает метаданные. **Details:** * Inherited From: [\YooKassa\Model\Payment\TransferInterface](../classes/YooKassa-Model-Payment-TransferInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Metadata | value | Метаданные | **Returns:** self - #### public getMetadata() : null|\YooKassa\Model\Metadata ```php public getMetadata() : null|\YooKassa\Model\Metadata ``` **Summary** Возвращает метаданные. **Details:** * Inherited From: [\YooKassa\Model\Payment\TransferInterface](../classes/YooKassa-Model-Payment-TransferInterface.md) **Returns:** null|\YooKassa\Model\Metadata - Метаданные --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Helpers-SecurityHelper.md000064400000004522150364342670020763 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Helpers\SecurityHelper ### Namespace: [\YooKassa\Helpers](../namespaces/yookassa-helpers.md) --- **Summary:** Класс, представляющий модель SecurityHelper. **Description:** Класс для проверки IP адреса входящих запросов от API кассы. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [isIPTrusted()](../classes/YooKassa-Helpers-SecurityHelper.md#method_isIPTrusted) | | Проверяет формат IP адреса и вызывает соответствующие методы для проверки среди IPv4 и IPv6 адресов Юkassa. | --- ### Details * File: [lib/Helpers/SecurityHelper.php](../../lib/Helpers/SecurityHelper.php) * Package: YooKassa\Helpers * Class Hierarchy: * \YooKassa\Helpers\SecurityHelper * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public isIPTrusted() : bool ```php public isIPTrusted(mixed $ip) : bool ``` **Summary** Проверяет формат IP адреса и вызывает соответствующие методы для проверки среди IPv4 и IPv6 адресов Юkassa. **Details:** * Inherited From: [\YooKassa\Helpers\SecurityHelper](../classes/YooKassa-Helpers-SecurityHelper.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | ip | - IPv4 или IPv6 адрес webhook уведомления | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | - исключение будет выброшено, если не удастся установить формат IP адреса | **Returns:** bool - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Helpers-Random.md000064400000016672150364342670017245 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Helpers\Random ### Namespace: [\YooKassa\Helpers](../namespaces/yookassa-helpers.md) --- **Summary:** Класс, представляющий модель Random. **Description:** Класс хэлпера для генерации случайных значений, используется в тестах. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [bool()](../classes/YooKassa-Helpers-Random.md#method_bool) | | Возвращает рандомное буллево значение. | | public | [bytes()](../classes/YooKassa-Helpers-Random.md#method_bytes) | | Возвращает рандомную последовательность байт | | public | [float()](../classes/YooKassa-Helpers-Random.md#method_float) | | Возвращает рандомное число с плавающей точкой. По умолчанию возвращает значение в промежутке от нуля до едениы. | | public | [hex()](../classes/YooKassa-Helpers-Random.md#method_hex) | | Возвращает строку, состоящую из символов '0123456789abcdef'. | | public | [int()](../classes/YooKassa-Helpers-Random.md#method_int) | | Возвращает рандомное целое число. По умолчанию возвращает число от нуля до PHP_INT_MAX. | | public | [str()](../classes/YooKassa-Helpers-Random.md#method_str) | | Возвращает строку из рандомных символов. | | public | [value()](../classes/YooKassa-Helpers-Random.md#method_value) | | Возвращает рандомное значение из переданного массива. | --- ### Details * File: [lib/Helpers/Random.php](../../lib/Helpers/Random.php) * Package: YooKassa\Helpers * Class Hierarchy: * \YooKassa\Helpers\Random * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public bool() : bool ```php Static public bool() : bool ``` **Summary** Возвращает рандомное буллево значение. **Details:** * Inherited From: [\YooKassa\Helpers\Random](../classes/YooKassa-Helpers-Random.md) **Returns:** bool - Либо true либо false, одно из двух #### public bytes() : string ```php Static public bytes(int $length) : string ``` **Summary** Возвращает рандомную последовательность байт **Details:** * Inherited From: [\YooKassa\Helpers\Random](../classes/YooKassa-Helpers-Random.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | length | Длина возвращаемой строки | **Returns:** string - Строка, состоящая из рандомных символов #### public float() : float ```php Static public float(null|float $min = null, null|float $max = null) : float ``` **Summary** Возвращает рандомное число с плавающей точкой. По умолчанию возвращает значение в промежутке от нуля до едениы. **Details:** * Inherited From: [\YooKassa\Helpers\Random](../classes/YooKassa-Helpers-Random.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR float | min | Минимально возможное значение | | null OR float | max | Максимально возможное значение | **Returns:** float - Рандомное число с плавающей точкой #### public hex() : string ```php Static public hex(int $length, bool $useBest = true) : string ``` **Summary** Возвращает строку, состоящую из символов '0123456789abcdef'. **Details:** * Inherited From: [\YooKassa\Helpers\Random](../classes/YooKassa-Helpers-Random.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | length | Длина возвращаемой строки | | bool | useBest | Использовать ли функцию random_int если она доступна | **Returns:** string - Строка, состоящая из рандомных символов #### public int() : int ```php Static public int(null|int $min = null, null|int $max = null) : int ``` **Summary** Возвращает рандомное целое число. По умолчанию возвращает число от нуля до PHP_INT_MAX. **Details:** * Inherited From: [\YooKassa\Helpers\Random](../classes/YooKassa-Helpers-Random.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR int | min | Минимально возможное значение | | null OR int | max | Максимально возможное значение | **Returns:** int - Рандомное целое число #### public str() : string ```php Static public str(int $length, null|int|string $maxLength = null, null|array|string $characters = null) : string ``` **Summary** Возвращает строку из рандомных символов. **Details:** * Inherited From: [\YooKassa\Helpers\Random](../classes/YooKassa-Helpers-Random.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | length | Длина возвращаемой строки, или минимальная длина, если передан парамтр $maxLength | | null OR int OR string | maxLength | Если параметр не равен null, возвращает сроку длиной от $length до $maxLength | | null OR array OR string | characters | Строка или массив используемых в строке символов | **Returns:** string - Строка, состоящая из рандомных символов #### public value() : mixed ```php Static public value(array $values) : mixed ``` **Summary** Возвращает рандомное значение из переданного массива. **Details:** * Inherited From: [\YooKassa\Helpers\Random](../classes/YooKassa-Helpers-Random.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | values | Массив источник данных | **Returns:** mixed - Случайное значение из переданного массива --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodMobileBalance.md000064400000060655150364342670027026 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodMobileBalance ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodMobileBalance. **Description:** Оплата с баланса мобильного телефона. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$phone](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodMobileBalance.md#property_phone) | | Номер телефона в формате ITU-T E.164 с которого плательщик собирается произвести оплату | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodMobileBalance.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getPhone()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodMobileBalance.md#method_getPhone) | | Возвращает номер телефона в формате ITU-T E.164. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setPhone()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodMobileBalance.md#method_setPhone) | | Устанавливает номер телефона в формате ITU-T E.164. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodMobileBalance.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodMobileBalance.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodMobileBalance * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $phone : string --- ***Description*** Номер телефона в формате ITU-T E.164 с которого плательщик собирается произвести оплату **Type:** string **Details:** #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodMobileBalance](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodMobileBalance.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getPhone() : ?string ```php public getPhone() : ?string ``` **Summary** Возвращает номер телефона в формате ITU-T E.164. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodMobileBalance](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodMobileBalance.md) **Returns:** ?string - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setPhone() : self ```php public setPhone(?string $phone) : self ``` **Summary** Устанавливает номер телефона в формате ITU-T E.164. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodMobileBalance](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodMobileBalance.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?string | phone | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-NotFoundException.md000064400000010404150364342670023370 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\NotFoundException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- **Summary:** Ресурс не найден. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [HTTP_CODE](../classes/YooKassa-Common-Exceptions-NotFoundException.md#constant_HTTP_CODE) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$retryAfter](../classes/YooKassa-Common-Exceptions-NotFoundException.md#property_retryAfter) | | | | public | [$type](../classes/YooKassa-Common-Exceptions-NotFoundException.md#property_type) | | | | protected | [$responseBody](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseBody) | | | | protected | [$responseHeaders](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseHeaders) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-NotFoundException.md#method___construct) | | Constructor. | | public | [getResponseBody()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseBody) | | | | public | [getResponseHeaders()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseHeaders) | | | --- ### Details * File: [lib/Common/Exceptions/NotFoundException.php](../../lib/Common/Exceptions/NotFoundException.php) * Package: Default * Class Hierarchy: * [\Exception](\Exception) * [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) * \YooKassa\Common\Exceptions\NotFoundException --- ## Constants ###### HTTP_CODE ```php HTTP_CODE = 404 ``` --- ## Properties #### public $retryAfter : mixed --- **Type:** mixed **Details:** #### public $type : mixed --- **Type:** mixed **Details:** #### protected $responseBody : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) #### protected $responseHeaders : array --- **Type:** array **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array $responseHeaders = [], ?string $responseBody = '') : mixed ``` **Summary** Constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\NotFoundException](../classes/YooKassa-Common-Exceptions-NotFoundException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | responseHeaders | HTTP header | | ?string | responseBody | HTTP body | **Returns:** mixed - #### public getResponseBody() : ?string ```php public getResponseBody() : ?string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** ?string - #### public getResponseHeaders() : string[] ```php public getResponseHeaders() : string[] ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** string[] - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md000064400000034160150364342670025316 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData ### Namespace: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank](../namespaces/yookassa-model-payment-paymentmethod-b2b-sberbank.md) --- **Summary:** Класс, представляющий модель VatData. **Description:** Данные о налоге на добавленную стоимость (НДС). Платеж может облагаться или не облагаться НДС. Товары могут облагаться по одной ставке НДС или по разным. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#property_type) | | Способ расчёта НДС | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#method_getType) | | Возвращает способ расчёта НДС | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#method_setType) | | Устанавливает способ расчёта НДС | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/B2b/Sberbank/VatData.php](../../lib/Model/Payment/PaymentMethod/B2b/Sberbank/VatData.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Способ расчёта НДС **Type:** string **Details:** #### protected $_type : ?string --- **Type:** ?string Способ расчёта НДС **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает способ расчёта НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) **Returns:** string|null - Способ расчёта НДС #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setType() : self ```php public setType(string|null $type) : self ``` **Summary** Устанавливает способ расчёта НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Способ расчёта НДС | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataSberbank.md000064400000041315150364342670025725 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataSberbank ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentMethodDataSberbank. **Description:** Данные для оплаты через SberPay. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$phone](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataSberbank.md#property_phone) | | Телефон пользователя, на который зарегистрирован аккаунт в SberPay. Необходим для подтверждения оплаты по смс (сценарий подтверждения ~`external`). Указывается в формате [ITU-T E.164](https://ru.wikipedia.org/wiki/E.164), например ~`79000000000`. | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataSberbank.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getPhone()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataSberbank.md#method_getPhone) | | Возвращает номер телефона в формате ITU-T E.164 | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setPhone()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataSberbank.md#method_setPhone) | | Устанавливает номер телефона в формате ITU-T E.164 | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataSberbank.php](../../lib/Request/Payments/PaymentData/PaymentDataSberbank.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataSberbank * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $phone : string --- ***Description*** Телефон пользователя, на который зарегистрирован аккаунт в SberPay. Необходим для подтверждения оплаты по смс (сценарий подтверждения ~`external`). Указывается в формате [ITU-T E.164](https://ru.wikipedia.org/wiki/E.164), например ~`79000000000`. **Type:** string **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) #### protected $_type : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataSberbank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataSberbank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getPhone() : string|null ```php public getPhone() : string|null ``` **Summary** Возвращает номер телефона в формате ITU-T E.164 **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataSberbank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataSberbank.md) **Returns:** string|null - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setPhone() : self ```php public setPhone(string|null $phone = null) : self ``` **Summary** Устанавливает номер телефона в формате ITU-T E.164 **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataSberbank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataSberbank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | phone | Номер телефона в формате ITU-T E.164 | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Notification-NotificationPayoutCanceled.md000064400000055600150364342670025350 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Notification\NotificationPayoutCanceled ### Namespace: [\YooKassa\Model\Notification](../namespaces/yookassa-model-notification.md) --- **Summary:** Класс объекта, присылаемого API при изменении статуса выплаты на "canceled". --- ### Examples Пример скрипта обработки уведомления ```php require_once '../vendor/autoload.php'; try { $source = file_get_contents('php://input'); $data = json_decode($source, true); $factory = new \YooKassa\Model\Notification\NotificationFactory(); $notificationObject = $factory->factory($data); $responseObject = $notificationObject->getObject(); $client = new \YooKassa\Client(); if (!$client->isNotificationIPTrusted($_SERVER['REMOTE_ADDR'])) { header('HTTP/1.1 400 Something went wrong'); exit; } if (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_CANCELED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::REFUND_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'refundId' => $responseObject->getId(), 'refundStatus' => $responseObject->getStatus(), 'paymentId' => $responseObject->getPaymentId(), ]; // ... // Специфичная логика } else { header('HTTP/1.1 400 Something went wrong'); exit; } // Специфичная логика // ... $client->setAuth('xxxxxx', 'test_XXXXXXX'); // Получим актуальную информацию о платеже if ($paymentInfo = $client->getPaymentInfo($someData['paymentId'])) { $paymentStatus = $paymentInfo->getStatus(); // Специфичная логика // ... } else { header('HTTP/1.1 400 Something went wrong'); exit; } } catch (Exception $e) { header('HTTP/1.1 400 Something went wrong'); exit; } ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_event) | | Тип события | | public | [$object](../classes/YooKassa-Model-Notification-NotificationPayoutCanceled.md#property_object) | | Объект с информацией о выплате | | public | [$type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_type) | | Тип уведомления в виде строки | | protected | [$_event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__event) | | | | protected | [$_type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Model-Notification-NotificationPayoutCanceled.md#method_fromArray) | | Конструктор объекта нотификации. | | public | [getEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getEvent) | | Возвращает тип события. | | public | [getObject()](../classes/YooKassa-Model-Notification-NotificationPayoutCanceled.md#method_getObject) | | Возвращает объект с информацией о выплате, уведомление о которой хранится в текущем объекте. | | public | [getType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getType) | | Возвращает тип уведомления. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setObject()](../classes/YooKassa-Model-Notification-NotificationPayoutCanceled.md#method_setObject) | | Устанавливает объект с информацией о выплате, уведомление о которой хранится в текущем объекте. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setEvent) | | Устанавливает тип события. | | protected | [setType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setType) | | Устанавливает тип уведомления. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Notification/NotificationPayoutCanceled.php](../../lib/Model/Notification/NotificationPayoutCanceled.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) * \YooKassa\Model\Notification\NotificationPayoutCanceled * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $event : string --- ***Description*** Тип события **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### public $object : \YooKassa\Model\Payout\PayoutInterface --- ***Description*** Объект с информацией о выплате **Type:** PayoutInterface **Details:** #### public $type : string --- ***Description*** Тип уведомления в виде строки **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### protected $_event : ?string --- **Type:** ?string Тип произошедшего события **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### protected $_type : ?string --- **Type:** ?string Тип уведомления **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array $sourceArray) : void ``` **Summary** Конструктор объекта нотификации. **Description** Инициализирует текущий объект из ассоциативного массива, который просто путём JSON десериализации получен из тела пришедшего запроса. При конструировании проверяется валидность типа передаваемого уведомления, если передать уведомление не того типа, будет сгенерировано исключение типа {@link} **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationPayoutCanceled](../classes/YooKassa-Model-Notification-NotificationPayoutCanceled.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | sourceArray | Ассоциативный массив с информацией об уведомлении | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если значение типа нотификации или события не равны "notification" и "payout.canceled" соответственно, что может говорить о том, что переданные в конструктор данные не являются уведомлением нужного типа. | **Returns:** void - #### public getEvent() : string|null ```php public getEvent() : string|null ``` **Summary** Возвращает тип события. **Description** Тип события - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип события #### public getObject() : \YooKassa\Model\Payout\PayoutInterface ```php public getObject() : \YooKassa\Model\Payout\PayoutInterface ``` **Summary** Возвращает объект с информацией о выплате, уведомление о которой хранится в текущем объекте. **Description** Так как нотификация может быть сгенерирована и поставлена в очередь на отправку гораздо раньше, чем она будет получена на сайте, то опираться на статус пришедшей выплаты не стоит, лучше запросить текущую информацию о выплате у API. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationPayoutCanceled](../classes/YooKassa-Model-Notification-NotificationPayoutCanceled.md) **Returns:** \YooKassa\Model\Payout\PayoutInterface - Объект с информацией о выплате #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип уведомления. **Description** Тип уведомления - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип уведомления в виде строки #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setObject() : self ```php public setObject(\YooKassa\Model\Payout\PayoutInterface|array $object) : self ``` **Summary** Устанавливает объект с информацией о выплате, уведомление о которой хранится в текущем объекте. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationPayoutCanceled](../classes/YooKassa-Model-Notification-NotificationPayoutCanceled.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\PayoutInterface OR array | object | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setEvent() : self ```php protected setEvent(string|null $event) : self ``` **Summary** Устанавливает тип события. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | event | Тип события | **Returns:** self - #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип уведомления. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип уведомления | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationFactory.md000064400000007164150364342670026336 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\SelfEmployed\SelfEmployedConfirmationFactory ### Namespace: [\YooKassa\Model\SelfEmployed](../namespaces/yookassa-model-selfemployed.md) --- **Summary:** Фабрика создания объекта сценария подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [factory()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationFactory.md#method_factory) | | Возвращает объект, соответствующий типу подтверждения платежа. | | public | [factoryFromArray()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationFactory.md#method_factoryFromArray) | | Возвращает объект, соответствующий типу подтверждения платежа, из массива данных. | --- ### Details * File: [lib/Model/SelfEmployed/SelfEmployedConfirmationFactory.php](../../lib/Model/SelfEmployed/SelfEmployedConfirmationFactory.php) * Package: YooKassa\Model * Class Hierarchy: * \YooKassa\Model\SelfEmployed\SelfEmployedConfirmationFactory * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public factory() : \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation ```php public factory(string $type) : \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation ``` **Summary** Возвращает объект, соответствующий типу подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmationFactory](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | type | Тип подтверждения платежа | **Returns:** \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation - #### public factoryFromArray() : \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation ```php public factoryFromArray(array $data, null|string $type = null) : \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation ``` **Summary** Возвращает объект, соответствующий типу подтверждения платежа, из массива данных. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmationFactory](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | data | Массив данных подтверждения платежа | | null OR string | type | Тип подтверждения платежа | **Returns:** \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-Confirmation-ConfirmationQr.md000064400000044650150364342670024454 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\Confirmation\ConfirmationQr ### Namespace: [\YooKassa\Model\Payment\Confirmation](../namespaces/yookassa-model-payment-confirmation.md) --- **Summary:** Класс, представляющий модель ConfirmationQr. **Description:** Сценарий при котором для подтверждения платежа пользователю необходимо просканировать QR-код. От вас требуется сгенерировать QR-код, используя любой доступный инструмент, и отобразить его на странице оплаты. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$confirmation_data](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationQr.md#property_confirmation_data) | | URL для создания QR-кода | | public | [$confirmationData](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationQr.md#property_confirmationData) | | URL для создания QR-кода | | public | [$type](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#property_type) | | Тип подтверждения платежа | | protected | [$_type](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#property__type) | | Тип подтверждения платежа. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationQr.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getConfirmationData()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationQr.md#method_getConfirmationData) | | Возвращает данные для генерации QR-кода. | | public | [getConfirmationData()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationData) | | | | public | [getConfirmationToken()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationToken) | | | | public | [getConfirmationUrl()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationUrl) | | | | public | [getType()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getType) | | Возвращает тип подтверждения платежа. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setConfirmationData()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationQr.md#method_setConfirmationData) | | Устанавливает данные для генерации QR-кода. | | public | [setType()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_setType) | | Устанавливает тип подтверждения платежа | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/Confirmation/ConfirmationQr.php](../../lib/Model/Payment/Confirmation/ConfirmationQr.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) * \YooKassa\Model\Payment\Confirmation\ConfirmationQr * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $confirmation_data : string --- ***Description*** URL для создания QR-кода **Type:** string **Details:** #### public $confirmationData : string --- ***Description*** URL для создания QR-кода **Type:** string **Details:** #### public $type : string --- ***Description*** Тип подтверждения платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) #### protected $_type : ?string --- **Summary** Тип подтверждения платежа. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationQr](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationQr.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getConfirmationData() : string|null ```php public getConfirmationData() : string|null ``` **Summary** Возвращает данные для генерации QR-кода. **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationQr](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationQr.md) **Returns:** string|null - #### public getConfirmationData() ```php public getConfirmationData() ``` **Description** Для ConfirmationQr **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationToken() ```php public getConfirmationToken() ``` **Description** Для ConfirmationEmbedded **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationUrl() ```php public getConfirmationUrl() ``` **Description** Для ConfirmationRedirect **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getType() : ?string ```php public getType() : ?string ``` **Summary** Возвращает тип подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** ?string - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setConfirmationData() : self ```php public setConfirmationData(string|null $confirmation_data = null) : self ``` **Summary** Устанавливает данные для генерации QR-кода. **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationQr](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationQr.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | confirmation_data | Данные для генерации QR-кода. | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип подтверждения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип подтверждения платежа | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Helpers-Config-ConfigurationLoaderInterface.md000064400000003775150364342670025007 0ustar00# [YooKassa API SDK](../home.md) # Interface: ConfigurationLoaderInterface ### Namespace: [\YooKassa\Helpers\Config](../namespaces/yookassa-helpers-config.md) --- **Summary:** Interface ConfigurationLoaderInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getConfig()](../classes/YooKassa-Helpers-Config-ConfigurationLoaderInterface.md#method_getConfig) | | | | public | [load()](../classes/YooKassa-Helpers-Config-ConfigurationLoaderInterface.md#method_load) | | | --- ### Details * File: [lib/Helpers/Config/ConfigurationLoaderInterface.php](../../lib/Helpers/Config/ConfigurationLoaderInterface.php) * Package: \YooKassa\Helpers * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | --- ## Methods #### public getConfig() : array ```php public getConfig() : array ``` **Details:** * Inherited From: [\YooKassa\Helpers\Config\ConfigurationLoaderInterface](../classes/YooKassa-Helpers-Config-ConfigurationLoaderInterface.md) **Returns:** array - #### public load() : \YooKassa\Helpers\Config\ConfigurationLoaderInterface ```php public load() : \YooKassa\Helpers\Config\ConfigurationLoaderInterface ``` **Details:** * Inherited From: [\YooKassa\Helpers\Config\ConfigurationLoaderInterface](../classes/YooKassa-Helpers-Config-ConfigurationLoaderInterface.md) **Returns:** \YooKassa\Helpers\Config\ConfigurationLoaderInterface - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Webhook-WebhookListResponse.md000064400000045546150364342670023422 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Webhook\WebhookListResponse ### Namespace: [\YooKassa\Request\Webhook](../namespaces/yookassa-request-webhook.md) --- **Summary:** Актуальный список объектов webhook для переданного OAuth-токена. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$items](../classes/YooKassa-Request-Webhook-WebhookListResponse.md#property_items) | | Список объектов Webhook. | | public | [$nextCursor](../classes/YooKassa-Request-AbstractListResponse.md#property_nextCursor) | | Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. | | public | [$type](../classes/YooKassa-Request-AbstractListResponse.md#property_type) | | Формат выдачи результатов запроса. Возможное значение: `list` (список). | | protected | [$_items](../classes/YooKassa-Request-Webhook-WebhookListResponse.md#property__items) | | Список установленных webhook для переданного OAuth-токена. | | protected | [$_next_cursor](../classes/YooKassa-Request-AbstractListResponse.md#property__next_cursor) | | Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. | | protected | [$_type](../classes/YooKassa-Request-AbstractListResponse.md#property__type) | | Формат выдачи результатов запроса. Возможное значение: `list` (список). | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getItems()](../classes/YooKassa-Request-Webhook-WebhookListResponse.md#method_getItems) | | Возвращает список установленных webhook для переданного OAuth-токена. | | public | [getNextCursor()](../classes/YooKassa-Request-AbstractListResponse.md#method_getNextCursor) | | Возвращает токен следующей страницы, если он задан, или null. | | public | [getType()](../classes/YooKassa-Request-AbstractListResponse.md#method_getType) | | Возвращает формат выдачи результатов запроса. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasNextCursor()](../classes/YooKassa-Request-AbstractListResponse.md#method_hasNextCursor) | | Проверяет, имеется ли в ответе токен следующей страницы. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Webhook/WebhookListResponse.php](../../lib/Request/Webhook/WebhookListResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) * \YooKassa\Request\Webhook\WebhookListResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $items : \YooKassa\Model\Webhook\WebhookInterface[]|\YooKassa\Common\ListObjectInterface|null --- ***Description*** Список объектов Webhook. **Type:** ListObjectInterface|null **Details:** #### public $nextCursor : string --- ***Description*** Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### public $type : string --- ***Description*** Формат выдачи результатов запроса. Возможное значение: `list` (список). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### protected $_items : ?\YooKassa\Common\ListObject --- **Summary** Список установленных webhook для переданного OAuth-токена. **Type:** ListObject Список установленных webhook **Details:** #### protected $_next_cursor : ?string --- **Summary** Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### protected $_type : string --- **Summary** Формат выдачи результатов запроса. Возможное значение: `list` (список). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getItems() : \YooKassa\Model\Webhook\WebhookInterface[]|\YooKassa\Common\ListObjectInterface ```php public getItems() : \YooKassa\Model\Webhook\WebhookInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список установленных webhook для переданного OAuth-токена. **Details:** * Inherited From: [\YooKassa\Request\Webhook\WebhookListResponse](../classes/YooKassa-Request-Webhook-WebhookListResponse.md) **Returns:** \YooKassa\Model\Webhook\WebhookInterface[]|\YooKassa\Common\ListObjectInterface - Список установленных webhook #### public getNextCursor() : null|string ```php public getNextCursor() : null|string ``` **Summary** Возвращает токен следующей страницы, если он задан, или null. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** null|string - Токен следующей страницы #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает формат выдачи результатов запроса. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasNextCursor() : bool ```php public hasNextCursor() : bool ``` **Summary** Проверяет, имеется ли в ответе токен следующей страницы. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** bool - True если токен следующей страницы есть, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Refund-RefundCancellationDetailsReasonCode.md000064400000017450150364342670025710 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Refund\RefundCancellationDetailsReasonCode ### Namespace: [\YooKassa\Model\Refund](../namespaces/yookassa-model-refund.md) --- **Summary:** Класс, представляющий модель RefundCancellationDetailsReasonCode. **Description:** Возможные причины отмены возврата: - `general_decline` - Причина не детализирована - `insufficient_funds` - Не хватает денег, чтобы сделать возврат - `rejected_by_payee` - Эмитент платежного средства отклонил возврат по неизвестным причинам - `yoo_money_account_closed` - Пользователь закрыл кошелек ЮMoney, на который вы пытаетесь вернуть платеж --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [GENERAL_DECLINE](../classes/YooKassa-Model-Refund-RefundCancellationDetailsReasonCode.md#constant_GENERAL_DECLINE) | | Причина не детализирована. Для уточнения подробностей обратитесь в техническую поддержку. | | public | [INSUFFICIENT_FUNDS](../classes/YooKassa-Model-Refund-RefundCancellationDetailsReasonCode.md#constant_INSUFFICIENT_FUNDS) | | Не хватает денег, чтобы сделать возврат: сумма платежей, которые вы получили в день возврата, меньше, чем сам возврат, или есть задолженность. [Что делать в этом случае](https://yookassa.ru/docs/support/payments/refunding#refunding__block) | | public | [REJECTED_BY_PAYEE](../classes/YooKassa-Model-Refund-RefundCancellationDetailsReasonCode.md#constant_REJECTED_BY_PAYEE) | | Эмитент платежного средства отклонил возврат по неизвестным причинам. Предложите пользователю обратиться к эмитенту для уточнения подробностей или договоритесь с пользователем о том, чтобы вернуть ему деньги напрямую, не через ЮKassa. | | public | [YOO_MONEY_ACCOUNT_CLOSED](../classes/YooKassa-Model-Refund-RefundCancellationDetailsReasonCode.md#constant_YOO_MONEY_ACCOUNT_CLOSED) | | Пользователь закрыл кошелек ЮMoney, на который вы пытаетесь вернуть платеж. Сделать возврат через ЮKassa нельзя. Договоритесь с пользователем напрямую, каким способом вы вернете ему деньги. | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Refund-RefundCancellationDetailsReasonCode.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Refund/RefundCancellationDetailsReasonCode.php](../../lib/Model/Refund/RefundCancellationDetailsReasonCode.php) * Package: Default * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Refund\RefundCancellationDetailsReasonCode --- ## Constants ###### GENERAL_DECLINE Причина не детализирована. Для уточнения подробностей обратитесь в техническую поддержку. ```php GENERAL_DECLINE = 'general_decline' ``` ###### INSUFFICIENT_FUNDS Не хватает денег, чтобы сделать возврат: сумма платежей, которые вы получили в день возврата, меньше, чем сам возврат, или есть задолженность. [Что делать в этом случае](https://yookassa.ru/docs/support/payments/refunding#refunding__block) ```php INSUFFICIENT_FUNDS = 'insufficient_funds' ``` ###### REJECTED_BY_PAYEE Эмитент платежного средства отклонил возврат по неизвестным причинам. Предложите пользователю обратиться к эмитенту для уточнения подробностей или договоритесь с пользователем о том, чтобы вернуть ему деньги напрямую, не через ЮKassa. ```php REJECTED_BY_PAYEE = 'rejected_by_payee' ``` ###### YOO_MONEY_ACCOUNT_CLOSED Пользователь закрыл кошелек ЮMoney, на который вы пытаетесь вернуть платеж. Сделать возврат через ЮKassa нельзя. Договоритесь с пользователем напрямую, каким способом вы вернете ему деньги. ```php YOO_MONEY_ACCOUNT_CLOSED = 'yoo_money_account_closed' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md000064400000024670150364342670025567 0ustar00# [YooKassa API SDK](../home.md) # Interface: CreateCaptureRequestInterface ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Interface CreateCaptureRequestInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAmount()](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md#method_getAmount) | | Возвращает подтверждаемую сумму оплаты. | | public | [getDeal()](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md#method_getDeal) | | Возвращает данные о сделке. | | public | [getReceipt()](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md#method_getReceipt) | | Возвращает чек, если он есть. | | public | [getTransfers()](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md#method_getTransfers) | | Возвращает данные о распределении денег. | | public | [hasAmount()](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md#method_hasAmount) | | Проверяет, была ли установлена сумма оплаты. | | public | [hasDeal()](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md#method_hasDeal) | | Проверяет наличие данных о сделке. | | public | [hasReceipt()](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md#method_hasReceipt) | | Проверяет наличие чека в создаваемом платеже. | | public | [hasTransfers()](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md#method_hasTransfers) | | Проверяет наличие данных о распределении денег. | | public | [setAmount()](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md#method_setAmount) | | Устанавливает сумму оплаты. | | public | [setDeal()](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md#method_setDeal) | | Устанавливает данные о сделке. | | public | [setReceipt()](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md#method_setReceipt) | | Устанавливает чек. | | public | [setTransfers()](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md#method_setTransfers) | | Устанавливает transfers (массив распределения денег между магазинами). | --- ### Details * File: [lib/Request/Payments/CreateCaptureRequestInterface.php](../../lib/Request/Payments/CreateCaptureRequestInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Подтверждаемая сумма оплаты | | property | | Данные фискального чека 54-ФЗ | | property | | Данные о сделке, в составе которой проходит платеж | --- ## Methods #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает подтверждаемую сумму оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestInterface](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Подтверждаемая сумма оплаты #### public hasAmount() : bool ```php public hasAmount() : bool ``` **Summary** Проверяет, была ли установлена сумма оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestInterface](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md) **Returns:** bool - True если сумма оплаты была установлена, false если нет #### public setAmount() : mixed ```php public setAmount(\YooKassa\Model\AmountInterface|array|string $amount) : mixed ``` **Summary** Устанавливает сумму оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestInterface](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR string | amount | Сумма оплаты | **Returns:** mixed - #### public getReceipt() : null|\YooKassa\Model\Receipt\ReceiptInterface ```php public getReceipt() : null|\YooKassa\Model\Receipt\ReceiptInterface ``` **Summary** Возвращает чек, если он есть. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestInterface](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md) **Returns:** null|\YooKassa\Model\Receipt\ReceiptInterface - Данные фискального чека 54-ФЗ или null, если чека нет #### public hasReceipt() : bool ```php public hasReceipt() : bool ``` **Summary** Проверяет наличие чека в создаваемом платеже. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestInterface](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md) **Returns:** bool - True если чек есть, false если нет #### public setReceipt() : \YooKassa\Common\AbstractRequestInterface ```php public setReceipt(null|\YooKassa\Model\Receipt\ReceiptInterface $value) : \YooKassa\Common\AbstractRequestInterface ``` **Summary** Устанавливает чек. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestInterface](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \YooKassa\Model\Receipt\ReceiptInterface | value | Инстанс чека или null для удаления информации о чеке | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если передан не инстанс класса чека и не null | **Returns:** \YooKassa\Common\AbstractRequestInterface - #### public hasTransfers() : bool ```php public hasTransfers() : bool ``` **Summary** Проверяет наличие данных о распределении денег. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestInterface](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md) **Returns:** bool - #### public getTransfers() : \YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface|null ```php public getTransfers() : \YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface|null ``` **Summary** Возвращает данные о распределении денег. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestInterface](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md) **Returns:** \YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface|null - #### public setTransfers() : self ```php public setTransfers(null|array|\YooKassa\Request\Payments\TransferDataInterface[] $transfers = null) : self ``` **Summary** Устанавливает transfers (массив распределения денег между магазинами). **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestInterface](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Payments\TransferDataInterface[] | transfers | | **Returns:** self - #### public hasDeal() : bool ```php public hasDeal() : bool ``` **Summary** Проверяет наличие данных о сделке. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestInterface](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md) **Returns:** bool - #### public getDeal() : ?\YooKassa\Model\Deal\CaptureDealData ```php public getDeal() : ?\YooKassa\Model\Deal\CaptureDealData ``` **Summary** Возвращает данные о сделке. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestInterface](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md) **Returns:** ?\YooKassa\Model\Deal\CaptureDealData - #### public setDeal() : \YooKassa\Common\AbstractRequestInterface ```php public setDeal(null|array|\YooKassa\Model\Deal\CaptureDealData $deal) : \YooKassa\Common\AbstractRequestInterface ``` **Summary** Устанавливает данные о сделке. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestInterface](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\CaptureDealData | deal | | **Returns:** \YooKassa\Common\AbstractRequestInterface - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyValueTypeException.md000064400000005607150364342670026637 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-InvalidPropertyValueTypeException.md#method___construct) | | InvalidPropertyValueTypeException constructor. | | public | [getProperty()](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md#method_getProperty) | | | | public | [getType()](../classes/YooKassa-Common-Exceptions-InvalidPropertyValueTypeException.md#method_getType) | | | --- ### Details * File: [lib/Common/Exceptions/InvalidPropertyValueTypeException.php](../../lib/Common/Exceptions/InvalidPropertyValueTypeException.php) * Package: Default * Class Hierarchy: * [\InvalidArgumentException](\InvalidArgumentException) * [\YooKassa\Common\Exceptions\InvalidPropertyException](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md) * \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException --- ## Methods #### public __construct() : mixed ```php public __construct(string $message = '', int $code, string $property = '', mixed|null $value = null) : mixed ``` **Summary** InvalidPropertyValueTypeException constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException](../classes/YooKassa-Common-Exceptions-InvalidPropertyValueTypeException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | message | | | int | code | | | string | property | | | mixed OR null | value | | **Returns:** mixed - #### public getProperty() : string ```php public getProperty() : string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\InvalidPropertyException](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md) **Returns:** string - #### public getType() : string ```php public getType() : string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException](../classes/YooKassa-Common-Exceptions-InvalidPropertyValueTypeException.md) **Returns:** string - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md000064400000044546150364342670023746 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Refunds\RefundsRequestBuilder ### Namespace: [\YooKassa\Request\Refunds](../namespaces/yookassa-request-refunds.md) --- **Summary:** Класс, представляющий модель RefundsRequestBuilder. **Description:** Класс билдера объектов запросов к API списка возвратов. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$currentObject](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md#property_currentObject) | | Инстанс собираемого запроса. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. | | public | [build()](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md#method_build) | | Собирает и возвращает объект запроса списка возвратов магазина. | | public | [setCreatedAtGt()](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md#method_setCreatedAtGt) | | Устанавливает дату создания от которой выбираются возвраты. | | public | [setCreatedAtGte()](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md#method_setCreatedAtGte) | | Устанавливает дату создания от которой выбираются возвраты. | | public | [setCreatedAtLt()](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md#method_setCreatedAtLt) | | Устанавливает дату создания до которой выбираются возвраты. | | public | [setCreatedAtLte()](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md#method_setCreatedAtLte) | | Устанавливает дату создания до которой выбираются возвраты. | | public | [setCursor()](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md#method_setCursor) | | Устанавливает токен следующей страницы выборки. | | public | [setLimit()](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md#method_setLimit) | | Устанавливает ограничение количества объектов возвратов. | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива. | | public | [setPaymentId()](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md#method_setPaymentId) | | Устанавливает идентификатор платежа или null, если требуется его удалить. | | public | [setStatus()](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md#method_setStatus) | | Устанавливает статус выбираемых возвратов. | | protected | [initCurrentObject()](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md#method_initCurrentObject) | | Инициализирует новый инстанс собираемого объекта. | --- ### Details * File: [lib/Request/Refunds/RefundsRequestBuilder.php](../../lib/Request/Refunds/RefundsRequestBuilder.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) * \YooKassa\Request\Refunds\RefundsRequestBuilder * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### protected $currentObject : ?\YooKassa\Common\AbstractRequestInterface --- **Summary** Инстанс собираемого запроса. **Type:** AbstractRequestInterface Инстанс собираемого объекта запроса **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public build() : \YooKassa\Request\Refunds\RefundsRequest ```php public build(null|array $options = null) : \YooKassa\Request\Refunds\RefundsRequest ``` **Summary** Собирает и возвращает объект запроса списка возвратов магазина. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestBuilder](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array | options | Массив с настройками запроса | **Returns:** \YooKassa\Request\Refunds\RefundsRequest - Инстанс объекта запроса к API для получения списка возвратов магазина #### public setCreatedAtGt() : \YooKassa\Request\Refunds\RefundsRequestBuilder ```php public setCreatedAtGt(null|\DateTime|int|string $value) : \YooKassa\Request\Refunds\RefundsRequestBuilder ``` **Summary** Устанавливает дату создания от которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestBuilder](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, от (не включая) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Refunds\RefundsRequestBuilder - Инстанс текущего объекта билдера #### public setCreatedAtGte() : \YooKassa\Request\Refunds\RefundsRequestBuilder ```php public setCreatedAtGte(null|\DateTime|int|string $value) : \YooKassa\Request\Refunds\RefundsRequestBuilder ``` **Summary** Устанавливает дату создания от которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestBuilder](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, от (включительно) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Refunds\RefundsRequestBuilder - Инстанс текущего объекта билдера #### public setCreatedAtLt() : \YooKassa\Request\Refunds\RefundsRequestBuilder ```php public setCreatedAtLt(null|\DateTime|int|string $value) : \YooKassa\Request\Refunds\RefundsRequestBuilder ``` **Summary** Устанавливает дату создания до которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestBuilder](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, до (не включая) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Refunds\RefundsRequestBuilder - Инстанс текущего объекта билдера #### public setCreatedAtLte() : \YooKassa\Request\Refunds\RefundsRequestBuilder ```php public setCreatedAtLte(null|\DateTime|int|string $value) : \YooKassa\Request\Refunds\RefundsRequestBuilder ``` **Summary** Устанавливает дату создания до которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestBuilder](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, до (включительно) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Refunds\RefundsRequestBuilder - Инстанс текущего объекта билдера #### public setCursor() : \YooKassa\Request\Refunds\RefundsRequestBuilder ```php public setCursor(string|null $value) : \YooKassa\Request\Refunds\RefundsRequestBuilder ``` **Summary** Устанавливает токен следующей страницы выборки. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestBuilder](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Токен следующей страницы выборки или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод была передана не строка | **Returns:** \YooKassa\Request\Refunds\RefundsRequestBuilder - Инстанс текущего объекта билдера #### public setLimit() : \YooKassa\Request\Refunds\RefundsRequestBuilder ```php public setLimit(null|int $value) : \YooKassa\Request\Refunds\RefundsRequestBuilder ``` **Summary** Устанавливает ограничение количества объектов возвратов. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestBuilder](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR int | value | Ограничение количества объектов возвратов или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод было передана не целое число | **Returns:** \YooKassa\Request\Refunds\RefundsRequestBuilder - Инстанс текущего билдера #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(iterable|null $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable OR null | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### public setPaymentId() : \YooKassa\Request\Refunds\RefundsRequestBuilder ```php public setPaymentId(null|string $value) : \YooKassa\Request\Refunds\RefundsRequestBuilder ``` **Summary** Устанавливает идентификатор платежа или null, если требуется его удалить. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestBuilder](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | value | Идентификатор платежа | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если длина переданной строки не равна 36 символам | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод была передана не строка | **Returns:** \YooKassa\Request\Refunds\RefundsRequestBuilder - Инстанс текущего объекта билдера #### public setStatus() : \YooKassa\Request\Refunds\RefundsRequestBuilder ```php public setStatus(string $value) : \YooKassa\Request\Refunds\RefundsRequestBuilder ``` **Summary** Устанавливает статус выбираемых возвратов. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestBuilder](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Статус выбираемых платежей или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если переданное значение не является валидным статусом | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод была передана не строка | **Returns:** \YooKassa\Request\Refunds\RefundsRequestBuilder - Инстанс текущего объекта билдера #### protected initCurrentObject() : \YooKassa\Request\Refunds\RefundsRequestInterface ```php protected initCurrentObject() : \YooKassa\Request\Refunds\RefundsRequestInterface ``` **Summary** Инициализирует новый инстанс собираемого объекта. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestBuilder](../classes/YooKassa-Request-Refunds-RefundsRequestBuilder.md) **Returns:** \YooKassa\Request\Refunds\RefundsRequestInterface - Инстанс собираемого запроса --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md000064400000040313150364342670025366 0ustar00# [YooKassa API SDK](../home.md) # Interface: ReceiptResponseItemInterface ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Interface ReceiptResponseItemInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAmount()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getAmount) | | Возвращает общую стоимость покупаемого товара в копейках/центах. | | public | [getCountryOfOriginCode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getCountryOfOriginCode) | | Возвращает код страны происхождения товара по общероссийскому классификатору стран мира. | | public | [getCustomsDeclarationNumber()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getCustomsDeclarationNumber) | | Возвращает номер таможенной декларации. | | public | [getDescription()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getDescription) | | Возвращает название товара. | | public | [getExcise()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getExcise) | | Возвращает сумму акциза товара с учетом копеек. | | public | [getMarkCodeInfo()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getMarkCodeInfo) | | Возвращает код товара. | | public | [getMarkMode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getMarkMode) | | Возвращает режим обработки кода маркировки. | | public | [getMarkQuantity()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getMarkQuantity) | | Возвращает дробное количество маркированного товара. | | public | [getMeasure()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getMeasure) | | Возвращает меру количества предмета расчета. | | public | [getPaymentMode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getPaymentMode) | | Возвращает признак способа расчета. | | public | [getPaymentSubject()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getPaymentSubject) | | Возвращает признак предмета расчета. | | public | [getPaymentSubjectIndustryDetails()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getPaymentSubjectIndustryDetails) | | Возвращает отраслевой реквизит чека. | | public | [getPrice()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getPrice) | | Возвращает цену товара. | | public | [getProductCode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getProductCode) | | Возвращает код товара — уникальный номер, который присваивается экземпляру товара при маркировке. | | public | [getQuantity()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getQuantity) | | Возвращает количество товара. | | public | [getSupplier()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getSupplier) | | Возвращает информацию о поставщике товара или услуги. | | public | [getVatCode()](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md#method_getVatCode) | | Возвращает ставку НДС | --- ### Details * File: [lib/Request/Receipts/ReceiptResponseItemInterface.php](../../lib/Request/Receipts/ReceiptResponseItemInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Наименование товара (тег в 54 ФЗ — 1030) | | property | | Количество (тег в 54 ФЗ — 1023) | | property | | Суммарная стоимость покупаемого товара в копейках/центах | | property | | Цена товара (тег в 54 ФЗ — 1079) | | property | | Ставка НДС, число 1-6 (тег в 54 ФЗ — 1199) | | property | | Ставка НДС, число 1-6 (тег в 54 ФЗ — 1199) | | property | | Признак предмета расчета (тег в 54 ФЗ — 1212) | | property | | Признак предмета расчета (тег в 54 ФЗ — 1212) | | property | | Признак способа расчета (тег в 54 ФЗ — 1214) | | property | | Признак способа расчета (тег в 54 ФЗ — 1214) | | property | | Код страны происхождения товара (тег в 54 ФЗ — 1230) | | property | | Код страны происхождения товара (тег в 54 ФЗ — 1230) | | property | | Номер таможенной декларации (от 1 до 32 символов). Тег в 54 ФЗ — 1231 | | property | | Номер таможенной декларации (от 1 до 32 символов). Тег в 54 ФЗ — 1231 | | property | | Сумма акциза товара с учетом копеек (тег в 54 ФЗ — 1229) | | property | | Информация о поставщике товара или услуги (тег в 54 ФЗ — 1224) | | property | | Тип посредника, реализующего товар или услугу | | property | | Тип посредника, реализующего товар или услугу | | property | | Код товара (тег в 54 ФЗ — 1163) | | property | | Код товара (тег в 54 ФЗ — 1163) | | property | | Мера количества предмета расчета (тег в 54 ФЗ — 2108) | | property | | Код товара — уникальный номер, который присваивается экземпляру товара при маркировке (тег в 54 ФЗ — 1162) | | property | | Код товара — уникальный номер, который присваивается экземпляру товара при маркировке (тег в 54 ФЗ — 1162) | | property | | Режим обработки кода маркировки (тег в 54 ФЗ — 2102) | | property | | Режим обработки кода маркировки (тег в 54 ФЗ — 2102) | | property | | Дробное количество маркированного товара (тег в 54 ФЗ — 1291) | | property | | Дробное количество маркированного товара (тег в 54 ФЗ — 1291) | --- ## Methods #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает название товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** string|null - Название товара (не более 128 символов) #### public getQuantity() : float ```php public getQuantity() : float ``` **Summary** Возвращает количество товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** float - Количество купленного товара #### public getAmount() : int|null ```php public getAmount() : int|null ``` **Summary** Возвращает общую стоимость покупаемого товара в копейках/центах. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** int|null - Сумма стоимости покупаемого товара #### public getPrice() : \YooKassa\Model\AmountInterface|null ```php public getPrice() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает цену товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Цена товара #### public getVatCode() : null|int ```php public getVatCode() : null|int ``` **Summary** Возвращает ставку НДС **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** null|int - Ставка НДС, число 1-6, или null, если ставка не задана #### public getPaymentSubject() : null|string ```php public getPaymentSubject() : null|string ``` **Summary** Возвращает признак предмета расчета. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** null|string - Признак предмета расчета #### public getPaymentMode() : null|string ```php public getPaymentMode() : null|string ``` **Summary** Возвращает признак способа расчета. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** null|string - Признак способа расчета #### public getProductCode() : null|string ```php public getProductCode() : null|string ``` **Summary** Возвращает код товара — уникальный номер, который присваивается экземпляру товара при маркировке. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** null|string - Код товара #### public getMarkCodeInfo() : \YooKassa\Model\Receipt\MarkCodeInfo|null ```php public getMarkCodeInfo() : \YooKassa\Model\Receipt\MarkCodeInfo|null ``` **Summary** Возвращает код товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** \YooKassa\Model\Receipt\MarkCodeInfo|null - Код товара #### public getMeasure() : string|null ```php public getMeasure() : string|null ``` **Summary** Возвращает меру количества предмета расчета. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** string|null - Мера количества предмета расчета #### public getMarkMode() : string|null ```php public getMarkMode() : string|null ``` **Summary** Возвращает режим обработки кода маркировки. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** string|null - Режим обработки кода маркировки #### public getMarkQuantity() : \YooKassa\Model\Receipt\MarkQuantity|null ```php public getMarkQuantity() : \YooKassa\Model\Receipt\MarkQuantity|null ``` **Summary** Возвращает дробное количество маркированного товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** \YooKassa\Model\Receipt\MarkQuantity|null - Дробное количество маркированного товара #### public getPaymentSubjectIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ```php public getPaymentSubjectIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface - Отраслевой реквизит чека #### public getCountryOfOriginCode() : null|string ```php public getCountryOfOriginCode() : null|string ``` **Summary** Возвращает код страны происхождения товара по общероссийскому классификатору стран мира. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** null|string - Код страны происхождения товара #### public getCustomsDeclarationNumber() : null|string ```php public getCustomsDeclarationNumber() : null|string ``` **Summary** Возвращает номер таможенной декларации. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** null|string - Номер таможенной декларации (от 1 до 32 символов) #### public getExcise() : null|float ```php public getExcise() : null|float ``` **Summary** Возвращает сумму акциза товара с учетом копеек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** null|float - Сумма акциза товара с учетом копеек #### public getSupplier() : \YooKassa\Model\Receipt\SupplierInterface|null ```php public getSupplier() : \YooKassa\Model\Receipt\SupplierInterface|null ``` **Summary** Возвращает информацию о поставщике товара или услуги. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseItemInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseItemInterface.md) **Returns:** \YooKassa\Model\Receipt\SupplierInterface|null - Информация о поставщике товара или услуги --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Refund-Source.md000064400000051444150364342670020140 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Refund\Source ### Namespace: [\YooKassa\Model\Refund](../namespaces/yookassa-model-refund.md) --- **Summary:** Класс, представляющий модель RefundSourcesData. **Description:** Данные о том, с какого магазина и какую сумму нужно удержать для проведения возврата. Сейчас в этом параметре можно передать данные только одного магазина. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$account_id](../classes/YooKassa-Model-Refund-Source.md#property_account_id) | | Идентификатор магазина, для которого вы хотите провести возврат | | public | [$accountId](../classes/YooKassa-Model-Refund-Source.md#property_accountId) | | Идентификатор магазина, для которого вы хотите провести возврат | | public | [$amount](../classes/YooKassa-Model-Refund-Source.md#property_amount) | | Сумма возврата | | public | [$platform_fee_amount](../classes/YooKassa-Model-Refund-Source.md#property_platform_fee_amount) | | Комиссия, которую вы удержали при оплате, и хотите вернуть | | public | [$platformFeeAmount](../classes/YooKassa-Model-Refund-Source.md#property_platformFeeAmount) | | Комиссия, которую вы удержали при оплате, и хотите вернуть | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAccountId()](../classes/YooKassa-Model-Refund-Source.md#method_getAccountId) | | Возвращает id магазина с которого будут списаны средства. | | public | [getAmount()](../classes/YooKassa-Model-Refund-Source.md#method_getAmount) | | Возвращает сумму оплаты. | | public | [getPlatformFeeAmount()](../classes/YooKassa-Model-Refund-Source.md#method_getPlatformFeeAmount) | | Возвращает комиссию за проданные товары и услуги, которая удерживается с магазина в вашу пользу. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasAmount()](../classes/YooKassa-Model-Refund-Source.md#method_hasAmount) | | Проверяет, была ли установлена сумма оплаты. | | public | [hasPlatformFeeAmount()](../classes/YooKassa-Model-Refund-Source.md#method_hasPlatformFeeAmount) | | Проверяет, была ли установлена комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAccountId()](../classes/YooKassa-Model-Refund-Source.md#method_setAccountId) | | Устанавливает id магазина-получателя средств. | | public | [setAmount()](../classes/YooKassa-Model-Refund-Source.md#method_setAmount) | | Устанавливает сумму оплаты. | | public | [setPlatformFeeAmount()](../classes/YooKassa-Model-Refund-Source.md#method_setPlatformFeeAmount) | | Устанавливает комиссию за проданные товары и услуги, которая удерживается с магазина в вашу пользу. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Refund/Source.php](../../lib/Model/Refund/Source.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Refund\Source * Implements: * [\YooKassa\Model\Refund\SourceInterface](../classes/YooKassa-Model-Refund-SourceInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $account_id : string --- ***Description*** Идентификатор магазина, для которого вы хотите провести возврат **Type:** string **Details:** #### public $accountId : string --- ***Description*** Идентификатор магазина, для которого вы хотите провести возврат **Type:** string **Details:** #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возврата **Type:** AmountInterface **Details:** #### public $platform_fee_amount : \YooKassa\Model\AmountInterface --- ***Description*** Комиссия, которую вы удержали при оплате, и хотите вернуть **Type:** AmountInterface **Details:** #### public $platformFeeAmount : \YooKassa\Model\AmountInterface --- ***Description*** Комиссия, которую вы удержали при оплате, и хотите вернуть **Type:** AmountInterface **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAccountId() : string|null ```php public getAccountId() : string|null ``` **Summary** Возвращает id магазина с которого будут списаны средства. **Details:** * Inherited From: [\YooKassa\Model\Refund\Source](../classes/YooKassa-Model-Refund-Source.md) **Returns:** string|null - Id магазина с которого будут списаны средства #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму оплаты. **Details:** * Inherited From: [\YooKassa\Model\Refund\Source](../classes/YooKassa-Model-Refund-Source.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма оплаты #### public getPlatformFeeAmount() : \YooKassa\Model\AmountInterface|null ```php public getPlatformFeeAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает комиссию за проданные товары и услуги, которая удерживается с магазина в вашу пользу. **Details:** * Inherited From: [\YooKassa\Model\Refund\Source](../classes/YooKassa-Model-Refund-Source.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма комиссии #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasAmount() : bool ```php public hasAmount() : bool ``` **Summary** Проверяет, была ли установлена сумма оплаты. **Details:** * Inherited From: [\YooKassa\Model\Refund\Source](../classes/YooKassa-Model-Refund-Source.md) **Returns:** bool - True если сумма оплаты была установлена, false если нет #### public hasPlatformFeeAmount() : bool ```php public hasPlatformFeeAmount() : bool ``` **Summary** Проверяет, была ли установлена комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу. **Details:** * Inherited From: [\YooKassa\Model\Refund\Source](../classes/YooKassa-Model-Refund-Source.md) **Returns:** bool - True если комиссия была установлена, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAccountId() : self ```php public setAccountId(string|null $account_id = null) : self ``` **Summary** Устанавливает id магазина-получателя средств. **Details:** * Inherited From: [\YooKassa\Model\Refund\Source](../classes/YooKassa-Model-Refund-Source.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | account_id | Id магазина с которого будут списаны средства | **Returns:** self - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму оплаты. **Details:** * Inherited From: [\YooKassa\Model\Refund\Source](../classes/YooKassa-Model-Refund-Source.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма оплаты | **Returns:** self - #### public setPlatformFeeAmount() : self ```php public setPlatformFeeAmount(\YooKassa\Model\AmountInterface|array|null $platform_fee_amount = null) : self ``` **Summary** Устанавливает комиссию за проданные товары и услуги, которая удерживается с магазина в вашу пользу. **Details:** * Inherited From: [\YooKassa\Model\Refund\Source](../classes/YooKassa-Model-Refund-Source.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | platform_fee_amount | Сумма комиссии | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md000064400000032102150364342670025202 0ustar00# [YooKassa API SDK](../home.md) # Interface: CreateRefundRequestInterface ### Namespace: [\YooKassa\Request\Refunds](../namespaces/yookassa-request-refunds.md) --- **Summary:** Interface CreateRefundRequestInterface --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAmount()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_getAmount) | | Возвращает сумму возвращаемых средств. | | public | [getDeal()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_getDeal) | | Возвращает информацию о сделке. | | public | [getDescription()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_getDescription) | | Возвращает комментарий к возврату или null, если комментарий не задан | | public | [getPaymentId()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_getPaymentId) | | Возвращает айди платежа для которого создаётся возврат средств. | | public | [getReceipt()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_getReceipt) | | Возвращает инстанс чека или null, если чек не задан. | | public | [getSources()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_getSources) | | Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. | | public | [hasDeal()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_hasDeal) | | Проверяет наличие информации о сделке. | | public | [hasDescription()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_hasDescription) | | Проверяет задан ли комментарий к создаваемому возврату. | | public | [hasPaymentId()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_hasPaymentId) | | Проверяет, был ли установлена идентификатор платежа. | | public | [hasReceipt()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_hasReceipt) | | Проверяет задан ли чек. | | public | [hasSources()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_hasSources) | | Проверяет наличие информации о распределении денег. | | public | [setDeal()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_setDeal) | | Устанавливает информацию о сделке. | | public | [setDescription()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_setDescription) | | Устанавливает комментарий к возврату. | | public | [setReceipt()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_setReceipt) | | Устанавливает чек. | | public | [setSources()](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md#method_setSources) | | Устанавливает информацию о распределении денег — сколько и в какой магазин нужно перевести. | --- ### Details * File: [lib/Request/Refunds/CreateRefundRequestInterface.php](../../lib/Request/Refunds/CreateRefundRequestInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Айди платежа для которого создаётся возврат | | property | | Сумма возврата | | property | | Комментарий к операции возврата, основание для возврата средств покупателю. | | property | | Инстанс чека или null | | property | | Информация о распределении денег — сколько и в какой магазин нужно перевести | | property | | Информация о сделке | --- ## Methods #### public getPaymentId() : string|null ```php public getPaymentId() : string|null ``` **Summary** Возвращает айди платежа для которого создаётся возврат средств. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) **Returns:** string|null - Айди платежа для которого создаётся возврат #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму возвращаемых средств. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма возврата #### public hasPaymentId() : bool ```php public hasPaymentId() : bool ``` **Summary** Проверяет, был ли установлена идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) **Returns:** bool - True если идентификатор платежа был установлен, false если нет #### public setDescription() : mixed ```php public setDescription(string|null $description) : mixed ``` **Summary** Устанавливает комментарий к возврату. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Комментарий к операции возврата, основание для возврата средств покупателю | **Returns:** mixed - #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает комментарий к возврату или null, если комментарий не задан **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) **Returns:** string|null - Комментарий к операции возврата, основание для возврата средств покупателю. #### public hasDescription() : bool ```php public hasDescription() : bool ``` **Summary** Проверяет задан ли комментарий к создаваемому возврату. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) **Returns:** bool - True если комментарий установлен, false если нет #### public setReceipt() : mixed ```php public setReceipt(null|\YooKassa\Model\Receipt\ReceiptInterface $receipt) : mixed ``` **Summary** Устанавливает чек. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \YooKassa\Model\Receipt\ReceiptInterface | receipt | Инстанс чека или null для удаления информации о чеке | **Returns:** mixed - #### public getReceipt() : null|\YooKassa\Model\Receipt\ReceiptInterface ```php public getReceipt() : null|\YooKassa\Model\Receipt\ReceiptInterface ``` **Summary** Возвращает инстанс чека или null, если чек не задан. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) **Returns:** null|\YooKassa\Model\Receipt\ReceiptInterface - Инстанс чека или null #### public hasReceipt() : bool ```php public hasReceipt() : bool ``` **Summary** Проверяет задан ли чек. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) **Returns:** bool - True если чек есть, false если нет #### public setSources() : mixed ```php public setSources(\YooKassa\Model\Refund\SourceInterface[]|array|null $sources) : mixed ``` **Summary** Устанавливает информацию о распределении денег — сколько и в какой магазин нужно перевести. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Refund\SourceInterface[] OR array OR null | sources | Информация о распределении денег | **Returns:** mixed - #### public getSources() : \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSources() : \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) **Returns:** \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface - Информация о распределении денег #### public hasSources() : bool ```php public hasSources() : bool ``` **Summary** Проверяет наличие информации о распределении денег. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) **Returns:** bool - #### public setDeal() : mixed ```php public setDeal(\YooKassa\Model\Deal\RefundDealData|null $deal) : mixed ``` **Summary** Устанавливает информацию о сделке. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Deal\RefundDealData OR null | deal | Информация о сделке | **Returns:** mixed - #### public getDeal() : \YooKassa\Model\Deal\RefundDealData|null ```php public getDeal() : \YooKassa\Model\Deal\RefundDealData|null ``` **Summary** Возвращает информацию о сделке. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) **Returns:** \YooKassa\Model\Deal\RefundDealData|null - Информация о сделке #### public hasDeal() : bool ```php public hasDeal() : bool ``` **Summary** Проверяет наличие информации о сделке. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) **Returns:** bool - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Refund-SourceInterface.md000064400000020212150364342670021746 0ustar00# [YooKassa API SDK](../home.md) # Interface: SourceInterface ### Namespace: [\YooKassa\Model\Refund](../namespaces/yookassa-model-refund.md) --- **Summary:** Interface SourceInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAccountId()](../classes/YooKassa-Model-Refund-SourceInterface.md#method_getAccountId) | | Возвращает id магазина с которого будут списаны средства. | | public | [getAmount()](../classes/YooKassa-Model-Refund-SourceInterface.md#method_getAmount) | | Возвращает сумму оплаты. | | public | [getPlatformFeeAmount()](../classes/YooKassa-Model-Refund-SourceInterface.md#method_getPlatformFeeAmount) | | Возвращает комиссию за проданные товары и услуги, которая удерживается с магазина в вашу пользу. | | public | [hasAmount()](../classes/YooKassa-Model-Refund-SourceInterface.md#method_hasAmount) | | Проверяет, была ли установлена сумма оплаты. | | public | [hasPlatformFeeAmount()](../classes/YooKassa-Model-Refund-SourceInterface.md#method_hasPlatformFeeAmount) | | Проверяет, была ли установлена комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу. | | public | [setAccountId()](../classes/YooKassa-Model-Refund-SourceInterface.md#method_setAccountId) | | Устанавливает id магазина-получателя средств. | | public | [setAmount()](../classes/YooKassa-Model-Refund-SourceInterface.md#method_setAmount) | | Устанавливает сумму оплаты. | | public | [setPlatformFeeAmount()](../classes/YooKassa-Model-Refund-SourceInterface.md#method_setPlatformFeeAmount) | | Устанавливает комиссию за проданные товары и услуги, которая удерживается с магазина в вашу пользу. | --- ### Details * File: [lib/Model/Refund/SourceInterface.php](../../lib/Model/Refund/SourceInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Сумма возврата | | property | | Комиссия, которую вы удержали при оплате, и хотите вернуть | | property | | Комиссия, которую вы удержали при оплате, и хотите вернуть | | property | | Идентификатор магазина, для которого вы хотите провести возврат | | property | | Идентификатор магазина, для которого вы хотите провести возврат | --- ## Methods #### public setAccountId() : \YooKassa\Model\Refund\SourceInterface ```php public setAccountId(string|null $account_id) : \YooKassa\Model\Refund\SourceInterface ``` **Summary** Устанавливает id магазина-получателя средств. **Details:** * Inherited From: [\YooKassa\Model\Refund\SourceInterface](../classes/YooKassa-Model-Refund-SourceInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | account_id | Id магазина с которого будут списаны средства | **Returns:** \YooKassa\Model\Refund\SourceInterface - #### public getAccountId() : string|null ```php public getAccountId() : string|null ``` **Summary** Возвращает id магазина с которого будут списаны средства. **Details:** * Inherited From: [\YooKassa\Model\Refund\SourceInterface](../classes/YooKassa-Model-Refund-SourceInterface.md) **Returns:** string|null - Id магазина с которого будут списаны средства #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму оплаты. **Details:** * Inherited From: [\YooKassa\Model\Refund\SourceInterface](../classes/YooKassa-Model-Refund-SourceInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма оплаты #### public hasAmount() : bool ```php public hasAmount() : bool ``` **Summary** Проверяет, была ли установлена сумма оплаты. **Details:** * Inherited From: [\YooKassa\Model\Refund\SourceInterface](../classes/YooKassa-Model-Refund-SourceInterface.md) **Returns:** bool - True если сумма оплаты была установлена, false если нет #### public setAmount() : \YooKassa\Model\Refund\SourceInterface ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : \YooKassa\Model\Refund\SourceInterface ``` **Summary** Устанавливает сумму оплаты. **Details:** * Inherited From: [\YooKassa\Model\Refund\SourceInterface](../classes/YooKassa-Model-Refund-SourceInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма оплаты | **Returns:** \YooKassa\Model\Refund\SourceInterface - #### public getPlatformFeeAmount() : \YooKassa\Model\AmountInterface|null ```php public getPlatformFeeAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает комиссию за проданные товары и услуги, которая удерживается с магазина в вашу пользу. **Details:** * Inherited From: [\YooKassa\Model\Refund\SourceInterface](../classes/YooKassa-Model-Refund-SourceInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма комиссии #### public hasPlatformFeeAmount() : bool ```php public hasPlatformFeeAmount() : bool ``` **Summary** Проверяет, была ли установлена комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу. **Details:** * Inherited From: [\YooKassa\Model\Refund\SourceInterface](../classes/YooKassa-Model-Refund-SourceInterface.md) **Returns:** bool - True если комиссия была установлена, false если нет #### public setPlatformFeeAmount() : \YooKassa\Model\Refund\SourceInterface ```php public setPlatformFeeAmount(\YooKassa\Model\AmountInterface|array|null $platform_fee_amount) : \YooKassa\Model\Refund\SourceInterface ``` **Summary** Устанавливает комиссию за проданные товары и услуги, которая удерживается с магазина в вашу пользу. **Details:** * Inherited From: [\YooKassa\Model\Refund\SourceInterface](../classes/YooKassa-Model-Refund-SourceInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | platform_fee_amount | Сумма комиссии | **Returns:** \YooKassa\Model\Refund\SourceInterface - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md000064400000205107150364342670024270 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Receipts\PaymentReceiptResponse ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Класс описывающий чек, привязанный к платежу. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [LENGTH_RECEIPT_ID](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#constant_LENGTH_RECEIPT_ID) | | Длина идентификатора чека | | public | [LENGTH_PAYMENT_ID](../classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md#constant_LENGTH_PAYMENT_ID) | | Длина идентификатора платежа | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$fiscal_attribute](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_attribute) | | Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. | | public | [$fiscal_document_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_document_number) | | Номер фискального документа. | | public | [$fiscal_provider_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_provider_id) | | Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. | | public | [$fiscal_storage_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_storage_number) | | Номер фискального накопителя в кассовом аппарате. | | public | [$fiscalAttribute](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalAttribute) | | Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. | | public | [$fiscalDocumentNumber](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalDocumentNumber) | | Номер фискального документа. | | public | [$fiscalProviderId](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalProviderId) | | Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. | | public | [$fiscalStorageNumber](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalStorageNumber) | | Номер фискального накопителя в кассовом аппарате. | | public | [$id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_id) | | Идентификатор чека в ЮKassa. | | public | [$items](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_items) | | Список товаров в заказе. | | public | [$object_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_object_id) | | Идентификатор объекта чека. | | public | [$objectId](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_objectId) | | Идентификатор объекта чека. | | public | [$on_behalf_of](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_on_behalf_of) | | Идентификатор магазина. | | public | [$onBehalfOf](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_onBehalfOf) | | Идентификатор магазина. | | public | [$payment_id](../classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md#property_payment_id) | | Идентификатор платежа в ЮKassa | | public | [$paymentId](../classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md#property_paymentId) | | Идентификатор платежа в ЮKassa | | public | [$receipt_industry_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receipt_industry_details) | | Отраслевой реквизит чека. | | public | [$receipt_operational_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receipt_operational_details) | | Операционный реквизит чека. | | public | [$receiptIndustryDetails](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receiptIndustryDetails) | | Отраслевой реквизит чека. | | public | [$receiptOperationalDetails](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receiptOperationalDetails) | | Операционный реквизит чека. | | public | [$registered_at](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_registered_at) | | Дата и время формирования чека в фискальном накопителе. | | public | [$registeredAt](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_registeredAt) | | Дата и время формирования чека в фискальном накопителе. | | public | [$settlements](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_settlements) | | Перечень совершенных расчетов. | | public | [$status](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_status) | | Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled"). | | public | [$tax_system_code](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_tax_system_code) | | Код системы налогообложения. Число 1-6. | | public | [$taxSystemCode](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_taxSystemCode) | | Код системы налогообложения. Число 1-6. | | public | [$type](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_type) | | Тип чека в онлайн-кассе: приход "payment" или возврат "refund". | | protected | [$_fiscal_attribute](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_attribute) | | | | protected | [$_fiscal_document_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_document_number) | | | | protected | [$_fiscal_provider_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_provider_id) | | | | protected | [$_fiscal_storage_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_storage_number) | | | | protected | [$_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__id) | | | | protected | [$_items](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__items) | | | | protected | [$_object_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__object_id) | | | | protected | [$_on_behalf_of](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__on_behalf_of) | | | | protected | [$_receipt_industry_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__receipt_industry_details) | | | | protected | [$_receipt_operational_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__receipt_operational_details) | | | | protected | [$_registered_at](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__registered_at) | | | | protected | [$_settlements](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__settlements) | | | | protected | [$_status](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__status) | | | | protected | [$_tax_system_code](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__tax_system_code) | | | | protected | [$_type](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [addItem()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_addItem) | | Добавляет товар в чек. | | public | [addSettlement()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_addSettlement) | | Добавляет оплату в массив. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getFiscalAttribute()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalAttribute) | | Возвращает фискальный признак чека. | | public | [getFiscalDocumentNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalDocumentNumber) | | Возвращает номер фискального документа. | | public | [getFiscalProviderId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalProviderId) | | Возвращает идентификатор чека в онлайн-кассе. | | public | [getFiscalStorageNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalStorageNumber) | | Возвращает номер фискального накопителя в кассовом аппарате. | | public | [getId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getId) | | Возвращает идентификатор чека в ЮKassa. | | public | [getItems()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getItems) | | Возвращает список товаров в заказ. | | public | [getObjectId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getObjectId) | | Возвращает идентификатор платежа или возврата, для которого был сформирован чек. | | public | [getOnBehalfOf()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getOnBehalfOf) | | Возвращает идентификатор магазин | | public | [getPaymentId()](../classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md#method_getPaymentId) | | Возвращает идентификатор платежа. | | public | [getReceiptIndustryDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getReceiptIndustryDetails) | | Возвращает отраслевой реквизит чека. | | public | [getReceiptOperationalDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getReceiptOperationalDetails) | | Возвращает операционный реквизит чека. | | public | [getRegisteredAt()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getRegisteredAt) | | Возвращает дату и время формирования чека в фискальном накопителе. | | public | [getSettlements()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getSettlements) | | Возвращает Массив оплат, обеспечивающих выдачу товара. | | public | [getStatus()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getStatus) | | Возвращает статус доставки данных для чека в онлайн-кассу. | | public | [getTaxSystemCode()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getTaxSystemCode) | | Возвращает код системы налогообложения. | | public | [getType()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getType) | | Возвращает тип чека в онлайн-кассе. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [notEmpty()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_notEmpty) | | Проверяет есть ли в чеке хотя бы одна позиция. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setFiscalAttribute()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalAttribute) | | Устанавливает фискальный признак чека. | | public | [setFiscalDocumentNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalDocumentNumber) | | Устанавливает номер фискального документа | | public | [setFiscalProviderId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalProviderId) | | Устанавливает идентификатор чека в онлайн-кассе. | | public | [setFiscalStorageNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalStorageNumber) | | Устанавливает номер фискального накопителя в кассовом аппарате. | | public | [setId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setId) | | Устанавливает идентификатор чека. | | public | [setItems()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setItems) | | Устанавливает список позиций в чеке. | | public | [setObjectId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setObjectId) | | Устанавливает идентификатор платежа или возврата, для которого был сформирован чек. | | public | [setOnBehalfOf()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setOnBehalfOf) | | Возвращает идентификатор магазина, от имени которого нужно отправить чек. | | public | [setPaymentId()](../classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md#method_setPaymentId) | | Устанавливает идентификатор платежа в ЮKassa. | | public | [setReceiptIndustryDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setReceiptIndustryDetails) | | Устанавливает отраслевой реквизит чека. | | public | [setReceiptOperationalDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setReceiptOperationalDetails) | | Устанавливает операционный реквизит чека. | | public | [setRegisteredAt()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setRegisteredAt) | | Устанавливает дату и время формирования чека в фискальном накопителе. | | public | [setSettlements()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setSettlements) | | Устанавливает массив оплат, обеспечивающих выдачу товара. | | public | [setSpecificProperties()](../classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md#method_setSpecificProperties) | | Установка свойств, присущих конкретному объекту. | | public | [setStatus()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setStatus) | | Устанавливает состояние регистрации фискального чека. | | public | [setTaxSystemCode()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setTaxSystemCode) | | Устанавливает код системы налогообложения. | | public | [setType()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setType) | | Устанавливает типа чека. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Receipts/PaymentReceiptResponse.php](../../lib/Request/Receipts/PaymentReceiptResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) * \YooKassa\Request\Receipts\PaymentReceiptResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### LENGTH_RECEIPT_ID Inherited from [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) Длина идентификатора чека ```php LENGTH_RECEIPT_ID = 39 ``` ###### LENGTH_PAYMENT_ID Длина идентификатора платежа ```php LENGTH_PAYMENT_ID = 36 ``` --- ## Properties #### public $fiscal_attribute : string --- ***Description*** Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscal_document_number : string --- ***Description*** Номер фискального документа. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscal_provider_id : string --- ***Description*** Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscal_storage_number : string --- ***Description*** Номер фискального накопителя в кассовом аппарате. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscalAttribute : string --- ***Description*** Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscalDocumentNumber : string --- ***Description*** Номер фискального документа. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscalProviderId : string --- ***Description*** Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscalStorageNumber : string --- ***Description*** Номер фискального накопителя в кассовом аппарате. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $id : string --- ***Description*** Идентификатор чека в ЮKassa. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $items : \YooKassa\Common\ListObjectInterface|\YooKassa\Request\Receipts\ReceiptResponseItemInterface[] --- ***Description*** Список товаров в заказе. **Type:** ReceiptResponseItemInterface[] **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $object_id : string --- ***Description*** Идентификатор объекта чека. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $objectId : string --- ***Description*** Идентификатор объекта чека. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $on_behalf_of : string --- ***Description*** Идентификатор магазина. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $onBehalfOf : string --- ***Description*** Идентификатор магазина. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $payment_id : string --- ***Description*** Идентификатор платежа в ЮKassa **Type:** string **Details:** #### public $paymentId : string --- ***Description*** Идентификатор платежа в ЮKassa **Type:** string **Details:** #### public $receipt_industry_details : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\IndustryDetails[] --- ***Description*** Отраслевой реквизит чека. **Type:** IndustryDetails[] **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $receipt_operational_details : \YooKassa\Model\Receipt\OperationalDetails --- ***Description*** Операционный реквизит чека. **Type:** OperationalDetails **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $receiptIndustryDetails : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\IndustryDetails[] --- ***Description*** Отраслевой реквизит чека. **Type:** IndustryDetails[] **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $receiptOperationalDetails : \YooKassa\Model\Receipt\OperationalDetails --- ***Description*** Операционный реквизит чека. **Type:** OperationalDetails **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $registered_at : \DateTime --- ***Description*** Дата и время формирования чека в фискальном накопителе. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $registeredAt : \DateTime --- ***Description*** Дата и время формирования чека в фискальном накопителе. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $settlements : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\SettlementInterface[] --- ***Description*** Перечень совершенных расчетов. **Type:** SettlementInterface[] **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $status : string --- ***Description*** Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled"). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $tax_system_code : int --- ***Description*** Код системы налогообложения. Число 1-6. **Type:** int **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $taxSystemCode : int --- ***Description*** Код системы налогообложения. Число 1-6. **Type:** int **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $type : string --- ***Description*** Тип чека в онлайн-кассе: приход "payment" или возврат "refund". **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_fiscal_attribute : ?string --- **Type:** ?string Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_fiscal_document_number : ?string --- **Type:** ?string Номер фискального документа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_fiscal_provider_id : ?string --- **Type:** ?string Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_fiscal_storage_number : ?string --- **Type:** ?string Номер фискального накопителя в кассовом аппарате. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_id : ?string --- **Type:** ?string Идентификатор чека в ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_items : ?\YooKassa\Common\ListObject --- **Type:** ListObject Список товаров в заказе **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_object_id : ?string --- **Type:** ?string Идентификатор объекта чека **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_on_behalf_of : ?string --- **Type:** ?string Идентификатор магазина **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_receipt_industry_details : ?\YooKassa\Common\ListObject --- **Type:** ListObject Отраслевой реквизит предмета расчета **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_receipt_operational_details : ?\YooKassa\Model\Receipt\OperationalDetails --- **Type:** OperationalDetails Операционный реквизит чека **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_registered_at : ?\DateTime --- **Type:** DateTime Дата и время формирования чека в фискальном накопителе. Указывается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_settlements : ?\YooKassa\Common\ListObject --- **Type:** ListObject Список оплат **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_status : ?string --- **Type:** ?string Статус доставки данных для чека в онлайн-кассу "pending", "succeeded" или "canceled". **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_tax_system_code : ?int --- **Type:** ?int Код системы налогообложения. Число 1-6. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_type : ?string --- **Type:** ?string Тип чека в онлайн-кассе: приход "payment" или возврат "refund". **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public addItem() : void ```php public addItem(\YooKassa\Request\Receipts\ReceiptResponseItemInterface $value) : void ``` **Summary** Добавляет товар в чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Receipts\ReceiptResponseItemInterface | value | Объект добавляемой в чек позиции | **Returns:** void - #### public addSettlement() : void ```php public addSettlement(\YooKassa\Model\Receipt\SettlementInterface $value) : void ``` **Summary** Добавляет оплату в массив. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\SettlementInterface | value | | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getFiscalAttribute() : string|null ```php public getFiscalAttribute() : string|null ``` **Summary** Возвращает фискальный признак чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Фискальный признак чека #### public getFiscalDocumentNumber() : string|null ```php public getFiscalDocumentNumber() : string|null ``` **Summary** Возвращает номер фискального документа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Номер фискального документа #### public getFiscalProviderId() : string|null ```php public getFiscalProviderId() : string|null ``` **Summary** Возвращает идентификатор чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Идентификатор чека в онлайн-кассе #### public getFiscalStorageNumber() : string|null ```php public getFiscalStorageNumber() : string|null ``` **Summary** Возвращает номер фискального накопителя в кассовом аппарате. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Номер фискального накопителя в кассовом аппарате #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор чека в ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Идентификатор чека в ЮKassa #### public getItems() : \YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|\YooKassa\Common\ListObjectInterface ```php public getItems() : \YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список товаров в заказ. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|\YooKassa\Common\ListObjectInterface - #### public getObjectId() : string|null ```php public getObjectId() : string|null ``` **Summary** Возвращает идентификатор платежа или возврата, для которого был сформирован чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - #### public getOnBehalfOf() : string|null ```php public getOnBehalfOf() : string|null ``` **Summary** Возвращает идентификатор магазин **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - #### public getPaymentId() : string|null ```php public getPaymentId() : string|null ``` **Summary** Возвращает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\PaymentReceiptResponse](../classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md) **Returns:** string|null - Идентификатор платежа #### public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ```php public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface - Отраслевой реквизит чека #### public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails|null ```php public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails|null ``` **Summary** Возвращает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Model\Receipt\OperationalDetails|null - Операционный реквизит чека #### public getRegisteredAt() : \DateTime|null ```php public getRegisteredAt() : \DateTime|null ``` **Summary** Возвращает дату и время формирования чека в фискальном накопителе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \DateTime|null - Дата и время формирования чека в фискальном накопителе #### public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает Массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface - #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус доставки данных для чека в онлайн-кассу. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled") #### public getTaxSystemCode() : int|null ```php public getTaxSystemCode() : int|null ``` **Summary** Возвращает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** int|null - Код системы налогообложения. Число 1-6. #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Тип чека в онлайн-кассе: приход "payment" или возврат "refund" #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public notEmpty() : bool ```php public notEmpty() : bool ``` **Summary** Проверяет есть ли в чеке хотя бы одна позиция. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** bool - True если чек не пуст, false если в чеке нет ни одной позиции #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setFiscalAttribute() : self ```php public setFiscalAttribute(string|null $fiscal_attribute = null) : self ``` **Summary** Устанавливает фискальный признак чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_attribute | Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. | **Returns:** self - #### public setFiscalDocumentNumber() : self ```php public setFiscalDocumentNumber(string|null $fiscal_document_number = null) : self ``` **Summary** Устанавливает номер фискального документа **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_document_number | Номер фискального документа. | **Returns:** self - #### public setFiscalProviderId() : self ```php public setFiscalProviderId(string|null $fiscal_provider_id = null) : self ``` **Summary** Устанавливает идентификатор чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_provider_id | Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. | **Returns:** self - #### public setFiscalStorageNumber() : self ```php public setFiscalStorageNumber(string|null $fiscal_storage_number = null) : self ``` **Summary** Устанавливает номер фискального накопителя в кассовом аппарате. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_storage_number | Номер фискального накопителя в кассовом аппарате. | **Returns:** self - #### public setId() : self ```php public setId(string $id) : self ``` **Summary** Устанавливает идентификатор чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | id | Идентификатор чека | **Returns:** self - #### public setItems() : self ```php public setItems(\YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|null $items) : self ``` **Summary** Устанавливает список позиций в чеке. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Receipts\ReceiptResponseItemInterface[] OR null | items | Список товаров в заказе | **Returns:** self - #### public setObjectId() : self ```php public setObjectId(string|null $object_id) : self ``` **Summary** Устанавливает идентификатор платежа или возврата, для которого был сформирован чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | object_id | | **Returns:** self - #### public setOnBehalfOf() : self ```php public setOnBehalfOf(string|null $on_behalf_of = null) : self ``` **Summary** Возвращает идентификатор магазина, от имени которого нужно отправить чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | on_behalf_of | Идентификатор магазина, от имени которого нужно отправить чек | **Returns:** self - #### public setPaymentId() : self ```php public setPaymentId(string|null $payment_id = null) : self ``` **Summary** Устанавливает идентификатор платежа в ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\Receipts\PaymentReceiptResponse](../classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_id | Идентификатор платежа в ЮKassa | **Returns:** self - #### public setReceiptIndustryDetails() : self ```php public setReceiptIndustryDetails(array|\YooKassa\Model\Receipt\IndustryDetails[]|null $receipt_industry_details = null) : self ``` **Summary** Устанавливает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\IndustryDetails[] OR null | receipt_industry_details | Отраслевой реквизит чека | **Returns:** self - #### public setReceiptOperationalDetails() : self ```php public setReceiptOperationalDetails(array|\YooKassa\Model\Receipt\OperationalDetails|null $receipt_operational_details = null) : self ``` **Summary** Устанавливает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\OperationalDetails OR null | receipt_operational_details | Операционный реквизит чека | **Returns:** self - #### public setRegisteredAt() : self ```php public setRegisteredAt(\DateTime|string|null $registered_at = null) : self ``` **Summary** Устанавливает дату и время формирования чека в фискальном накопителе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | registered_at | Дата и время формирования чека в фискальном накопителе. Указывается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). | **Returns:** self - #### public setSettlements() : self ```php public setSettlements(\YooKassa\Model\Receipt\SettlementInterface[]|null $settlements) : self ``` **Summary** Устанавливает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\SettlementInterface[] OR null | settlements | | **Returns:** self - #### public setSpecificProperties() : void ```php public setSpecificProperties(array $receiptData) : void ``` **Summary** Установка свойств, присущих конкретному объекту. **Details:** * Inherited From: [\YooKassa\Request\Receipts\PaymentReceiptResponse](../classes/YooKassa-Request-Receipts-PaymentReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | receiptData | | **Returns:** void - #### public setStatus() : self ```php public setStatus(string|null $status) : self ``` **Summary** Устанавливает состояние регистрации фискального чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Состояние регистрации фискального чека | **Returns:** self - #### public setTaxSystemCode() : self ```php public setTaxSystemCode(int|null $tax_system_code) : self ``` **Summary** Устанавливает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | tax_system_code | Код системы налогообложения. Число 1-6 | **Returns:** self - #### public setType() : self ```php public setType(string $type) : self ``` **Summary** Устанавливает типа чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | type | Тип чека | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md000064400000061563150364342670026405 0ustar00# [YooKassa API SDK](../home.md) # Interface: CreatePostReceiptRequestInterface ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Interface CreatePostReceiptRequestInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAdditionalUserProps()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_getAdditionalUserProps) | | Возвращает дополнительный реквизит пользователя. | | public | [getCustomer()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_getCustomer) | | Возвращает информацию о плательщике. | | public | [getItems()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_getItems) | | Возвращает список товаров в заказе. | | public | [getObjectId()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_getObjectId) | | Возвращает идентификатор объекта, для которого формируется чек. | | public | [getObjectType()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_getObjectType) | | Возвращает тип объекта чека. | | public | [getOnBehalfOf()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_getOnBehalfOf) | | Возвращает идентификатор магазина, от имени которого нужно отправить чек. | | public | [getReceiptIndustryDetails()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_getReceiptIndustryDetails) | | Возвращает отраслевой реквизит чека. | | public | [getReceiptOperationalDetails()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_getReceiptOperationalDetails) | | Возвращает операционный реквизит чека. | | public | [getSend()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_getSend) | | Возвращает признак отложенной отправки чека. | | public | [getSettlements()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_getSettlements) | | Возвращает Массив оплат, обеспечивающих выдачу товара. | | public | [getTaxSystemCode()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_getTaxSystemCode) | | Возвращает код системы налогообложения. | | public | [getType()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_getType) | | Возвращает тип чека в онлайн-кассе. | | public | [notEmpty()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_notEmpty) | | Проверяет есть ли в чеке хотя бы одна позиция. | | public | [setAdditionalUserProps()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_setAdditionalUserProps) | | Устанавливает дополнительный реквизит пользователя. | | public | [setCustomer()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_setCustomer) | | Устанавливает информацию о пользователе. | | public | [setItems()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_setItems) | | Устанавливает список товаров чека. | | public | [setObjectId()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_setObjectId) | | Устанавливает идентификатор объекта, для которого формируется чек. | | public | [setObjectType()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_setObjectType) | | Устанавливает тип объекта чека. | | public | [setOnBehalfOf()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_setOnBehalfOf) | | Устанавливает идентификатор магазина, от имени которого нужно отправить чек. | | public | [setReceiptIndustryDetails()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_setReceiptIndustryDetails) | | Устанавливает отраслевой реквизит чека. | | public | [setReceiptOperationalDetails()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_setReceiptOperationalDetails) | | Устанавливает операционный реквизит чека. | | public | [setSend()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_setSend) | | Устанавливает признак отложенной отправки чека. | | public | [setSettlements()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_setSettlements) | | Устанавливает массив оплат, обеспечивающих выдачу товара. | | public | [setTaxSystemCode()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_setTaxSystemCode) | | Устанавливает код системы налогообложения. | | public | [setType()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md#method_setType) | | Устанавливает тип чека в онлайн-кассе. | --- ### Details * File: [lib/Request/Receipts/CreatePostReceiptRequestInterface.php](../../lib/Request/Receipts/CreatePostReceiptRequestInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Идентификатор объекта ("payment" или "refund), для которого формируется чек | | property | | Идентификатор объекта ("payment" или "refund), для которого формируется чек | | property | | Тип чека в онлайн-кассе: приход "payment" или возврат "refund" | | property | | Признак отложенной отправки чека | | property | | Информация о плательщике | | property | | Код системы налогообложения. Число 1-6 | | property | | Код системы налогообложения. Число 1-6 | | property | | Дополнительный реквизит пользователя | | property | | Дополнительный реквизит пользователя | | property | | Отраслевой реквизит чека | | property | | Отраслевой реквизит чека | | property | | Операционный реквизит чека | | property | | Операционный реквизит чека | | property | | Список товаров в заказе | | property | | Массив оплат, обеспечивающих выдачу товара | --- ## Methods #### public getObjectId() : string|null ```php public getObjectId() : string|null ``` **Summary** Возвращает идентификатор объекта, для которого формируется чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) **Returns:** string|null - Идентификатор объекта #### public setObjectId() : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ```php public setObjectId(string|null $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ``` **Summary** Устанавливает идентификатор объекта, для которого формируется чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Идентификатор объекта | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) **Returns:** string|null - Тип чека в онлайн-кассе: приход "payment" или возврат "refund" #### public setType() : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ```php public setType(string $type) : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ``` **Summary** Устанавливает тип чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | type | Тип чека в онлайн-кассе: приход "payment" или возврат "refund" | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface - #### public getObjectType() : string|null ```php public getObjectType() : string|null ``` **Summary** Возвращает тип объекта чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) **Returns:** string|null - Тип объекта чека #### public setObjectType() : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ```php public setObjectType(string|null $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ``` **Summary** Устанавливает тип объекта чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Тип объекта чека | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface - #### public getSend() : bool ```php public getSend() : bool ``` **Summary** Возвращает признак отложенной отправки чека. **Description** @return bool Признак отложенной отправки чека **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) **Returns:** bool - #### public setSend() : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ```php public setSend(bool $send) : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ``` **Summary** Устанавливает признак отложенной отправки чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | send | Признак отложенной отправки чека | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface - #### public getTaxSystemCode() : int|null ```php public getTaxSystemCode() : int|null ``` **Summary** Возвращает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) **Returns:** int|null - Код системы налогообложения. Число 1-6 #### public setTaxSystemCode() : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ```php public setTaxSystemCode(int|null $tax_system_code) : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ``` **Summary** Устанавливает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | tax_system_code | Код системы налогообложения. Число 1-6 | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface - #### public getAdditionalUserProps() : \YooKassa\Model\Receipt\AdditionalUserProps|null ```php public getAdditionalUserProps() : \YooKassa\Model\Receipt\AdditionalUserProps|null ``` **Summary** Возвращает дополнительный реквизит пользователя. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) **Returns:** \YooKassa\Model\Receipt\AdditionalUserProps|null - Дополнительный реквизит пользователя #### public setAdditionalUserProps() : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ```php public setAdditionalUserProps(\YooKassa\Model\Receipt\AdditionalUserProps|array|null $additional_user_props) : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ``` **Summary** Устанавливает дополнительный реквизит пользователя. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\AdditionalUserProps OR array OR null | additional_user_props | Дополнительный реквизит пользователя | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface - #### public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ```php public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) **Returns:** \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface - Отраслевой реквизит чека #### public setReceiptIndustryDetails() : mixed ```php public setReceiptIndustryDetails(array|\YooKassa\Common\ListObjectInterface|null $receipt_industry_details) : mixed ``` **Summary** Устанавливает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Common\ListObjectInterface OR null | receipt_industry_details | Отраслевой реквизит чека | **Returns:** mixed - #### public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails|null ```php public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails|null ``` **Summary** Возвращает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) **Returns:** \YooKassa\Model\Receipt\OperationalDetails|null - Операционный реквизит чека #### public setReceiptOperationalDetails() : mixed ```php public setReceiptOperationalDetails(array|\YooKassa\Model\Receipt\OperationalDetails|null $receipt_operational_details) : mixed ``` **Summary** Устанавливает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\OperationalDetails OR null | receipt_operational_details | Операционный реквизит чека | **Returns:** mixed - #### public getCustomer() : \YooKassa\Model\Receipt\ReceiptCustomerInterface|null ```php public getCustomer() : \YooKassa\Model\Receipt\ReceiptCustomerInterface|null ``` **Summary** Возвращает информацию о плательщике. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) **Returns:** \YooKassa\Model\Receipt\ReceiptCustomerInterface|null - Информация о плательщике #### public setCustomer() : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ```php public setCustomer(\YooKassa\Model\Receipt\ReceiptCustomerInterface|array|null $customer) : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ``` **Summary** Устанавливает информацию о пользователе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\ReceiptCustomerInterface OR array OR null | customer | Информация о плательщике | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface - #### public getItems() : ?\YooKassa\Common\ListObjectInterface ```php public getItems() : ?\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список товаров в заказе. **Description** @return ReceiptItemInterface[]|ListObjectInterface|null **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) **Returns:** ?\YooKassa\Common\ListObjectInterface - #### public setItems() : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ```php public setItems(array|\YooKassa\Common\ListObjectInterface|null $items) : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ``` **Summary** Устанавливает список товаров чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Common\ListObjectInterface OR null | items | Список товаров чека | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface - #### public getSettlements() : ?\YooKassa\Common\ListObjectInterface ```php public getSettlements() : ?\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает Массив оплат, обеспечивающих выдачу товара. **Description** @return SettlementInterface[]|ListObjectInterface|null **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) **Returns:** ?\YooKassa\Common\ListObjectInterface - #### public setSettlements() : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ```php public setSettlements(array|\YooKassa\Common\ListObjectInterface|null $settlements) : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ``` **Summary** Устанавливает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Common\ListObjectInterface OR null | settlements | Массив оплат, обеспечивающих выдачу товара | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface - #### public getOnBehalfOf() : null|string ```php public getOnBehalfOf() : null|string ``` **Summary** Возвращает идентификатор магазина, от имени которого нужно отправить чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) **Returns:** null|string - Идентификатор магазина, от имени которого нужно отправить чек #### public setOnBehalfOf() : mixed ```php public setOnBehalfOf(string|null $on_behalf_of) : mixed ``` **Summary** Устанавливает идентификатор магазина, от имени которого нужно отправить чек. **Description** Выдается ЮKassa, отображается в разделе Продавцы личного кабинета (столбец shopId). Необходимо передавать, если вы используете решение ЮKassa для платформ. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | on_behalf_of | Идентификатор магазина, от имени которого нужно отправить чек | **Returns:** mixed - #### public notEmpty() : bool ```php public notEmpty() : bool ``` **Summary** Проверяет есть ли в чеке хотя бы одна позиция. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) **Returns:** bool - True если чек не пуст, false если в чеке нет ни одной позиции --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-SbpParticipantBank.md000064400000045411150364342670022452 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payout\SbpParticipantBank ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель SbpParticipantBank. **Description:** Участник СБП (Системы быстрых платежей ЦБ РФ) --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_BANK_ID](../classes/YooKassa-Model-Payout-SbpParticipantBank.md#constant_MAX_LENGTH_BANK_ID) | | | | public | [MAX_LENGTH_NAME](../classes/YooKassa-Model-Payout-SbpParticipantBank.md#constant_MAX_LENGTH_NAME) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$bank_id](../classes/YooKassa-Model-Payout-SbpParticipantBank.md#property_bank_id) | | Идентификатор банка или платежного сервиса в СБП. | | public | [$bankId](../classes/YooKassa-Model-Payout-SbpParticipantBank.md#property_bankId) | | Идентификатор банка или платежного сервиса в СБП. | | public | [$bic](../classes/YooKassa-Model-Payout-SbpParticipantBank.md#property_bic) | | Банковский идентификационный код (БИК) банка или платежного сервиса. | | public | [$name](../classes/YooKassa-Model-Payout-SbpParticipantBank.md#property_name) | | Название банка или платежного сервиса в СБП. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getBankId()](../classes/YooKassa-Model-Payout-SbpParticipantBank.md#method_getBankId) | | Возвращает идентификатор банка или платежного сервиса в СБП. | | public | [getBic()](../classes/YooKassa-Model-Payout-SbpParticipantBank.md#method_getBic) | | Возвращает банковский идентификационный код. | | public | [getName()](../classes/YooKassa-Model-Payout-SbpParticipantBank.md#method_getName) | | Возвращает название банка или платежного сервиса в СБП. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setBankId()](../classes/YooKassa-Model-Payout-SbpParticipantBank.md#method_setBankId) | | Устанавливает идентификатор банка или платежного сервиса в СБП. | | public | [setBic()](../classes/YooKassa-Model-Payout-SbpParticipantBank.md#method_setBic) | | Устанавливает банковский идентификационный код. | | public | [setName()](../classes/YooKassa-Model-Payout-SbpParticipantBank.md#method_setName) | | Устанавливает название банка или платежного сервиса в СБП. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payout/SbpParticipantBank.php](../../lib/Model/Payout/SbpParticipantBank.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payout\SbpParticipantBank * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_BANK_ID ```php MAX_LENGTH_BANK_ID = 12 : int ``` ###### MAX_LENGTH_NAME ```php MAX_LENGTH_NAME = 128 : int ``` --- ## Properties #### public $bank_id : string --- ***Description*** Идентификатор банка или платежного сервиса в СБП. **Type:** string **Details:** #### public $bankId : string --- ***Description*** Идентификатор банка или платежного сервиса в СБП. **Type:** string **Details:** #### public $bic : string --- ***Description*** Банковский идентификационный код (БИК) банка или платежного сервиса. **Type:** string **Details:** #### public $name : string --- ***Description*** Название банка или платежного сервиса в СБП. **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getBankId() : string|null ```php public getBankId() : string|null ``` **Summary** Возвращает идентификатор банка или платежного сервиса в СБП. **Details:** * Inherited From: [\YooKassa\Model\Payout\SbpParticipantBank](../classes/YooKassa-Model-Payout-SbpParticipantBank.md) **Returns:** string|null - Идентификатор банка или платежного сервиса в СБП #### public getBic() : string|null ```php public getBic() : string|null ``` **Summary** Возвращает банковский идентификационный код. **Details:** * Inherited From: [\YooKassa\Model\Payout\SbpParticipantBank](../classes/YooKassa-Model-Payout-SbpParticipantBank.md) **Returns:** string|null - Банковский идентификационный код (БИК) банка или платежного сервиса #### public getName() : string|null ```php public getName() : string|null ``` **Summary** Возвращает название банка или платежного сервиса в СБП. **Details:** * Inherited From: [\YooKassa\Model\Payout\SbpParticipantBank](../classes/YooKassa-Model-Payout-SbpParticipantBank.md) **Returns:** string|null - Название банка или платежного сервиса в СБП #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setBankId() : self ```php public setBankId(string|null $bank_id = null) : self ``` **Summary** Устанавливает идентификатор банка или платежного сервиса в СБП. **Details:** * Inherited From: [\YooKassa\Model\Payout\SbpParticipantBank](../classes/YooKassa-Model-Payout-SbpParticipantBank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | bank_id | Идентификатор банка или платежного сервиса в СБП | **Returns:** self - #### public setBic() : self ```php public setBic(string|null $bic = null) : self ``` **Summary** Устанавливает банковский идентификационный код. **Details:** * Inherited From: [\YooKassa\Model\Payout\SbpParticipantBank](../classes/YooKassa-Model-Payout-SbpParticipantBank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | bic | Банковский идентификационный код (БИК) банка или платежного сервиса | **Returns:** self - #### public setName() : self ```php public setName(string|null $name = null) : self ``` **Summary** Устанавливает название банка или платежного сервиса в СБП. **Details:** * Inherited From: [\YooKassa\Model\Payout\SbpParticipantBank](../classes/YooKassa-Model-Payout-SbpParticipantBank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | name | Название банка или платежного сервиса в СБП | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payouts-PayoutSelfEmployedInfo.md000064400000034561150364342670024120 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payouts\PayoutSelfEmployedInfo ### Namespace: [\YooKassa\Request\Payouts](../namespaces/yookassa-request-payouts.md) --- **Summary:** Класс, представляющий модель PayoutSelfEmployedInfo. **Description:** Данные самозанятого, который получит выплату. Необходимо передавать, если вы делаете выплату %[самозанятому](/developers/payouts/scenario-extensions/self-employed). Только для обычных выплат. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_ID](../classes/YooKassa-Request-Payouts-PayoutSelfEmployedInfo.md#constant_MAX_LENGTH_ID) | | | | public | [MIN_LENGTH_ID](../classes/YooKassa-Request-Payouts-PayoutSelfEmployedInfo.md#constant_MIN_LENGTH_ID) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Request-Payouts-PayoutSelfEmployedInfo.md#property_id) | | Идентификатор самозанятого в ЮKassa | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Request-Payouts-PayoutSelfEmployedInfo.md#method_getId) | | Возвращает идентификатор самозанятого. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Request-Payouts-PayoutSelfEmployedInfo.md#method_setId) | | Устанавливает идентификатор самозанятого. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payouts/PayoutSelfEmployedInfo.php](../../lib/Request/Payouts/PayoutSelfEmployedInfo.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\Payouts\PayoutSelfEmployedInfo * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_ID ```php MAX_LENGTH_ID = 50 : int ``` ###### MIN_LENGTH_ID ```php MIN_LENGTH_ID = 36 : int ``` --- ## Properties #### public $id : string --- ***Description*** Идентификатор самозанятого в ЮKassa **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор самозанятого. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutSelfEmployedInfo](../classes/YooKassa-Request-Payouts-PayoutSelfEmployedInfo.md) **Returns:** string|null - Идентификатор самозанятого #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор самозанятого. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutSelfEmployedInfo](../classes/YooKassa-Request-Payouts-PayoutSelfEmployedInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор самозанятого в ЮKassa. | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsReasonCode.md000064400000010573150364342670030114 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\PersonalData\PersonalDataCancellationDetailsReasonCode ### Namespace: [\YooKassa\Model\PersonalData](../namespaces/yookassa-model-personaldata.md) --- **Summary:** Класс, представляющий модель PersonalDataCancellationDetailsReasonCode. **Description:** Возможные причины аннулирования хранения данных. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [EXPIRED_BY_TIMEOUT](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsReasonCode.md#constant_EXPIRED_BY_TIMEOUT) | | Истек срок хранения или использования персональных данных. | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsReasonCode.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/PersonalData/PersonalDataCancellationDetailsReasonCode.php](../../lib/Model/PersonalData/PersonalDataCancellationDetailsReasonCode.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\PersonalData\PersonalDataCancellationDetailsReasonCode * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### EXPIRED_BY_TIMEOUT Истек срок хранения или использования персональных данных. ```php EXPIRED_BY_TIMEOUT = 'expired_by_timeout' ``` --- ## Properties #### protected $validValues : array --- **Type:** array **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodGooglePay.md000064400000054647150364342670026243 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodGooglePay ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodGooglePay. **Description:** Оплата через Google Pay. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodGooglePay.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodGooglePay.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodGooglePay.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodGooglePay * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodGooglePay](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodGooglePay.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Notification-NotificationType.md000064400000007450150364342670023371 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Notification\NotificationType ### Namespace: [\YooKassa\Model\Notification](../namespaces/yookassa-model-notification.md) --- **Summary:** Класс, представляющий модель AbstractEnum. **Description:** Базовый класс генерируемых enum'ов. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [NOTIFICATION](../classes/YooKassa-Model-Notification-NotificationType.md#constant_NOTIFICATION) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Notification-NotificationType.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Notification/NotificationType.php](../../lib/Model/Notification/NotificationType.php) * Package: Default * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Notification\NotificationType --- ## Constants ###### NOTIFICATION ```php NOTIFICATION = 'notification' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-ListObject.md000064400000032057150364342670017710 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\ListObject ### Namespace: [\YooKassa\Common](../namespaces/yookassa-common.md) --- **Summary:** Класс, представляющий модель ListObject. **Description:** Коллекция объектов AbstractObject. --- ### Examples Работа с коллекциями объектов ```php require_once '../vendor/autoload.php'; // Создание коллекции $collection = new \YooKassa\Common\ListObject(\YooKassa\Request\Payments\Airline::class, [ [ 'booking_reference' => 'IIIKRV', 'ticket_number' => '12342123413', 'passengers' => [ [ 'first_name' => 'SERGEI', 'last_name' => 'IVANOV', ], ], 'legs' => [ [ 'departure_airport' => 'LED', 'destination_airport' => 'AMS', 'departure_date' => '2023-01-20', ], ], ], ]); var_dump([$collection->count(), $collection->toArray(), json_encode($collection->toArray())]); // Чтобы сменить тип объекта коллекции, необходимо сначала очистить коллекцию. В случае попытки изменить тип объекта в заполненной коллекции, будет получено исключение try { $collection->setType(\YooKassa\Request\Payments\Leg::class); } catch (Exception $exception) { print_r($exception); exit(); } // Очищает коллекцию и устанавливает тип объекта в коллекцию $collection->clear()->setType(\YooKassa\Request\Payments\Passenger::class); // Добавляет объект в коллекцию $collection->add(new \YooKassa\Request\Payments\Passenger(['first_name' => 'Sergei', 'last_name' => 'Ivanov'])); var_dump([$collection->count(), $collection->toArray(), json_encode($collection->toArray())]); // Получить массив объектов var_dump($collection->getItems()->toArray()); // Для добавления объектов в коллекцию можно использовать [] $collection[] = ['first_name' => 'Ivan', 'last_name' => 'Ivanov']; // Можно удалить объект из коллекции по индексу $collection->remove(1); var_dump([$collection->count(), $collection->toArray(), json_encode($collection->toArray())]); // Можно добавить массив объектов в коллекцию. Если тип коллекции интерфейс или абстрактный класс, то добавить массив не получится. $collection->merge([ ['first_name' => 'Michail', 'last_name' => 'Sidorov'], new \YooKassa\Request\Payments\Passenger(['first_name' => 'Alex', 'last_name' => 'Lutor']), ]); // Можно получить объект коллекции по индексу var_dump([$collection[0]?->toArray(), $collection->get(1)?->toArray()]); ``` --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-ListObject.md#method___construct) | | | | public | [add()](../classes/YooKassa-Common-ListObject.md#method_add) | | Добавляет объект в коллекцию | | public | [clear()](../classes/YooKassa-Common-ListObject.md#method_clear) | | Очищает коллекцию | | public | [count()](../classes/YooKassa-Common-ListObject.md#method_count) | | Возвращает количество объектов в коллекции | | public | [get()](../classes/YooKassa-Common-ListObject.md#method_get) | | Возвращает объект коллекции по индексу | | public | [getItems()](../classes/YooKassa-Common-ListObject.md#method_getItems) | | Возвращает коллекцию | | public | [getIterator()](../classes/YooKassa-Common-ListObject.md#method_getIterator) | | | | public | [getType()](../classes/YooKassa-Common-ListObject.md#method_getType) | | Возвращает тип объектов в коллекции | | public | [isEmpty()](../classes/YooKassa-Common-ListObject.md#method_isEmpty) | | Проверка на пустую коллекцию | | public | [jsonSerialize()](../classes/YooKassa-Common-ListObject.md#method_jsonSerialize) | | Возвращает коллекцию в виде массива | | public | [merge()](../classes/YooKassa-Common-ListObject.md#method_merge) | | Добавляет массив объектов в коллекцию | | public | [offsetExists()](../classes/YooKassa-Common-ListObject.md#method_offsetExists) | | | | public | [offsetGet()](../classes/YooKassa-Common-ListObject.md#method_offsetGet) | | | | public | [offsetSet()](../classes/YooKassa-Common-ListObject.md#method_offsetSet) | | | | public | [offsetUnset()](../classes/YooKassa-Common-ListObject.md#method_offsetUnset) | | | | public | [remove()](../classes/YooKassa-Common-ListObject.md#method_remove) | | Удаляет объект из коллекции по индексу | | public | [setType()](../classes/YooKassa-Common-ListObject.md#method_setType) | | Устанавливает тип объектов в коллекции | | public | [toArray()](../classes/YooKassa-Common-ListObject.md#method_toArray) | | Возвращает коллекцию в виде массива | --- ### Details * File: [lib/Common/ListObject.php](../../lib/Common/ListObject.php) * Package: YooKassa * Class Hierarchy: * \YooKassa\Common\ListObject * Implements: * [\YooKassa\Common\ListObjectInterface](../classes/YooKassa-Common-ListObjectInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public __construct() : mixed ```php public __construct(string $type, array|null $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | type | Тип хранимых объектов | | array OR null | data | Массив данных | **Returns:** mixed - #### public add() : $this ```php public add(mixed $item) : $this ``` **Summary** Добавляет объект в коллекцию **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | item | | **Returns:** $this - #### public clear() : $this ```php public clear() : $this ``` **Summary** Очищает коллекцию **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) **Returns:** $this - #### public count() : int ```php public count() : int ``` **Summary** Возвращает количество объектов в коллекции **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) **Returns:** int - #### public get() : \YooKassa\Common\AbstractObject ```php public get(int $index) : \YooKassa\Common\AbstractObject ``` **Summary** Возвращает объект коллекции по индексу **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | index | | **Returns:** \YooKassa\Common\AbstractObject - #### public getItems() : \Ds\Vector ```php public getItems() : \Ds\Vector ``` **Summary** Возвращает коллекцию **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) **Returns:** \Ds\Vector - #### public getIterator() : \Ds\Vector ```php public getIterator() : \Ds\Vector ``` **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) **Returns:** \Ds\Vector - #### public getType() : string ```php public getType() : string ``` **Summary** Возвращает тип объектов в коллекции **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) **Returns:** string - #### public isEmpty() : bool ```php public isEmpty() : bool ``` **Summary** Проверка на пустую коллекцию **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) **Returns:** bool - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает коллекцию в виде массива **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) **Returns:** array - #### public merge() : $this ```php public merge(iterable $data) : $this ``` **Summary** Добавляет массив объектов в коллекцию **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable | data | | **Returns:** $this - #### public offsetExists() : mixed ```php public offsetExists(mixed $offset) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | offset | | **Returns:** mixed - #### public offsetGet() : mixed ```php public offsetGet(mixed $offset) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | offset | | **Returns:** mixed - #### public offsetSet() : mixed ```php public offsetSet(mixed $offset, mixed $value) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | offset | | | mixed | value | | **Returns:** mixed - #### public offsetUnset() : mixed ```php public offsetUnset(mixed $offset) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | offset | | **Returns:** mixed - #### public remove() : $this ```php public remove(int $index) : $this ``` **Summary** Удаляет объект из коллекции по индексу **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | index | | **Returns:** $this - #### public setType() : $this ```php public setType(string $type) : $this ``` **Summary** Устанавливает тип объектов в коллекции **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | type | | **Returns:** $this - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает коллекцию в виде массива **Details:** * Inherited From: [\YooKassa\Common\ListObject](../classes/YooKassa-Common-ListObject.md) **Returns:** array - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md000064400000023320150364342670022574 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\ReceiptItemMeasure ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Класс, представляющий модель ReceiptItemMeasure. **Description:** Мера количества предмета расчета передается в массиве `items`, в параметре `measure`. Обязательный параметр, если используете Чеки от ЮKassa или онлайн-кассу, обновленную до ФФД 1.2. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [PIECE](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_PIECE) | | Штука, единица товара | | public | [GRAM](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_GRAM) | | Грамм | | public | [KILOGRAM](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_KILOGRAM) | | Килограмм | | public | [TON](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_TON) | | Тонна | | public | [CENTIMETER](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_CENTIMETER) | | Сантиметр | | public | [DECIMETER](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_DECIMETER) | | Дециметр | | public | [METER](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_METER) | | Метр | | public | [SQUARE_CENTIMETER](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_SQUARE_CENTIMETER) | | Квадратный сантиметр | | public | [SQUARE_DECIMETER](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_SQUARE_DECIMETER) | | Квадратный дециметр | | public | [SQUARE_METER](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_SQUARE_METER) | | Квадратный метр | | public | [MILLILITER](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_MILLILITER) | | Миллилитр | | public | [LITER](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_LITER) | | Литр | | public | [CUBIC_METER](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_CUBIC_METER) | | Кубический метр | | public | [KILOWATT_HOUR](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_KILOWATT_HOUR) | | Килловат-час | | public | [GIGACALORIE](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_GIGACALORIE) | | Гигакалория | | public | [DAY](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_DAY) | | Сутки | | public | [HOUR](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_HOUR) | | Час | | public | [MINUTE](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_MINUTE) | | Минута | | public | [SECOND](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_SECOND) | | Секунда | | public | [KILOBYTE](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_KILOBYTE) | | Килобайт | | public | [MEGABYTE](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_MEGABYTE) | | Мегабайт | | public | [GIGABYTE](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_GIGABYTE) | | Гигабайт | | public | [TERABYTE](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_TERABYTE) | | Терабайт | | public | [ANOTHER](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#constant_ANOTHER) | | Другое | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Receipt-ReceiptItemMeasure.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Receipt/ReceiptItemMeasure.php](../../lib/Model/Receipt/ReceiptItemMeasure.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Receipt\ReceiptItemMeasure * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### PIECE Штука, единица товара ```php PIECE = 'piece' ``` ###### GRAM Грамм ```php GRAM = 'gram' ``` ###### KILOGRAM Килограмм ```php KILOGRAM = 'kilogram' ``` ###### TON Тонна ```php TON = 'ton' ``` ###### CENTIMETER Сантиметр ```php CENTIMETER = 'centimeter' ``` ###### DECIMETER Дециметр ```php DECIMETER = 'decimeter' ``` ###### METER Метр ```php METER = 'meter' ``` ###### SQUARE_CENTIMETER Квадратный сантиметр ```php SQUARE_CENTIMETER = 'square_centimeter' ``` ###### SQUARE_DECIMETER Квадратный дециметр ```php SQUARE_DECIMETER = 'square_decimeter' ``` ###### SQUARE_METER Квадратный метр ```php SQUARE_METER = 'square_meter' ``` ###### MILLILITER Миллилитр ```php MILLILITER = 'milliliter' ``` ###### LITER Литр ```php LITER = 'liter' ``` ###### CUBIC_METER Кубический метр ```php CUBIC_METER = 'cubic_meter' ``` ###### KILOWATT_HOUR Килловат-час ```php KILOWATT_HOUR = 'kilowatt_hour' ``` ###### GIGACALORIE Гигакалория ```php GIGACALORIE = 'gigacalorie' ``` ###### DAY Сутки ```php DAY = 'day' ``` ###### HOUR Час ```php HOUR = 'hour' ``` ###### MINUTE Минута ```php MINUTE = 'minute' ``` ###### SECOND Секунда ```php SECOND = 'second' ``` ###### KILOBYTE Килобайт ```php KILOBYTE = 'kilobyte' ``` ###### MEGABYTE Мегабайт ```php MEGABYTE = 'megabyte' ``` ###### GIGABYTE Гигабайт ```php GIGABYTE = 'gigabyte' ``` ###### TERABYTE Терабайт ```php TERABYTE = 'terabyte' ``` ###### ANOTHER Другое ```php ANOTHER = 'another' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-PayoutStatus.md000064400000014074150364342670021421 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payout\PayoutStatus ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель PayoutStatus. **Description:** Статус выплаты. Возможные значения: - `pending` - Выплата создана и ожидает подтверждения от эмитента - `succeeded` - Выплата успешно завершена - `canceled` - Выплата отменена --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [PENDING](../classes/YooKassa-Model-Payout-PayoutStatus.md#constant_PENDING) | | Только для выплат на банковские карты: выплата создана и ожидает подтверждения от эмитента, что деньги можно перевести на указанную банковскую карту | | public | [SUCCEEDED](../classes/YooKassa-Model-Payout-PayoutStatus.md#constant_SUCCEEDED) | | Выплата успешно завершена, оплата переведена на платежное средство продавца (финальный и неизменяемый статус) | | public | [CANCELED](../classes/YooKassa-Model-Payout-PayoutStatus.md#constant_CANCELED) | | Выплата отменена, инициатор и причина отмены указаны в объекте cancellation_details (финальный и неизменяемый статус) | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payout-PayoutStatus.md#property_validValues) | | Возвращает список доступных значений | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payout/PayoutStatus.php](../../lib/Model/Payout/PayoutStatus.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payout\PayoutStatus * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### PENDING Только для выплат на банковские карты: выплата создана и ожидает подтверждения от эмитента, что деньги можно перевести на указанную банковскую карту ```php PENDING = 'pending' ``` ###### SUCCEEDED Выплата успешно завершена, оплата переведена на платежное средство продавца (финальный и неизменяемый статус) ```php SUCCEEDED = 'succeeded' ``` ###### CANCELED Выплата отменена, инициатор и причина отмены указаны в объекте cancellation_details (финальный и неизменяемый статус) ```php CANCELED = 'canceled' ``` --- ## Properties #### protected $validValues : array --- **Summary** Возвращает список доступных значений **Type:** array Массив принимаемых enum'ом значений **Details:** ##### Tags | Tag | Version | Description | | --- | ------- | ----------- | | return | | | --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md000064400000043030150364342670024110 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payout\PayoutDestinationYooMoney ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель PayoutToYooMoneyDestination. **Description:** Выплаты на кошелек ЮMoney. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_ACCOUNT_NUMBER](../classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md#constant_MAX_LENGTH_ACCOUNT_NUMBER) | | | | public | [MIN_LENGTH_ACCOUNT_NUMBER](../classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md#constant_MIN_LENGTH_ACCOUNT_NUMBER) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$account_number](../classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md#property_account_number) | | Номер кошелька в ЮMoney, с которого была произведена оплата | | public | [$accountNumber](../classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md#property_accountNumber) | | Номер кошелька в ЮMoney, с которого была произведена оплата | | public | [$type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property__type) | | Тип метода оплаты | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md#method___construct) | | Конструктор PayoutDestinationYooMoney. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAccountNumber()](../classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md#method_getAccountNumber) | | Возвращает номер кошелька в ЮMoney, с которого была произведена оплата. | | public | [getType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAccountNumber()](../classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md#method_setAccountNumber) | | Устанавливает номер кошелька в ЮMoney, с которого была произведена оплата. | | public | [setType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_setType) | | Устанавливает тип метода оплаты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payout/PayoutDestinationYooMoney.php](../../lib/Model/Payout/PayoutDestinationYooMoney.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) * \YooKassa\Model\Payout\PayoutDestinationYooMoney * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_ACCOUNT_NUMBER ```php MAX_LENGTH_ACCOUNT_NUMBER = 33 : int ``` ###### MIN_LENGTH_ACCOUNT_NUMBER ```php MIN_LENGTH_ACCOUNT_NUMBER = 11 : int ``` --- ## Properties #### public $account_number : string --- ***Description*** Номер кошелька в ЮMoney, с которого была произведена оплата **Type:** string **Details:** #### public $accountNumber : string --- ***Description*** Номер кошелька в ЮMoney, с которого была произведена оплата **Type:** string **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) #### protected $_type : ?string --- **Summary** Тип метода оплаты **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** Конструктор PayoutDestinationYooMoney. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationYooMoney](../classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAccountNumber() : string|null ```php public getAccountNumber() : string|null ``` **Summary** Возвращает номер кошелька в ЮMoney, с которого была произведена оплата. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationYooMoney](../classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md) **Returns:** string|null - Номер кошелька в ЮMoney #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAccountNumber() : self ```php public setAccountNumber(string|null $account_number = null) : self ``` **Summary** Устанавливает номер кошелька в ЮMoney, с которого была произведена оплата. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationYooMoney](../classes/YooKassa-Model-Payout-PayoutDestinationYooMoney.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | account_number | Номер кошелька ЮMoney | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md000064400000100062150364342670025463 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\PersonalData\CreatePersonalDataRequest ### Namespace: [\YooKassa\Request\PersonalData](../namespaces/yookassa-request-personaldata.md) --- **Summary:** Класс, представляющий модель CreatePersonalDataRequest. --- ### Examples Пример использования билдера ```php try { $personalDataBuilder = \YooKassa\Request\PersonalData\CreatePersonalDataRequest::builder(); $personalDataBuilder ->setType(\YooKassa\Model\PersonalData\PersonalDataType::SBP_PAYOUT_RECIPIENT) ->setFirstName('Иван') ->setLastName('Иванов') ->setMiddleName('Иванович') ->setMetadata(['recipient_id' => '37']) ; // Создаем объект запроса $request = $personalDataBuilder->build(); $idempotenceKey = uniqid('', true); $response = $client->createPersonalData($request, $idempotenceKey); } catch (Exception $e) { $response = $e; } var_dump($response); ``` --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_LAST_NAME](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#constant_MAX_LENGTH_LAST_NAME) | | Максимальная длина строки фамилии или отчества | | public | [MAX_LENGTH_FIRST_NAME](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#constant_MAX_LENGTH_FIRST_NAME) | | Максимальная длина строки имени | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$first_name](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#property_first_name) | | Имя пользователя | | public | [$firstName](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#property_firstName) | | Имя пользователя | | public | [$last_name](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#property_last_name) | | Фамилия пользователя | | public | [$lastName](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#property_lastName) | | Фамилия пользователя | | public | [$metadata](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#property_metadata) | | Метаданные персональных данных указанные мерчантом | | public | [$middle_name](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#property_middle_name) | | Отчество пользователя | | public | [$middleName](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#property_middleName) | | Отчество пользователя | | public | [$type](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#property_type) | | Тип персональных данных | | protected | [$_metadata](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#property__metadata) | | Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [builder()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_builder) | | Возвращает билдер объектов запросов создания платежа. | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getFirstName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_getFirstName) | | Возвращает имя пользователя. | | public | [getLastName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_getLastName) | | Возвращает фамилию пользователя. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [getMetadata()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_getMetadata) | | Возвращает любые дополнительные данные. | | public | [getMiddleName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_getMiddleName) | | Возвращает отчество пользователя. | | public | [getType()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_getType) | | Возвращает тип персональных данных. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasFirstName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_hasFirstName) | | Проверяет наличие имени пользователя в запросе. | | public | [hasLastName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_hasLastName) | | Проверяет наличие фамилии пользователя в запросе. | | public | [hasMetadata()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_hasMetadata) | | Проверяет, были ли установлены метаданные. | | public | [hasMiddleName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_hasMiddleName) | | Проверяет наличие отчества пользователя в запросе. | | public | [hasType()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_hasType) | | Проверяет наличие типа персональных данных в запросе. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setFirstName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_setFirstName) | | Устанавливает имя пользователя. | | public | [setLastName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_setLastName) | | Устанавливает фамилию пользователя. | | public | [setMetadata()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_setMetadata) | | Устанавливает любые дополнительные данные. | | public | [setMiddleName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_setMiddleName) | | Устанавливает отчество пользователя. | | public | [setType()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_setType) | | Устанавливает тип персональных данных. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | public | [validate()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md#method_validate) | | Проверяет на валидность текущий объект | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_setValidationError) | | Устанавливает ошибку валидации. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/PersonalData/CreatePersonalDataRequest.php](../../lib/Request/PersonalData/CreatePersonalDataRequest.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) * \YooKassa\Request\PersonalData\CreatePersonalDataRequest * Implements: * [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_LAST_NAME Максимальная длина строки фамилии или отчества ```php MAX_LENGTH_LAST_NAME = 200 ``` ###### MAX_LENGTH_FIRST_NAME Максимальная длина строки имени ```php MAX_LENGTH_FIRST_NAME = 100 ``` --- ## Properties #### public $first_name : string --- ***Description*** Имя пользователя **Type:** string **Details:** #### public $firstName : string --- ***Description*** Имя пользователя **Type:** string **Details:** #### public $last_name : string --- ***Description*** Фамилия пользователя **Type:** string **Details:** #### public $lastName : string --- ***Description*** Фамилия пользователя **Type:** string **Details:** #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные персональных данных указанные мерчантом **Type:** Metadata **Details:** #### public $middle_name : string --- ***Description*** Отчество пользователя **Type:** string **Details:** #### public $middleName : string --- ***Description*** Отчество пользователя **Type:** string **Details:** #### public $type : string --- ***Description*** Тип персональных данных **Type:** string **Details:** #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Summary** Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). ***Description*** Передаются в виде набора пар «ключ-значение» и возвращаются в ответе от ЮKassa. Ограничения: максимум 16 ключей, имя ключа не больше 32 символов, значение ключа не больше 512 символов, тип данных — строка в формате UTF-8. **Type:** Metadata **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public builder() : \YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder ```php Static public builder() : \YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder ``` **Summary** Возвращает билдер объектов запросов создания платежа. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) **Returns:** \YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder - Инстанс билдера объектов запросов #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getFirstName() : string|null ```php public getFirstName() : string|null ``` **Summary** Возвращает имя пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) **Returns:** string|null - Имя пользователя #### public getLastName() : string|null ```php public getLastName() : string|null ``` **Summary** Возвращает фамилию пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) **Returns:** string|null - Фамилия пользователя #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string|null - Последняя произошедшая ошибка валидации #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает любые дополнительные данные. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) **Returns:** \YooKassa\Model\Metadata|null - Любые дополнительные данные #### public getMiddleName() : null|string ```php public getMiddleName() : null|string ``` **Summary** Возвращает отчество пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) **Returns:** null|string - Отчество пользователя #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип персональных данных. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) **Returns:** string|null - Тип персональных данных #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasFirstName() : bool ```php public hasFirstName() : bool ``` **Summary** Проверяет наличие имени пользователя в запросе. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) **Returns:** bool - True если имя пользователя задано, false если нет #### public hasLastName() : bool ```php public hasLastName() : bool ``` **Summary** Проверяет наличие фамилии пользователя в запросе. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) **Returns:** bool - True если фамилия пользователя задана, false если нет #### public hasMetadata() : bool ```php public hasMetadata() : bool ``` **Summary** Проверяет, были ли установлены метаданные. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) **Returns:** bool - True если метаданные были установлены, false если нет #### public hasMiddleName() : bool ```php public hasMiddleName() : bool ``` **Summary** Проверяет наличие отчества пользователя в запросе. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) **Returns:** bool - True если отчество пользователя задано, false если нет #### public hasType() : bool ```php public hasType() : bool ``` **Summary** Проверяет наличие типа персональных данных в запросе. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) **Returns:** bool - True если тип персональных данных задан, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setFirstName() : self ```php public setFirstName(string|null $first_name = null) : self ``` **Summary** Устанавливает имя пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | first_name | Имя пользователя | **Returns:** self - #### public setLastName() : self ```php public setLastName(string|null $last_name = null) : self ``` **Summary** Устанавливает фамилию пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | last_name | Фамилия пользователя | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает любые дополнительные данные. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Любые дополнительные данные | **Returns:** self - #### public setMiddleName() : self ```php public setMiddleName(null|string $middle_name = null) : self ``` **Summary** Устанавливает отчество пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | middle_name | Отчество пользователя | **Returns:** self - #### public setType() : self ```php public setType(\YooKassa\Model\PersonalData\PersonalDataType|string|null $type = null) : self ``` **Summary** Устанавливает тип персональных данных. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\PersonalData\PersonalDataType OR string OR null | type | Тип персональных данных | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public validate() : bool ```php public validate() : bool ``` **Summary** Проверяет на валидность текущий объект **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequest](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequest.md) **Returns:** bool - True если объект запроса валиден, false если нет #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setValidationError() : void ```php protected setValidationError(string $value) : void ``` **Summary** Устанавливает ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** void - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Deals-DealsRequestBuilder.md000064400000046164150364342670023010 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Deals\DealsRequestBuilder ### Namespace: [\YooKassa\Request\Deals](../namespaces/yookassa-request-deals.md) --- **Summary:** Класс, представляющий модель DealsRequestBuilder. **Description:** Класс билдера запросов к API для получения списка сделок магазина. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$currentObject](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#property_currentObject) | | Инстанс собираемого запроса. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. | | public | [build()](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#method_build) | | Собирает и возвращает объект запроса списка сделок магазина. | | public | [setCreatedAtGt()](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#method_setCreatedAtGt) | | Устанавливает дату создания от которой выбираются платежи. | | public | [setCreatedAtGte()](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#method_setCreatedAtGte) | | Устанавливает дату создания от которой выбираются платежи. | | public | [setCreatedAtLt()](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#method_setCreatedAtLt) | | Устанавливает дату создания до которой выбираются платежи. | | public | [setCreatedAtLte()](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#method_setCreatedAtLte) | | Устанавливает дату создания до которой выбираются платежи. | | public | [setCursor()](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#method_setCursor) | | Устанавливает страница выдачи результатов. | | public | [setExpiresAtGt()](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#method_setExpiresAtGt) | | Устанавливает дату автоматического закрытия от которой выбираются платежи. | | public | [setExpiresAtGte()](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#method_setExpiresAtGte) | | Устанавливает дату автоматического закрытия от которой выбираются платежи. | | public | [setExpiresAtLt()](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#method_setExpiresAtLt) | | Устанавливает дату автоматического закрытия до которой выбираются платежи. | | public | [setExpiresAtLte()](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#method_setExpiresAtLte) | | Устанавливает дату автоматического закрытия до которой выбираются платежи. | | public | [setFullTextSearch()](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#method_setFullTextSearch) | | Устанавливает фильтр по описанию выбираемых сделок. | | public | [setLimit()](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#method_setLimit) | | Устанавливает ограничение количества объектов сделки. | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива. | | public | [setStatus()](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#method_setStatus) | | Устанавливает статус выбираемых сделок. | | protected | [initCurrentObject()](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md#method_initCurrentObject) | | Возвращает новый объект запроса для получения списка сделок, который в дальнейшем будет собираться в билдере. | --- ### Details * File: [lib/Request/Deals/DealsRequestBuilder.php](../../lib/Request/Deals/DealsRequestBuilder.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) * \YooKassa\Request\Deals\DealsRequestBuilder * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### protected $currentObject : ?\YooKassa\Common\AbstractRequestInterface --- **Summary** Инстанс собираемого запроса. **Type:** AbstractRequestInterface Собираемый объект запроса списка сделок магазина **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public build() : \YooKassa\Common\AbstractRequestInterface ```php public build(null|array $options = null) : \YooKassa\Common\AbstractRequestInterface ``` **Summary** Собирает и возвращает объект запроса списка сделок магазина. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array | options | Массив с настройками запроса | **Returns:** \YooKassa\Common\AbstractRequestInterface - Инстанс объекта запроса к API для получения списка сделок магазина #### public setCreatedAtGt() : \YooKassa\Request\Deals\DealsRequestBuilder ```php public setCreatedAtGt(null|\DateTime|int|string $value) : \YooKassa\Request\Deals\DealsRequestBuilder ``` **Summary** Устанавливает дату создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, от (не включая) или null, чтобы удалить значение | **Returns:** \YooKassa\Request\Deals\DealsRequestBuilder - Инстанс текущего билдера #### public setCreatedAtGte() : \YooKassa\Request\Deals\DealsRequestBuilder ```php public setCreatedAtGte(null|\DateTime|int|string $value) : \YooKassa\Request\Deals\DealsRequestBuilder ``` **Summary** Устанавливает дату создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, от (включительно) или null, чтобы удалить значение | **Returns:** \YooKassa\Request\Deals\DealsRequestBuilder - Инстанс текущего билдера #### public setCreatedAtLt() : \YooKassa\Request\Deals\DealsRequestBuilder ```php public setCreatedAtLt(null|\DateTime|int|string $value) : \YooKassa\Request\Deals\DealsRequestBuilder ``` **Summary** Устанавливает дату создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, до (не включая) или null, чтобы удалить значение | **Returns:** \YooKassa\Request\Deals\DealsRequestBuilder - Инстанс текущего билдера #### public setCreatedAtLte() : \YooKassa\Request\Deals\DealsRequestBuilder ```php public setCreatedAtLte(null|\DateTime|int|string $value) : \YooKassa\Request\Deals\DealsRequestBuilder ``` **Summary** Устанавливает дату создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, до (включительно) или null, чтобы удалить значение | **Returns:** \YooKassa\Request\Deals\DealsRequestBuilder - Инстанс текущего билдера #### public setCursor() : \YooKassa\Request\Deals\DealsRequestBuilder ```php public setCursor(null|string $value) : \YooKassa\Request\Deals\DealsRequestBuilder ``` **Summary** Устанавливает страница выдачи результатов. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | value | Страница выдачи результатов или null, чтобы удалить значение | **Returns:** \YooKassa\Request\Deals\DealsRequestBuilder - Инстанс текущего билдера #### public setExpiresAtGt() : \YooKassa\Request\Deals\DealsRequestBuilder ```php public setExpiresAtGt(null|\DateTime|int|string $value) : \YooKassa\Request\Deals\DealsRequestBuilder ``` **Summary** Устанавливает дату автоматического закрытия от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время автоматического закрытия, до (включительно) или null, чтобы удалить значение | **Returns:** \YooKassa\Request\Deals\DealsRequestBuilder - Инстанс текущего билдера #### public setExpiresAtGte() : \YooKassa\Request\Deals\DealsRequestBuilder ```php public setExpiresAtGte(null|\DateTime|int|string $value) : \YooKassa\Request\Deals\DealsRequestBuilder ``` **Summary** Устанавливает дату автоматического закрытия от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время автоматического закрытия, от (включительно) или null, чтобы удалить значение | **Returns:** \YooKassa\Request\Deals\DealsRequestBuilder - Инстанс текущего билдера #### public setExpiresAtLt() : \YooKassa\Request\Deals\DealsRequestBuilder ```php public setExpiresAtLt(null|\DateTime|int|string $value) : \YooKassa\Request\Deals\DealsRequestBuilder ``` **Summary** Устанавливает дату автоматического закрытия до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время автоматического закрытия, до (включительно) или null, чтобы удалить значение | **Returns:** \YooKassa\Request\Deals\DealsRequestBuilder - Инстанс текущего билдера #### public setExpiresAtLte() : \YooKassa\Request\Deals\DealsRequestBuilder ```php public setExpiresAtLte(null|\DateTime|int|string $value) : \YooKassa\Request\Deals\DealsRequestBuilder ``` **Summary** Устанавливает дату автоматического закрытия до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время автоматического закрытия, до (включительно) или null, чтобы удалить значение | **Returns:** \YooKassa\Request\Deals\DealsRequestBuilder - Инстанс текущего билдера #### public setFullTextSearch() : \YooKassa\Request\Deals\DealsRequestBuilder ```php public setFullTextSearch(string|null $value) : \YooKassa\Request\Deals\DealsRequestBuilder ``` **Summary** Устанавливает фильтр по описанию выбираемых сделок. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Фильтр по описанию выбираемых сделок или null, чтобы удалить значение | **Returns:** \YooKassa\Request\Deals\DealsRequestBuilder - Инстанс текущего билдера #### public setLimit() : \YooKassa\Request\Deals\DealsRequestBuilder ```php public setLimit(null|string|int $value) : \YooKassa\Request\Deals\DealsRequestBuilder ``` **Summary** Устанавливает ограничение количества объектов сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string OR int | value | Ограничение количества объектов сделки или null, чтобы удалить значение | **Returns:** \YooKassa\Request\Deals\DealsRequestBuilder - Инстанс текущего билдера #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(iterable|null $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable OR null | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### public setStatus() : \YooKassa\Request\Deals\DealsRequestBuilder ```php public setStatus(string|null $value) : \YooKassa\Request\Deals\DealsRequestBuilder ``` **Summary** Устанавливает статус выбираемых сделок. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Статус выбираемых сделок или null, чтобы удалить значение | **Returns:** \YooKassa\Request\Deals\DealsRequestBuilder - Инстанс текущего билдера #### protected initCurrentObject() : \YooKassa\Request\Deals\DealsRequest ```php protected initCurrentObject() : \YooKassa\Request\Deals\DealsRequest ``` **Summary** Возвращает новый объект запроса для получения списка сделок, который в дальнейшем будет собираться в билдере. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestBuilder](../classes/YooKassa-Request-Deals-DealsRequestBuilder.md) **Returns:** \YooKassa\Request\Deals\DealsRequest - Объект запроса списка сделок магазина --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md000064400000073250150364342670025307 0ustar00# [YooKassa API SDK](../home.md) # Interface: CreatePayoutRequestInterface ### Namespace: [\YooKassa\Request\Payouts](../namespaces/yookassa-request-payouts.md) --- **Summary:** Interface CreatePayoutRequestInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAmount()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_getAmount) | | Возвращает сумму выплаты. | | public | [getDeal()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_getDeal) | | Возвращает сделку, в рамках которой нужно провести выплату. | | public | [getDescription()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_getDescription) | | Возвращает описание транзакции. | | public | [getMetadata()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_getMetadata) | | Возвращает данные оплаты установленные мерчантом | | public | [getPaymentMethodId()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_getPaymentMethodId) | | Возвращает идентификатор сохраненного способа оплаты. | | public | [getPayoutDestinationData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_getPayoutDestinationData) | | Возвращает данные платежного средства, на которое нужно сделать выплату. | | public | [getPayoutToken()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_getPayoutToken) | | Возвращает токенизированные данные для выплаты. | | public | [getPersonalData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_getPersonalData) | | Возвращает персональные данные получателя выплаты. | | public | [getReceiptData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_getReceiptData) | | Возвращает данные для формирования чека в сервисе Мой налог. | | public | [getSelfEmployed()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_getSelfEmployed) | | Возвращает данные самозанятого, который получит выплату. | | public | [hasAmount()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_hasAmount) | | Проверяет наличие суммы в создаваемой выплате. | | public | [hasDeal()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_hasDeal) | | Проверяет установлена ли сделка, в рамках которой нужно провести выплату. | | public | [hasDescription()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_hasDescription) | | Проверяет наличие описания транзакции в создаваемой выплате. | | public | [hasMetadata()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_hasMetadata) | | Проверяет, были ли установлены метаданные заказа. | | public | [hasPaymentMethodId()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_hasPaymentMethodId) | | Проверяет наличие идентификатора сохраненного способа оплаты. | | public | [hasPayoutDestinationData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_hasPayoutDestinationData) | | Проверяет наличие данных платежного средства, на которое нужно сделать выплату. | | public | [hasPayoutToken()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_hasPayoutToken) | | Проверяет наличие токенизированных данных для выплаты. | | public | [hasPersonalData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_hasPersonalData) | | Проверяет наличие персональных данных в создаваемой выплате. | | public | [hasReceiptData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_hasReceiptData) | | Проверяет наличие данных для формирования чека в сервисе Мой налог. | | public | [hasSelfEmployed()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_hasSelfEmployed) | | Проверяет наличие данных самозанятого в создаваемой выплате. | | public | [setAmount()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_setAmount) | | Устанавливает сумму выплаты. | | public | [setDeal()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_setDeal) | | Устанавливает сделку, в рамках которой нужно провести выплату. | | public | [setDescription()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_setDescription) | | Устанавливает описание транзакции. | | public | [setMetadata()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_setMetadata) | | Устанавливает метаданные, привязанные к выплате. | | public | [setPaymentMethodId()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_setPaymentMethodId) | | Устанавливает идентификатор сохраненного способа оплаты. | | public | [setPayoutDestinationData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_setPayoutDestinationData) | | Устанавливает данные платежного средства, на которое нужно сделать выплату. | | public | [setPayoutToken()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_setPayoutToken) | | Устанавливает токенизированные данные для выплаты. | | public | [setPersonalData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_setPersonalData) | | Устанавливает персональные данные получателя выплаты. | | public | [setReceiptData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_setReceiptData) | | Устанавливает данные для формирования чека в сервисе Мой налог. | | public | [setSelfEmployed()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md#method_setSelfEmployed) | | Устанавливает данные самозанятого, который получит выплату. | --- ### Details * File: [lib/Request/Payouts/CreatePayoutRequestInterface.php](../../lib/Request/Payouts/CreatePayoutRequestInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Сумма создаваемой выплаты | | property | | Данные платежного средства, на которое нужно сделать выплату. Обязательный параметр, если не передан payout_token. | | property | | Данные платежного средства, на которое нужно сделать выплату. Обязательный параметр, если не передан payout_token. | | property | | Токенизированные данные для выплаты. Например, синоним банковской карты. Обязательный параметр, если не передан payout_destination_data | | property | | Токенизированные данные для выплаты. Например, синоним банковской карты. Обязательный параметр, если не передан payout_destination_data | | property | | Идентификатор сохраненного способа оплаты, данные которого нужно использовать для проведения выплаты | | property | | Идентификатор сохраненного способа оплаты, данные которого нужно использовать для проведения выплаты | | property | | Сделка, в рамках которой нужно провести выплату. Необходимо передавать, если вы проводите Безопасную сделку | | property | | Описание транзакции (не более 128 символов). Например: «Выплата по договору N» | | property | | Данные самозанятого, который получит выплату. Необходимо передавать, если вы делаете выплату [самозанятому](https://yookassa.ru/developers/payouts/scenario-extensions/self-employed). Только для обычных выплат. | | property | | Данные самозанятого, который получит выплату. Необходимо передавать, если вы делаете выплату [самозанятому](https://yookassa.ru/developers/payouts/scenario-extensions/self-employed). Только для обычных выплат. | | property | | Данные для формирования чека в сервисе Мой налог. Необходимо передавать, если вы делаете выплату [самозанятому](https://yookassa.ru/developers/payouts/scenario-extensions/self-employed). Только для обычных выплат. | | property | | Данные для формирования чека в сервисе Мой налог. Необходимо передавать, если вы делаете выплату [самозанятому](https://yookassa.ru/developers/payouts/scenario-extensions/self-employed). Только для обычных выплат. | | property | | Персональные данные получателя выплаты. Необходимо передавать, если вы делаете выплаты с [проверкой получателя](/developers/payouts/scenario-extensions/recipient-check) (только для выплат через СБП). | | property | | Персональные данные получателя выплаты. Необходимо передавать, если вы делаете выплаты с [проверкой получателя](/developers/payouts/scenario-extensions/recipient-check) (только для выплат через СБП). | | property | | Метаданные привязанные к выплате | --- ## Methods #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма выплаты #### public hasAmount() : bool ```php public hasAmount() : bool ``` **Summary** Проверяет наличие суммы в создаваемой выплате. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** bool - True если сумма установлена, false если нет #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array $amount) : self ``` **Summary** Устанавливает сумму выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array | amount | Сумма выплаты | **Returns:** self - #### public getPayoutDestinationData() : null|\YooKassa\Model\Payout\AbstractPayoutDestination ```php public getPayoutDestinationData() : null|\YooKassa\Model\Payout\AbstractPayoutDestination ``` **Summary** Возвращает данные платежного средства, на которое нужно сделать выплату. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** null|\YooKassa\Model\Payout\AbstractPayoutDestination - Данные платежного средства, на которое нужно сделать выплату #### public hasPayoutDestinationData() : bool ```php public hasPayoutDestinationData() : bool ``` **Summary** Проверяет наличие данных платежного средства, на которое нужно сделать выплату. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** bool - True если данные есть, false если нет #### public setPayoutDestinationData() : self ```php public setPayoutDestinationData(null|\YooKassa\Model\Payout\AbstractPayoutDestination|array $payout_destination_data) : self ``` **Summary** Устанавливает данные платежного средства, на которое нужно сделать выплату. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \YooKassa\Model\Payout\AbstractPayoutDestination OR array | payout_destination_data | Данные платежного средства, на которое нужно сделать выплату | **Returns:** self - #### public getPayoutToken() : string|null ```php public getPayoutToken() : string|null ``` **Summary** Возвращает токенизированные данные для выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** string|null - Токенизированные данные для выплаты #### public hasPayoutToken() : bool ```php public hasPayoutToken() : bool ``` **Summary** Проверяет наличие токенизированных данных для выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** bool - True если токен установлен, false если нет #### public setPayoutToken() : self ```php public setPayoutToken(string|null $payout_token) : self ``` **Summary** Устанавливает токенизированные данные для выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payout_token | Токенизированные данные для выплаты | **Returns:** self - #### public getPaymentMethodId() : null|string ```php public getPaymentMethodId() : null|string ``` **Summary** Возвращает идентификатор сохраненного способа оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** null|string - Идентификатор сохраненного способа оплаты #### public hasPaymentMethodId() : bool ```php public hasPaymentMethodId() : bool ``` **Summary** Проверяет наличие идентификатора сохраненного способа оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** bool - True если идентификатора установлен, false если нет #### public setPaymentMethodId() : self ```php public setPaymentMethodId(null|string $payment_method_id) : self ``` **Summary** Устанавливает идентификатор сохраненного способа оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | payment_method_id | Идентификатор сохраненного способа оплаты | **Returns:** self - #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** string|null - Описание транзакции #### public hasDescription() : bool ```php public hasDescription() : bool ``` **Summary** Проверяет наличие описания транзакции в создаваемой выплате. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** bool - True если описание транзакции установлено, false если нет #### public setDescription() : self ```php public setDescription(string|null $description) : self ``` **Summary** Устанавливает описание транзакции. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Описание транзакции | **Returns:** self - #### public getDeal() : null|\YooKassa\Model\Deal\PayoutDealInfo ```php public getDeal() : null|\YooKassa\Model\Deal\PayoutDealInfo ``` **Summary** Возвращает сделку, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** null|\YooKassa\Model\Deal\PayoutDealInfo - Сделка, в рамках которой нужно провести выплату #### public hasDeal() : bool ```php public hasDeal() : bool ``` **Summary** Проверяет установлена ли сделка, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** bool - True если сделка установлена, false если нет #### public setDeal() : self ```php public setDeal(null|array|\YooKassa\Model\Deal\PayoutDealInfo $deal) : self ``` **Summary** Устанавливает сделку, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\PayoutDealInfo | deal | Сделка, в рамках которой нужно провести выплату | **Returns:** self - #### public getSelfEmployed() : null|\YooKassa\Request\Payouts\PayoutSelfEmployedInfo ```php public getSelfEmployed() : null|\YooKassa\Request\Payouts\PayoutSelfEmployedInfo ``` **Summary** Возвращает данные самозанятого, который получит выплату. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** null|\YooKassa\Request\Payouts\PayoutSelfEmployedInfo - Данные самозанятого, который получит выплату #### public hasSelfEmployed() : bool ```php public hasSelfEmployed() : bool ``` **Summary** Проверяет наличие данных самозанятого в создаваемой выплате. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** bool - True если данные самозанятого есть, false если нет #### public setSelfEmployed() : self ```php public setSelfEmployed(null|array|\YooKassa\Request\Payouts\PayoutSelfEmployedInfo $self_employed) : self ``` **Summary** Устанавливает данные самозанятого, который получит выплату. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Payouts\PayoutSelfEmployedInfo | self_employed | Данные самозанятого, который получит выплату | **Returns:** self - #### public getReceiptData() : null|\YooKassa\Request\Payouts\IncomeReceiptData ```php public getReceiptData() : null|\YooKassa\Request\Payouts\IncomeReceiptData ``` **Summary** Возвращает данные для формирования чека в сервисе Мой налог. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** null|\YooKassa\Request\Payouts\IncomeReceiptData - Данные для формирования чека в сервисе Мой налог #### public hasReceiptData() : bool ```php public hasReceiptData() : bool ``` **Summary** Проверяет наличие данных для формирования чека в сервисе Мой налог. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** bool - True если данные для формирования чека есть, false если нет #### public setReceiptData() : self ```php public setReceiptData(null|array|\YooKassa\Request\Payouts\IncomeReceiptData $receipt_data) : self ``` **Summary** Устанавливает данные для формирования чека в сервисе Мой налог. **Description** . **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Payouts\IncomeReceiptData | receipt_data | Данные для формирования чека в сервисе Мой налог | **Returns:** self - #### public getPersonalData() : \YooKassa\Request\Payouts\PayoutPersonalData[]|\YooKassa\Common\ListObjectInterface ```php public getPersonalData() : \YooKassa\Request\Payouts\PayoutPersonalData[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает персональные данные получателя выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** \YooKassa\Request\Payouts\PayoutPersonalData[]|\YooKassa\Common\ListObjectInterface - Персональные данные получателя выплаты #### public hasPersonalData() : bool ```php public hasPersonalData() : bool ``` **Summary** Проверяет наличие персональных данных в создаваемой выплате. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** bool - True если персональные данные есть, false если нет #### public setPersonalData() : self ```php public setPersonalData(null|array|\YooKassa\Common\ListObjectInterface $personal_data = null) : self ``` **Summary** Устанавливает персональные данные получателя выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Common\ListObjectInterface | personal_data | Персональные данные получателя выплаты | **Returns:** self - #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает данные оплаты установленные мерчантом **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные привязанные к выплате #### public hasMetadata() : bool ```php public hasMetadata() : bool ``` **Summary** Проверяет, были ли установлены метаданные заказа. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) **Returns:** bool - True если метаданные были установлены, false если нет #### public setMetadata() : self ```php public setMetadata(null|array|\YooKassa\Model\Metadata $metadata) : self ``` **Summary** Устанавливает метаданные, привязанные к выплате. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Metadata | metadata | Метаданные платежа, устанавливаемые мерчантом | **Returns:** self - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-MixedVatData.md000064400000040543150364342670026307 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\MixedVatData ### Namespace: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank](../namespaces/yookassa-model-payment-paymentmethod-b2b-sberbank.md) --- **Summary:** Класс, представляющий модель MixedVatData. **Description:** Данные об НДС, если создается платеж на несколько товаров или услуг с разными ставками НДС (в параметре `type` передано значение ~`mixed`). --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-MixedVatData.md#property_amount) | | Сумма НДС | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#property_type) | | Способ расчёта НДС | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-MixedVatData.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-MixedVatData.md#method_getAmount) | | Возвращает сумму НДС | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#method_getType) | | Возвращает способ расчёта НДС | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-MixedVatData.md#method_setAmount) | | Устанавливает сумму НДС | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#method_setType) | | Устанавливает способ расчёта НДС | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/B2b/Sberbank/MixedVatData.php](../../lib/Model/Payment/PaymentMethod/B2b/Sberbank/MixedVatData.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) * \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\MixedVatData * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма НДС **Type:** AmountInterface **Details:** #### public $type : string --- ***Description*** Способ расчёта НДС **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) #### protected $_type : ?string --- **Type:** ?string Способ расчёта НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\MixedVatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-MixedVatData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\MixedVatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-MixedVatData.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма НДС #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает способ расчёта НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) **Returns:** string|null - Способ расчёта НДС #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(null|\YooKassa\Model\AmountInterface|array $amount) : self ``` **Summary** Устанавливает сумму НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\MixedVatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-MixedVatData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \YooKassa\Model\AmountInterface OR array | amount | Сумма НДС | **Returns:** self - #### public setType() : self ```php public setType(string|null $type) : self ``` **Summary** Устанавливает способ расчёта НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Способ расчёта НДС | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md000064400000052076150364342670030631 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataSbp ### Namespace: [\YooKassa\Request\Payouts\PayoutDestinationData](../namespaces/yookassa-request-payouts-payoutdestinationdata.md) --- **Summary:** Класс, представляющий модель PayoutDestinationDataSbp. **Description:** Метод оплаты, при оплате через СБП. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_BANK_ID](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md#constant_MAX_LENGTH_BANK_ID) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$bank_id](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md#property_bank_id) | | Идентификатор выбранного участника СБП — банка или платежного сервиса, подключенного к сервису | | public | [$bankId](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md#property_bankId) | | Идентификатор выбранного участника СБП — банка или платежного сервиса, подключенного к сервису | | public | [$phone](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md#property_phone) | | Телефон, к которому привязан счет получателя выплаты в системе участника СБП | | public | [$type](../classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md#property_type) | | Тип метода оплаты | | public | [$type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property__type) | | Тип метода оплаты | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md#method___construct) | | Конструктор PayoutDestinationDataSbp. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getBankId()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md#method_getBankId) | | Возвращает идентификатор выбранного участника СБП. | | public | [getPhone()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md#method_getPhone) | | Возвращает телефон, к которому привязан счет получателя выплаты в системе участника СБП. | | public | [getType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setBankId()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md#method_setBankId) | | Устанавливает идентификатор выбранного участника СБП. | | public | [setPhone()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md#method_setPhone) | | Устанавливает телефон, к которому привязан счет получателя выплаты в системе участника СБП. | | public | [setType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_setType) | | Устанавливает тип метода оплаты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payouts/PayoutDestinationData/PayoutDestinationDataSbp.php](../../lib/Request/Payouts/PayoutDestinationData/PayoutDestinationDataSbp.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) * [\YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData](../classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md) * \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataSbp * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_BANK_ID ```php MAX_LENGTH_BANK_ID = 12 : int ``` --- ## Properties #### public $bank_id : string --- ***Description*** Идентификатор выбранного участника СБП — банка или платежного сервиса, подключенного к сервису **Type:** string **Details:** #### public $bankId : string --- ***Description*** Идентификатор выбранного участника СБП — банка или платежного сервиса, подключенного к сервису **Type:** string **Details:** #### public $phone : string --- ***Description*** Телефон, к которому привязан счет получателя выплаты в системе участника СБП **Type:** string **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData](../classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md) #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) #### protected $_type : ?string --- **Summary** Тип метода оплаты **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** Конструктор PayoutDestinationDataSbp. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataSbp](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getBankId() : string|null ```php public getBankId() : string|null ``` **Summary** Возвращает идентификатор выбранного участника СБП. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataSbp](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md) **Returns:** string|null - Идентификатор выбранного участника СБП #### public getPhone() : string|null ```php public getPhone() : string|null ``` **Summary** Возвращает телефон, к которому привязан счет получателя выплаты в системе участника СБП. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataSbp](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md) **Returns:** string|null - Телефон, к которому привязан счет получателя выплаты в системе участника СБП #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setBankId() : self ```php public setBankId(string|null $bank_id = null) : self ``` **Summary** Устанавливает идентификатор выбранного участника СБП. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataSbp](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | bank_id | Идентификатор выбранного участника СБП | **Returns:** self - #### public setPhone() : self ```php public setPhone(string|null $phone = null) : self ``` **Summary** Устанавливает телефон, к которому привязан счет получателя выплаты в системе участника СБП. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataSbp](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataSbp.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | phone | Телефон, к которому привязан счет получателя выплаты в системе участника СБП | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Deals-DealsRequestInterface.md000064400000077511150364342670023322 0ustar00# [YooKassa API SDK](../home.md) # Interface: DealsRequestInterface ### Namespace: [\YooKassa\Request\Deals](../namespaces/yookassa-request-deals.md) --- **Summary:** Interface DealsRequestInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getCreatedAtGt()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_getCreatedAtGt) | | Возвращает дату создания от которой будут возвращены сделки или null, если дата не была установлена. | | public | [getCreatedAtGte()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_getCreatedAtGte) | | Возвращает дату создания от которой будут возвращены сделки или null, если дата не была установлена. | | public | [getCreatedAtLt()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_getCreatedAtLt) | | Возвращает дату создания до которой будут возвращены сделки или null, если дата не была установлена. | | public | [getCreatedAtLte()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_getCreatedAtLte) | | Возвращает дату создания до которой будут возвращены сделки или null, если дата не была установлена. | | public | [getCursor()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_getCursor) | | Возвращает страницу выдачи результатов или null, если она до этого не была установлена. | | public | [getExpiresAtGt()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_getExpiresAtGt) | | Возвращает дату автоматического закрытия от которой будут возвращены сделки или null, если дата не была установлена. | | public | [getExpiresAtGte()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_getExpiresAtGte) | | Возвращает дату автоматического закрытия от которой будут возвращены сделки или null, если дата не была установлена. | | public | [getExpiresAtLt()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_getExpiresAtLt) | | Возвращает дату автоматического закрытия до которой будут возвращены сделки или null, если дата не была установлена. | | public | [getExpiresAtLte()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_getExpiresAtLte) | | Возвращает дату автоматического закрытия до которой будут возвращены сделки или null, если дата не была установлена. | | public | [getFullTextSearch()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_getFullTextSearch) | | Возвращает фильтр по описанию сделки или null, если он до этого не был установлен. | | public | [getLimit()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_getLimit) | | Возвращает ограничение количества объектов сделок или null, если оно до этого не было установлено. | | public | [getStatus()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_getStatus) | | Возвращает статус выбираемых сделок или null, если он до этого не был установлен. | | public | [hasCreatedAtGt()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_hasCreatedAtGt) | | Проверяет, была ли установлена дата создания от которой выбираются сделки. | | public | [hasCreatedAtGte()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_hasCreatedAtGte) | | Проверяет, была ли установлена дата создания от которой выбираются сделки. | | public | [hasCreatedAtLt()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_hasCreatedAtLt) | | Проверяет, была ли установлена дата создания до которой выбираются сделки. | | public | [hasCreatedAtLte()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_hasCreatedAtLte) | | Проверяет, была ли установлена дата создания до которой выбираются сделки. | | public | [hasCursor()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_hasCursor) | | Проверяет, была ли установлена страница выдачи результатов. | | public | [hasExpiresAtGt()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_hasExpiresAtGt) | | Проверяет, была ли установлена дата автоматического закрытия от которой выбираются сделки. | | public | [hasExpiresAtGte()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_hasExpiresAtGte) | | Проверяет, была ли установлена дата автоматического закрытия от которой выбираются сделки. | | public | [hasExpiresAtLt()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_hasExpiresAtLt) | | Проверяет, была ли установлена автоматического закрытия до которой выбираются сделки. | | public | [hasExpiresAtLte()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_hasExpiresAtLte) | | Проверяет, была ли установлена дата автоматического закрытия до которой выбираются сделки. | | public | [hasFullTextSearch()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_hasFullTextSearch) | | Проверяет, был ли установлен фильтр по описанию сделки. | | public | [hasLimit()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_hasLimit) | | Проверяет, было ли установлено ограничение количества объектов сделок. | | public | [hasStatus()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_hasStatus) | | Проверяет, был ли установлен статус выбираемых сделок. | | public | [setCreatedAtGt()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_setCreatedAtGt) | | Устанавливает дату создания от которой выбираются сделки. | | public | [setCreatedAtGte()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_setCreatedAtGte) | | Устанавливает дату создания от которой выбираются сделки. | | public | [setCreatedAtLt()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_setCreatedAtLt) | | Устанавливает дату создания до которой выбираются сделки. | | public | [setCreatedAtLte()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_setCreatedAtLte) | | Устанавливает дату создания до которой выбираются сделки. | | public | [setCursor()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_setCursor) | | Устанавливает страницу выдачи результатов. | | public | [setExpiresAtGt()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_setExpiresAtGt) | | Устанавливает дату автоматического закрытия от которой выбираются сделки. | | public | [setExpiresAtGte()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_setExpiresAtGte) | | Устанавливает дату автоматического закрытия от которой выбираются сделки. | | public | [setExpiresAtLt()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_setExpiresAtLt) | | Устанавливает дату автоматического закрытия до которой выбираются сделки. | | public | [setExpiresAtLte()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_setExpiresAtLte) | | Устанавливает дату автоматического закрытия до которой выбираются сделки. | | public | [setFullTextSearch()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_setFullTextSearch) | | Устанавливает фильтр по описанию сделки. | | public | [setLimit()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_setLimit) | | Устанавливает ограничение количества объектов сделок. | | public | [setStatus()](../classes/YooKassa-Request-Deals-DealsRequestInterface.md#method_setStatus) | | Устанавливает статус выбираемых сделок. | --- ### Details * File: [lib/Request/Deals/DealsRequestInterface.php](../../lib/Request/Deals/DealsRequestInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Страница выдачи результатов, которую необходимо отобразить | | property | | Ограничение количества объектов платежа, отображаемых на одной странице выдачи | | property | | Время создания, от (включительно) | | property | | Время создания, от (не включая) | | property | | Время создания, до (включительно) | | property | | Время создания, до (не включая) | | property | | Время автоматического закрытия, от (включительно) | | property | | Время автоматического закрытия, от (не включая) | | property | | Время автоматического закрытия, до (включительно) | | property | | Время автоматического закрытия, до (не включая) | | property | | Фильтр по описанию сделки — параметру description | | property | | Статус платежа | --- ## Methods #### public getCursor() : null|string ```php public getCursor() : null|string ``` **Summary** Возвращает страницу выдачи результатов или null, если она до этого не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** null|string - Страница выдачи результатов #### public hasCursor() : bool ```php public hasCursor() : bool ``` **Summary** Проверяет, была ли установлена страница выдачи результатов. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** bool - True если страница выдачи результатов была установлена, false если нет #### public setCursor() : self ```php public setCursor(string $cursor) : self ``` **Summary** Устанавливает страницу выдачи результатов. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | cursor | Страница | **Returns:** self - #### public getCreatedAtGte() : null|\DateTime ```php public getCreatedAtGte() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены сделки или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** null|\DateTime - Время создания, от (включительно) #### public hasCreatedAtGte() : bool ```php public hasCreatedAtGte() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setCreatedAtGte() : self ```php public setCreatedAtGte(\DateTime|string|null $created_at_gte) : self ``` **Summary** Устанавливает дату создания от которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at_gte | Дата | **Returns:** self - #### public getCreatedAtGt() : null|\DateTime ```php public getCreatedAtGt() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены сделки или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** null|\DateTime - Время создания, от (не включая) #### public hasCreatedAtGt() : bool ```php public hasCreatedAtGt() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setCreatedAtGt() : self ```php public setCreatedAtGt(\DateTime|string|null $created_at_gt) : self ``` **Summary** Устанавливает дату создания от которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at_gt | Дата | **Returns:** self - #### public getCreatedAtLte() : null|\DateTime ```php public getCreatedAtLte() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены сделки или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** null|\DateTime - Время создания, до (включительно) #### public hasCreatedAtLte() : bool ```php public hasCreatedAtLte() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setCreatedAtLte() : self ```php public setCreatedAtLte(\DateTime|string|null $created_at_lte) : self ``` **Summary** Устанавливает дату создания до которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at_lte | Дата | **Returns:** self - #### public getCreatedAtLt() : null|\DateTime ```php public getCreatedAtLt() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены сделки или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** null|\DateTime - Время создания, до (не включая) #### public hasCreatedAtLt() : bool ```php public hasCreatedAtLt() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setCreatedAtLt() : self ```php public setCreatedAtLt(\DateTime|string|null $created_at_lt) : self ``` **Summary** Устанавливает дату создания до которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at_lt | Дата | **Returns:** self - #### public getExpiresAtGte() : null|\DateTime ```php public getExpiresAtGte() : null|\DateTime ``` **Summary** Возвращает дату автоматического закрытия от которой будут возвращены сделки или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** null|\DateTime - Время автоматического закрытия, от (включительно) #### public hasExpiresAtGte() : bool ```php public hasExpiresAtGte() : bool ``` **Summary** Проверяет, была ли установлена дата автоматического закрытия от которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setExpiresAtGte() : self ```php public setExpiresAtGte(\DateTime|string|null $expires_at_gte) : self ``` **Summary** Устанавливает дату автоматического закрытия от которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at_gte | Дата | **Returns:** self - #### public getExpiresAtGt() : null|\DateTime ```php public getExpiresAtGt() : null|\DateTime ``` **Summary** Возвращает дату автоматического закрытия от которой будут возвращены сделки или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** null|\DateTime - Время автоматического закрытия, от (не включая) #### public hasExpiresAtGt() : bool ```php public hasExpiresAtGt() : bool ``` **Summary** Проверяет, была ли установлена дата автоматического закрытия от которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setExpiresAtGt() : self ```php public setExpiresAtGt(\DateTime|string|null $expires_at_lt) : self ``` **Summary** Устанавливает дату автоматического закрытия от которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at_lt | Дата автоматического закрытия | **Returns:** self - #### public getExpiresAtLte() : null|\DateTime ```php public getExpiresAtLte() : null|\DateTime ``` **Summary** Возвращает дату автоматического закрытия до которой будут возвращены сделки или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** null|\DateTime - Время автоматического закрытия, до (включительно) #### public hasExpiresAtLte() : bool ```php public hasExpiresAtLte() : bool ``` **Summary** Проверяет, была ли установлена дата автоматического закрытия до которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setExpiresAtLte() : self ```php public setExpiresAtLte(\DateTime|string|null $expires_at_lte) : self ``` **Summary** Устанавливает дату автоматического закрытия до которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at_lte | Дата автоматического закрытия | **Returns:** self - #### public getExpiresAtLt() : null|\DateTime ```php public getExpiresAtLt() : null|\DateTime ``` **Summary** Возвращает дату автоматического закрытия до которой будут возвращены сделки или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** null|\DateTime - Время автоматического закрытия, до (не включая) #### public hasExpiresAtLt() : bool ```php public hasExpiresAtLt() : bool ``` **Summary** Проверяет, была ли установлена автоматического закрытия до которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setExpiresAtLt() : self ```php public setExpiresAtLt(\DateTime|string|null $expires_at_lt) : self ``` **Summary** Устанавливает дату автоматического закрытия до которой выбираются сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at_lt | Дата автоматического закрытия | **Returns:** self - #### public getLimit() : null|int ```php public getLimit() : null|int ``` **Summary** Возвращает ограничение количества объектов сделок или null, если оно до этого не было установлено. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** null|int - Ограничение количества объектов сделок #### public hasLimit() : bool ```php public hasLimit() : bool ``` **Summary** Проверяет, было ли установлено ограничение количества объектов сделок. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** bool - True если ограничение количества объектов сделок было установлено, false если нет #### public setLimit() : self ```php public setLimit(int|null $limit) : self ``` **Summary** Устанавливает ограничение количества объектов сделок. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | limit | Количества объектов сделок на странице | **Returns:** self - #### public getStatus() : null|string ```php public getStatus() : null|string ``` **Summary** Возвращает статус выбираемых сделок или null, если он до этого не был установлен. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** null|string - Статус выбираемых сделок #### public hasStatus() : bool ```php public hasStatus() : bool ``` **Summary** Проверяет, был ли установлен статус выбираемых сделок. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** bool - True если статус был установлен, false если нет #### public setStatus() : self ```php public setStatus(string|null $status) : self ``` **Summary** Устанавливает статус выбираемых сделок. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус сделок | **Returns:** self - #### public getFullTextSearch() : null|string ```php public getFullTextSearch() : null|string ``` **Summary** Возвращает фильтр по описанию сделки или null, если он до этого не был установлен. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** null|string - Фильтр по описанию сделки #### public hasFullTextSearch() : bool ```php public hasFullTextSearch() : bool ``` **Summary** Проверяет, был ли установлен фильтр по описанию сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) **Returns:** bool - True если фильтр по описанию сделки был установлен, false если нет #### public setFullTextSearch() : self ```php public setFullTextSearch(string|null $full_text_search) : self ``` **Summary** Устанавливает фильтр по описанию сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsRequestInterface](../classes/YooKassa-Request-Deals-DealsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | full_text_search | Фильтр по описанию сделки | **Returns:** self - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-SettlementInterface.md000064400000004600150364342670023005 0ustar00# [YooKassa API SDK](../home.md) # Interface: SettlementInterface ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Interface PostReceiptResponseSettlementInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAmount()](../classes/YooKassa-Model-Receipt-SettlementInterface.md#method_getAmount) | | Возвращает размер оплаты. | | public | [getType()](../classes/YooKassa-Model-Receipt-SettlementInterface.md#method_getType) | | Возвращает вид оплаты в чеке (cashless | prepayment | postpayment | consideration). | --- ### Details * File: [lib/Model/Receipt/SettlementInterface.php](../../lib/Model/Receipt/SettlementInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Вид оплаты в чеке | | property | | Размер оплаты | --- ## Methods #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает вид оплаты в чеке (cashless | prepayment | postpayment | consideration). **Details:** * Inherited From: [\YooKassa\Model\Receipt\SettlementInterface](../classes/YooKassa-Model-Receipt-SettlementInterface.md) **Returns:** string|null - Вид оплаты в чеке #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает размер оплаты. **Details:** * Inherited From: [\YooKassa\Model\Receipt\SettlementInterface](../classes/YooKassa-Model-Receipt-SettlementInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Размер оплаты --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodInstallments.md000064400000055026150364342670027022 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodInstallments ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodInstallments. **Description:** Оплата через сервис «Заплатить по частям» (в кредит или рассрочку). --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodInstallments.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodInstallments.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodInstallments.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodInstallments * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodInstallments](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodInstallments.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PassengerInterface.md000064400000007222150364342670023410 0ustar00# [YooKassa API SDK](../home.md) # Interface: PassengerInterface ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Interface PassengerInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getFirstName()](../classes/YooKassa-Request-Payments-PassengerInterface.md#method_getFirstName) | | Возвращает имя пассажира. | | public | [getLastName()](../classes/YooKassa-Request-Payments-PassengerInterface.md#method_getLastName) | | Возвращает фамилию пассажира. | | public | [setFirstName()](../classes/YooKassa-Request-Payments-PassengerInterface.md#method_setFirstName) | | Устанавливает имя пассажира. | | public | [setLastName()](../classes/YooKassa-Request-Payments-PassengerInterface.md#method_setLastName) | | Устанавливает фамилию пассажира. | --- ### Details * File: [lib/Request/Payments/PassengerInterface.php](../../lib/Request/Payments/PassengerInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Имя пассажира | | property | | Имя пассажира | | property | | Фамилия пассажира | | property | | Фамилия пассажира | --- ## Methods #### public getFirstName() : ?string ```php public getFirstName() : ?string ``` **Summary** Возвращает имя пассажира. **Details:** * Inherited From: [\YooKassa\Request\Payments\PassengerInterface](../classes/YooKassa-Request-Payments-PassengerInterface.md) **Returns:** ?string - #### public setFirstName() : self ```php public setFirstName(string|null $value) : self ``` **Summary** Устанавливает имя пассажира. **Details:** * Inherited From: [\YooKassa\Request\Payments\PassengerInterface](../classes/YooKassa-Request-Payments-PassengerInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Имя пассажира | **Returns:** self - #### public getLastName() : ?string ```php public getLastName() : ?string ``` **Summary** Возвращает фамилию пассажира. **Details:** * Inherited From: [\YooKassa\Request\Payments\PassengerInterface](../classes/YooKassa-Request-Payments-PassengerInterface.md) **Returns:** ?string - #### public setLastName() : self ```php public setLastName(string|null $value) : self ``` **Summary** Устанавливает фамилию пассажира. **Details:** * Inherited From: [\YooKassa\Request\Payments\PassengerInterface](../classes/YooKassa-Request-Payments-PassengerInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Фамилия пассажира | **Returns:** self - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-HttpVerb.md000064400000012101150364342670017370 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\HttpVerb ### Namespace: [\YooKassa\Common](../namespaces/yookassa-common.md) --- **Summary:** Класс, представляющий модель HttpVerb. **Description:** Список доступных методов HTTP запроса. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [GET](../classes/YooKassa-Common-HttpVerb.md#constant_GET) | | Http метод GET | | public | [POST](../classes/YooKassa-Common-HttpVerb.md#constant_POST) | | Http метод POST | | public | [PATCH](../classes/YooKassa-Common-HttpVerb.md#constant_PATCH) | | Http метод PATCH | | public | [HEAD](../classes/YooKassa-Common-HttpVerb.md#constant_HEAD) | | Http метод HEAD | | public | [OPTIONS](../classes/YooKassa-Common-HttpVerb.md#constant_OPTIONS) | | Http метод OPTIONS | | public | [PUT](../classes/YooKassa-Common-HttpVerb.md#constant_PUT) | | Http метод PUT | | public | [DELETE](../classes/YooKassa-Common-HttpVerb.md#constant_DELETE) | | Http метод DELETE | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Common-HttpVerb.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Common/HttpVerb.php](../../lib/Common/HttpVerb.php) * Package: YooKassa * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Common\HttpVerb * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### GET Http метод GET ```php GET = 'GET' ``` ###### POST Http метод POST ```php POST = 'POST' ``` ###### PATCH Http метод PATCH ```php PATCH = 'PATCH' ``` ###### HEAD Http метод HEAD ```php HEAD = 'HEAD' ``` ###### OPTIONS Http метод OPTIONS ```php OPTIONS = 'OPTIONS' ``` ###### PUT Http метод PUT ```php PUT = 'PUT' ``` ###### DELETE Http метод DELETE ```php DELETE = 'DELETE' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Refunds-RefundsRequestSerializer.md000064400000004512150364342670024456 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Refunds\RefundsRequestSerializer ### Namespace: [\YooKassa\Request\Refunds](../namespaces/yookassa-request-refunds.md) --- **Summary:** Класс, представляющий модель RefundsRequestSerializer. **Description:** Класс сериализатора объектов запросов к API для получения списка возвратов. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [serialize()](../classes/YooKassa-Request-Refunds-RefundsRequestSerializer.md#method_serialize) | | Сериализует объект запроса к API для дальнейшей его отправки. | --- ### Details * File: [lib/Request/Refunds/RefundsRequestSerializer.php](../../lib/Request/Refunds/RefundsRequestSerializer.php) * Package: YooKassa\Request * Class Hierarchy: * \YooKassa\Request\Refunds\RefundsRequestSerializer * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public serialize() : array ```php public serialize(\YooKassa\Request\Refunds\RefundsRequestInterface $request) : array ``` **Summary** Сериализует объект запроса к API для дальнейшей его отправки. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestSerializer](../classes/YooKassa-Request-Refunds-RefundsRequestSerializer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Refunds\RefundsRequestInterface | request | Сериализуемый объект | **Returns:** array - Массив с информацией, отправляемый в дальнейшем в API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Metadata.md000064400000031116150364342670017171 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Metadata ### Namespace: [\YooKassa\Model](../namespaces/yookassa-model.md) --- **Summary:** Metadata - Метаданные платежа указанные мерчантом. **Description:** Мерчант может добавлять произвольные данные к платежам в виде набора пар ключ-значение. Имена ключей уникальны. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [count()](../classes/YooKassa-Model-Metadata.md#method_count) | | Возвращает количество метаданных. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getIterator()](../classes/YooKassa-Model-Metadata.md#method_getIterator) | | Возвращает объект ArrayIterator для метаданных. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Model-Metadata.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Metadata.php](../../lib/Model/Metadata.php) * Package: Default * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Metadata * Implements: * [](\IteratorAggregate) * [](\Countable) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public count() : int ```php public count() : int ``` **Summary** Возвращает количество метаданных. **Details:** * Inherited From: [\YooKassa\Model\Metadata](../classes/YooKassa-Model-Metadata.md) **Returns:** int - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getIterator() : \Iterator ```php public getIterator() : \Iterator ``` **Summary** Возвращает объект ArrayIterator для метаданных. **Details:** * Inherited From: [\YooKassa\Model\Metadata](../classes/YooKassa-Model-Metadata.md) **Returns:** \Iterator - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Model\Metadata](../classes/YooKassa-Model-Metadata.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-CreatePaymentRequest.md000064400000236372150364342670023764 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\CreatePaymentRequest ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель CreateCaptureRequest. **Description:** Класс объекта запроса к API на проведение нового платежа. --- ### Examples Пример использования билдера ```php try { $builder = \YooKassa\Request\Payments\CreatePaymentRequest::builder(); $builder->setAmount(100) ->setCurrency(\YooKassa\Model\CurrencyCode::RUB) ->setCapture(true) ->setDescription('Оплата заказа 112233') ->setMetadata([ 'cms_name' => 'yoo_api_test', 'order_id' => '112233', 'language' => 'ru', 'transaction_id' => '123-456-789', ]) ; // Устанавливаем страницу для редиректа после оплаты $builder->setConfirmation([ 'type' => \YooKassa\Model\Payment\ConfirmationType::REDIRECT, 'returnUrl' => 'https://merchant-site.ru/payment-return-page', ]); // Можем установить конкретный способ оплаты $builder->setPaymentMethodData(\YooKassa\Model\Payment\PaymentMethodType::BANK_CARD); // Составляем чек $builder->setReceiptEmail('john.doe@merchant.com'); $builder->setReceiptPhone('71111111111'); // Добавим товар $builder->addReceiptItem( 'Платок Gucci', 3000, 1.0, 2, 'full_payment', 'commodity' ); // Добавим доставку $builder->addReceiptShipping( 'Delivery/Shipping/Доставка', 100, 1, \YooKassa\Model\Receipt\PaymentMode::FULL_PAYMENT, \YooKassa\Model\Receipt\PaymentSubject::SERVICE ); // Можно добавить распределение денег по магазинам $builder->setTransfers([ [ 'account_id' => '1b68e7b15f3f', 'amount' => [ 'value' => 1000, 'currency' => \YooKassa\Model\CurrencyCode::RUB, ], ], [ 'account_id' => '0c37205b3208', 'amount' => [ 'value' => 2000, 'currency' => \YooKassa\Model\CurrencyCode::RUB, ], ], ]); // Создаем объект запроса $request = $builder->build(); // Можно изменить данные, если нужно $request->setDescription($request->getDescription() . ' - merchant comment'); $idempotenceKey = uniqid('', true); $response = $client->createPayment($request, $idempotenceKey); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_PAYMENT_TOKEN](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#constant_MAX_LENGTH_PAYMENT_TOKEN) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$airline](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property_airline) | | Объект с данными для продажи авиабилетов | | public | [$amount](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_amount) | | Сумма создаваемого платежа | | public | [$amount](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property_amount) | | Сумма | | public | [$capture](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_capture) | | Автоматически принять поступившую оплату | | public | [$client_ip](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_client_ip) | | IPv4 или IPv6-адрес покупателя. Если не указан, используется IP-адрес TCP-подключения | | public | [$clientIp](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_clientIp) | | IPv4 или IPv6-адрес покупателя. Если не указан, используется IP-адрес TCP-подключения | | public | [$confirmation](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_confirmation) | | Способ подтверждения платежа | | public | [$deal](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_deal) | | Данные о сделке, в составе которой проходит платеж | | public | [$description](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_description) | | Описание транзакции | | public | [$fraud_data](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_fraud_data) | | Информация для проверки операции на мошенничество | | public | [$fraudData](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_fraudData) | | Информация для проверки операции на мошенничество | | public | [$merchant_customer_id](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_merchant_customer_id) | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | public | [$merchantCustomerId](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_merchantCustomerId) | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | public | [$metadata](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_metadata) | | Метаданные привязанные к платежу | | public | [$payment_method_data](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_payment_method_data) | | Данные используемые для создания метода оплаты | | public | [$payment_method_id](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_payment_method_id) | | Идентификатор записи о сохраненных платежных данных покупателя | | public | [$payment_token](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_payment_token) | | Одноразовый токен для проведения оплаты, сформированный YooKassa JS widget | | public | [$paymentMethodData](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_paymentMethodData) | | Данные используемые для создания метода оплаты | | public | [$paymentMethodId](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_paymentMethodId) | | Идентификатор записи о сохраненных платежных данных покупателя | | public | [$paymentToken](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_paymentToken) | | Одноразовый токен для проведения оплаты, сформированный YooKassa JS widget | | public | [$receipt](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_receipt) | | Данные фискального чека 54-ФЗ | | public | [$receipt](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property_receipt) | | Данные фискального чека 54-ФЗ | | public | [$recipient](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_recipient) | | Получатель платежа, если задан | | public | [$save_payment_method](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_save_payment_method) | | Сохранить платежные данные для последующего использования. Значение true инициирует создание многоразового payment_method | | public | [$savePaymentMethod](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#property_savePaymentMethod) | | Сохранить платежные данные для последующего использования. Значение true инициирует создание многоразового payment_method | | public | [$transfers](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property_transfers) | | Данные о распределении платежа между магазинами | | protected | [$_airline](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property__airline) | | | | protected | [$_amount](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property__amount) | | | | protected | [$_receipt](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property__receipt) | | | | protected | [$_transfers](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property__transfers) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [builder()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_builder) | | Возвращает билдер объектов запросов создания платежа. | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAirline()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_getAirline) | | Возвращает данные авиабилетов. | | public | [getAmount()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_getAmount) | | Возвращает сумму оплаты. | | public | [getCapture()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_getCapture) | | Возвращает флаг автоматического принятия поступившей оплаты. | | public | [getClientIp()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_getClientIp) | | Возвращает IPv4 или IPv6-адрес покупателя. | | public | [getConfirmation()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_getConfirmation) | | Возвращает способ подтверждения платежа. | | public | [getDeal()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_getDeal) | | Возвращает данные о сделке, в составе которой проходит платеж. | | public | [getDescription()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_getDescription) | | Возвращает описание транзакции | | public | [getFraudData()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_getFraudData) | | Возвращает информацию для проверки операции на мошенничество. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [getMerchantCustomerId()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_getMerchantCustomerId) | | Возвращает идентификатор покупателя в вашей системе. | | public | [getMetadata()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_getMetadata) | | Возвращает данные оплаты установленные мерчантом | | public | [getPaymentMethodData()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_getPaymentMethodData) | | Возвращает данные для создания метода оплаты. | | public | [getPaymentMethodId()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_getPaymentMethodId) | | Устанавливает идентификатор записи платёжных данных покупателя. | | public | [getPaymentToken()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_getPaymentToken) | | Возвращает одноразовый токен для проведения оплаты. | | public | [getReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_getReceipt) | | Возвращает чек, если он есть. | | public | [getRecipient()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_getRecipient) | | Возвращает объект получателя платежа. | | public | [getSavePaymentMethod()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_getSavePaymentMethod) | | Возвращает флаг сохранения платёжных данных. | | public | [getTransfers()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_getTransfers) | | Возвращает данные о распределении денег — сколько и в какой магазин нужно перевести. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasAirline()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_hasAirline) | | Проверяет, были ли установлены данные авиабилетов. | | public | [hasAmount()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_hasAmount) | | Проверяет, была ли установлена сумма оплаты. | | public | [hasCapture()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_hasCapture) | | Проверяет, был ли установлен флаг автоматического принятия поступившей оплаты. | | public | [hasClientIp()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_hasClientIp) | | Проверяет, был ли установлен IPv4 или IPv6-адрес покупателя. | | public | [hasConfirmation()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_hasConfirmation) | | Проверяет, был ли установлен способ подтверждения платежа. | | public | [hasDeal()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_hasDeal) | | Проверяет, были ли установлены данные о сделке. | | public | [hasDescription()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_hasDescription) | | Проверяет наличие описания транзакции в создаваемом платеже. | | public | [hasFraudData()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_hasFraudData) | | Проверяет, была ли установлена информация для проверки операции на мошенничество. | | public | [hasMerchantCustomerId()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_hasMerchantCustomerId) | | Проверяет, был ли установлен идентификатор покупателя в вашей системе. | | public | [hasMetadata()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_hasMetadata) | | Проверяет, были ли установлены метаданные заказа. | | public | [hasPaymentMethodData()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_hasPaymentMethodData) | | Проверяет установлен ли объект с методом оплаты. | | public | [hasPaymentMethodId()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_hasPaymentMethodId) | | Проверяет наличие идентификатора записи о платёжных данных покупателя. | | public | [hasPaymentToken()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_hasPaymentToken) | | Проверяет наличие одноразового токена для проведения оплаты. | | public | [hasReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_hasReceipt) | | Проверяет наличие чека. | | public | [hasRecipient()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_hasRecipient) | | Проверяет наличие получателя платежа в запросе. | | public | [hasSavePaymentMethod()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_hasSavePaymentMethod) | | Проверяет, был ли установлен флаг сохранения платёжных данных. | | public | [hasTransfers()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_hasTransfers) | | Проверяет наличие данных о распределении денег. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [removeReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_removeReceipt) | | Удаляет чек из запроса. | | public | [setAirline()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_setAirline) | | Устанавливает данные авиабилетов. | | public | [setAmount()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_setAmount) | | Устанавливает сумму оплаты. | | public | [setCapture()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_setCapture) | | Устанавливает флаг автоматического принятия поступившей оплаты. | | public | [setClientIp()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_setClientIp) | | Устанавливает IP адрес покупателя. | | public | [setConfirmation()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_setConfirmation) | | Устанавливает способ подтверждения платежа. | | public | [setDeal()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_setDeal) | | Устанавливает данные о сделке, в составе которой проходит платеж. | | public | [setDescription()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_setDescription) | | Устанавливает описание транзакции | | public | [setFraudData()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_setFraudData) | | Устанавливает информацию для проверки операции на мошенничество. | | public | [setMerchantCustomerId()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_setMerchantCustomerId) | | Устанавливает идентификатор покупателя в вашей системе. | | public | [setMetadata()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_setMetadata) | | Устанавливает метаданные, привязанные к платежу. | | public | [setPaymentMethodData()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_setPaymentMethodData) | | Устанавливает объект с информацией для создания метода оплаты. | | public | [setPaymentMethodId()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_setPaymentMethodId) | | Устанавливает идентификатор записи о сохранённых данных покупателя. | | public | [setPaymentToken()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_setPaymentToken) | | Устанавливает одноразовый токен для проведения оплаты, сформированный YooKassa JS widget. | | public | [setReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_setReceipt) | | Устанавливает чек. | | public | [setRecipient()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_setRecipient) | | Устанавливает объект с информацией о получателе платежа. | | public | [setSavePaymentMethod()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_setSavePaymentMethod) | | Устанавливает флаг сохранения платёжных данных. Значение true инициирует создание многоразового payment_method. | | public | [setTransfers()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_setTransfers) | | Устанавливает transfers (массив распределения денег между магазинами). | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | public | [validate()](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md#method_validate) | | Проверяет на валидность текущий объект | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_setValidationError) | | Устанавливает ошибку валидации. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/CreatePaymentRequest.php](../../lib/Request/Payments/CreatePaymentRequest.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) * [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) * \YooKassa\Request\Payments\CreatePaymentRequest * Implements: * [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_PAYMENT_TOKEN ```php MAX_LENGTH_PAYMENT_TOKEN = 10240 ``` --- ## Properties #### public $airline : \YooKassa\Request\Payments\AirlineInterface|null --- ***Description*** Объект с данными для продажи авиабилетов **Type:** AirlineInterface|null **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма создаваемого платежа **Type:** AmountInterface **Details:** #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) #### public $capture : bool --- ***Description*** Автоматически принять поступившую оплату **Type:** bool **Details:** #### public $client_ip : string --- ***Description*** IPv4 или IPv6-адрес покупателя. Если не указан, используется IP-адрес TCP-подключения **Type:** string **Details:** #### public $clientIp : string --- ***Description*** IPv4 или IPv6-адрес покупателя. Если не указан, используется IP-адрес TCP-подключения **Type:** string **Details:** #### public $confirmation : \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes --- ***Description*** Способ подтверждения платежа **Type:** AbstractConfirmationAttributes **Details:** #### public $deal : \YooKassa\Model\Deal\PaymentDealInfo --- ***Description*** Данные о сделке, в составе которой проходит платеж **Type:** PaymentDealInfo **Details:** #### public $description : string --- ***Description*** Описание транзакции **Type:** string **Details:** #### public $fraud_data : \YooKassa\Request\Payments\FraudData --- ***Description*** Информация для проверки операции на мошенничество **Type:** FraudData **Details:** #### public $fraudData : \YooKassa\Request\Payments\FraudData --- ***Description*** Информация для проверки операции на мошенничество **Type:** FraudData **Details:** #### public $merchant_customer_id : string --- ***Description*** Идентификатор покупателя в вашей системе, например электронная почта или номер телефона **Type:** string **Details:** #### public $merchantCustomerId : string --- ***Description*** Идентификатор покупателя в вашей системе, например электронная почта или номер телефона **Type:** string **Details:** #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные привязанные к платежу **Type:** Metadata **Details:** #### public $payment_method_data : \YooKassa\Request\Payments\PaymentData\AbstractPaymentData --- ***Description*** Данные используемые для создания метода оплаты **Type:** AbstractPaymentData **Details:** #### public $payment_method_id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных покупателя **Type:** string **Details:** #### public $payment_token : string --- ***Description*** Одноразовый токен для проведения оплаты, сформированный YooKassa JS widget **Type:** string **Details:** #### public $paymentMethodData : \YooKassa\Request\Payments\PaymentData\AbstractPaymentData --- ***Description*** Данные используемые для создания метода оплаты **Type:** AbstractPaymentData **Details:** #### public $paymentMethodId : string --- ***Description*** Идентификатор записи о сохраненных платежных данных покупателя **Type:** string **Details:** #### public $paymentToken : string --- ***Description*** Одноразовый токен для проведения оплаты, сформированный YooKassa JS widget **Type:** string **Details:** #### public $receipt : \YooKassa\Model\Receipt\ReceiptInterface --- ***Description*** Данные фискального чека 54-ФЗ **Type:** ReceiptInterface **Details:** #### public $receipt : \YooKassa\Model\Receipt\ReceiptInterface|null --- ***Description*** Данные фискального чека 54-ФЗ **Type:** ReceiptInterface|null **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) #### public $recipient : \YooKassa\Model\Payment\RecipientInterface --- ***Description*** Получатель платежа, если задан **Type:** RecipientInterface **Details:** #### public $save_payment_method : bool|null --- ***Description*** Сохранить платежные данные для последующего использования. Значение true инициирует создание многоразового payment_method **Type:** bool|null **Details:** #### public $savePaymentMethod : bool|null --- ***Description*** Сохранить платежные данные для последующего использования. Значение true инициирует создание многоразового payment_method **Type:** bool|null **Details:** #### public $transfers : \YooKassa\Common\ListObjectInterface|\YooKassa\Request\Payments\TransferDataInterface[]|null --- ***Description*** Данные о распределении платежа между магазинами **Type:** TransferDataInterface[]|null **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) #### protected $_airline : ?\YooKassa\Request\Payments\AirlineInterface --- **Type:** AirlineInterface Объект с данными для продажи авиабилетов **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface Сумма оплаты **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) #### protected $_receipt : ?\YooKassa\Model\Receipt\ReceiptInterface --- **Type:** ReceiptInterface Данные фискального чека 54-ФЗ **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) #### protected $_transfers : ?\YooKassa\Common\ListObject --- **Type:** ListObject **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public builder() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php Static public builder() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Возвращает билдер объектов запросов создания платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс билдера объектов запросов #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAirline() : null|\YooKassa\Request\Payments\AirlineInterface ```php public getAirline() : null|\YooKassa\Request\Payments\AirlineInterface ``` **Summary** Возвращает данные авиабилетов. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** null|\YooKassa\Request\Payments\AirlineInterface - Данные авиабилетов #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма оплаты #### public getCapture() : bool ```php public getCapture() : bool ``` **Summary** Возвращает флаг автоматического принятия поступившей оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если требуется автоматически принять поступившую оплату, false если нет #### public getClientIp() : string|null ```php public getClientIp() : string|null ``` **Summary** Возвращает IPv4 или IPv6-адрес покупателя. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** string|null - IPv4 или IPv6-адрес покупателя #### public getConfirmation() : \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes|null ```php public getConfirmation() : \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes|null ``` **Summary** Возвращает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes|null - Способ подтверждения платежа #### public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ``` **Summary** Возвращает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** \YooKassa\Model\Deal\PaymentDealInfo|null - Данные о сделке, в составе которой проходит платеж #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** string|null - #### public getFraudData() : null|\YooKassa\Request\Payments\FraudData ```php public getFraudData() : null|\YooKassa\Request\Payments\FraudData ``` **Summary** Возвращает информацию для проверки операции на мошенничество. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** null|\YooKassa\Request\Payments\FraudData - Информация для проверки операции на мошенничество #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string|null - Последняя произошедшая ошибка валидации #### public getMerchantCustomerId() : string|null ```php public getMerchantCustomerId() : string|null ``` **Summary** Возвращает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** string|null - Идентификатор покупателя в вашей системе #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает данные оплаты установленные мерчантом **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные, привязанные к платежу #### public getPaymentMethodData() : \YooKassa\Request\Payments\PaymentData\AbstractPaymentData|null ```php public getPaymentMethodData() : \YooKassa\Request\Payments\PaymentData\AbstractPaymentData|null ``` **Summary** Возвращает данные для создания метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** \YooKassa\Request\Payments\PaymentData\AbstractPaymentData|null - Данные используемые для создания метода оплаты #### public getPaymentMethodId() : string|null ```php public getPaymentMethodId() : string|null ``` **Summary** Устанавливает идентификатор записи платёжных данных покупателя. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** string|null - Идентификатор записи о сохраненных платежных данных покупателя #### public getPaymentToken() : string|null ```php public getPaymentToken() : string|null ``` **Summary** Возвращает одноразовый токен для проведения оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** string|null - Одноразовый токен для проведения оплаты, сформированный YooKassa JS widget #### public getReceipt() : null|\YooKassa\Model\Receipt\ReceiptInterface ```php public getReceipt() : null|\YooKassa\Model\Receipt\ReceiptInterface ``` **Summary** Возвращает чек, если он есть. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** null|\YooKassa\Model\Receipt\ReceiptInterface - Данные фискального чека 54-ФЗ или null, если чека нет #### public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ```php public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ``` **Summary** Возвращает объект получателя платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** null|\YooKassa\Model\Payment\RecipientInterface - Объект с информацией о получателе платежа или null, если получатель не задан #### public getSavePaymentMethod() : bool|null ```php public getSavePaymentMethod() : bool|null ``` **Summary** Возвращает флаг сохранения платёжных данных. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool|null - Флаг сохранения платёжных данных #### public getTransfers() : \YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface ```php public getTransfers() : \YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает данные о распределении денег — сколько и в какой магазин нужно перевести. **Description** Присутствует, если вы используете решение ЮKassa для платформ. (https://yookassa.ru/developers/special-solutions/checkout-for-platforms/basics). **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** \YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface - Данные о распределении денег #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasAirline() : bool ```php public hasAirline() : bool ``` **Summary** Проверяет, были ли установлены данные авиабилетов. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** bool - #### public hasAmount() : bool ```php public hasAmount() : bool ``` **Summary** Проверяет, была ли установлена сумма оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** bool - True если сумма оплаты была установлена, false если нет #### public hasCapture() : bool ```php public hasCapture() : bool ``` **Summary** Проверяет, был ли установлен флаг автоматического принятия поступившей оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если флаг автоматического принятия оплаты был установлен, false если нет #### public hasClientIp() : bool ```php public hasClientIp() : bool ``` **Summary** Проверяет, был ли установлен IPv4 или IPv6-адрес покупателя. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если IP адрес покупателя был установлен, false если нет #### public hasConfirmation() : bool ```php public hasConfirmation() : bool ``` **Summary** Проверяет, был ли установлен способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если способ подтверждения платежа был установлен, false если нет #### public hasDeal() : bool ```php public hasDeal() : bool ``` **Summary** Проверяет, были ли установлены данные о сделке. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если данные о сделке были установлены, false если нет #### public hasDescription() : bool ```php public hasDescription() : bool ``` **Summary** Проверяет наличие описания транзакции в создаваемом платеже. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если описание транзакции есть, false если нет #### public hasFraudData() : bool ```php public hasFraudData() : bool ``` **Summary** Проверяет, была ли установлена информация для проверки операции на мошенничество. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если информация была установлена, false если нет #### public hasMerchantCustomerId() : bool ```php public hasMerchantCustomerId() : bool ``` **Summary** Проверяет, был ли установлен идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если идентификатор покупателя был установлен, false если нет #### public hasMetadata() : bool ```php public hasMetadata() : bool ``` **Summary** Проверяет, были ли установлены метаданные заказа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если метаданные были установлены, false если нет #### public hasPaymentMethodData() : bool ```php public hasPaymentMethodData() : bool ``` **Summary** Проверяет установлен ли объект с методом оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если объект метода оплаты установлен, false если нет #### public hasPaymentMethodId() : bool ```php public hasPaymentMethodId() : bool ``` **Summary** Проверяет наличие идентификатора записи о платёжных данных покупателя. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если идентификатор задан, false если нет #### public hasPaymentToken() : bool ```php public hasPaymentToken() : bool ``` **Summary** Проверяет наличие одноразового токена для проведения оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если токен установлен, false если нет #### public hasReceipt() : bool ```php public hasReceipt() : bool ``` **Summary** Проверяет наличие чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** bool - True если чек есть, false если нет #### public hasRecipient() : bool ```php public hasRecipient() : bool ``` **Summary** Проверяет наличие получателя платежа в запросе. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если получатель платежа задан, false если нет #### public hasSavePaymentMethod() : bool ```php public hasSavePaymentMethod() : bool ``` **Summary** Проверяет, был ли установлен флаг сохранения платёжных данных. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если флаг был установлен, false если нет #### public hasTransfers() : bool ```php public hasTransfers() : bool ``` **Summary** Проверяет наличие данных о распределении денег. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** bool - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public removeReceipt() : self ```php public removeReceipt() : self ``` **Summary** Удаляет чек из запроса. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** self - #### public setAirline() : \YooKassa\Common\AbstractRequestInterface ```php public setAirline(\YooKassa\Request\Payments\AirlineInterface|array|null $airline) : \YooKassa\Common\AbstractRequestInterface ``` **Summary** Устанавливает данные авиабилетов. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Payments\AirlineInterface OR array OR null | airline | Данные авиабилетов | **Returns:** \YooKassa\Common\AbstractRequestInterface - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|string $amount = null) : self ``` **Summary** Устанавливает сумму оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR string | amount | Сумма оплаты | **Returns:** self - #### public setCapture() : self ```php public setCapture(bool $capture) : self ``` **Summary** Устанавливает флаг автоматического принятия поступившей оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | capture | Автоматически принять поступившую оплату | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если переданный аргумент не кастится в bool | **Returns:** self - #### public setClientIp() : self ```php public setClientIp(string|null $client_ip) : self ``` **Summary** Устанавливает IP адрес покупателя. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | client_ip | IPv4 или IPv6-адрес покупателя | **Returns:** self - #### public setConfirmation() : self ```php public setConfirmation(null|array|\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes $confirmation) : self ``` **Summary** Устанавливает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes | confirmation | Способ подтверждения платежа | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданное значение не является объектом типа AbstractConfirmationAttributes или null | **Returns:** self - #### public setDeal() : self ```php public setDeal(null|array|\YooKassa\Model\Deal\PaymentDealInfo $deal) : self ``` **Summary** Устанавливает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\PaymentDealInfo | deal | Данные о сделке, в составе которой проходит платеж | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданные данные не удалось интерпретировать как метаданные платежа | **Returns:** self - #### public setDescription() : \YooKassa\Request\Payments\CreatePaymentRequest ```php public setDescription(string|null $description) : \YooKassa\Request\Payments\CreatePaymentRequest ``` **Summary** Устанавливает описание транзакции **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequest - #### public setFraudData() : self ```php public setFraudData(null|array|\YooKassa\Request\Payments\FraudData $fraud_data = null) : self ``` **Summary** Устанавливает информацию для проверки операции на мошенничество. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Payments\FraudData | fraud_data | Информация для проверки операции на мошенничество | **Returns:** self - #### public setMerchantCustomerId() : self ```php public setMerchantCustomerId(string|null $merchant_customer_id) : self ``` **Summary** Устанавливает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | merchant_customer_id | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(null|array|\YooKassa\Model\Metadata $metadata) : self ``` **Summary** Устанавливает метаданные, привязанные к платежу. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Metadata | metadata | Метаданные платежа, устанавливаемые мерчантом | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданные данные не удалось интерпретировать как метаданные платежа | **Returns:** self - #### public setPaymentMethodData() : self ```php public setPaymentMethodData(null|array|\YooKassa\Request\Payments\PaymentData\AbstractPaymentData $payment_method_data) : self ``` **Summary** Устанавливает объект с информацией для создания метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Payments\PaymentData\AbstractPaymentData | payment_method_data | Объект создания метода оплаты или null | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если был передан объект невалидного типа | **Returns:** self - #### public setPaymentMethodId() : self ```php public setPaymentMethodId(string|null $payment_method_id) : self ``` **Summary** Устанавливает идентификатор записи о сохранённых данных покупателя. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_method_id | Идентификатор записи о сохраненных платежных данных покупателя | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если переданные значение не является строкой или null | **Returns:** self - #### public setPaymentToken() : self ```php public setPaymentToken(string|null $payment_token) : self ``` **Summary** Устанавливает одноразовый токен для проведения оплаты, сформированный YooKassa JS widget. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_token | Одноразовый токен для проведения оплаты | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если переданное значение превышает допустимую длину | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданное значение не является строкой | **Returns:** self - #### public setReceipt() : self ```php public setReceipt(null|array|\YooKassa\Model\Receipt\ReceiptInterface $receipt) : self ``` **Summary** Устанавливает чек. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Receipt\ReceiptInterface | receipt | Инстанс чека или null для удаления информации о чеке | **Returns:** self - #### public setRecipient() : self ```php public setRecipient(null|array|\YooKassa\Model\Payment\RecipientInterface $recipient) : self ``` **Summary** Устанавливает объект с информацией о получателе платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Payment\RecipientInterface | recipient | Инстанс объекта информации о получателе платежа или null | **Returns:** self - #### public setSavePaymentMethod() : self ```php public setSavePaymentMethod(bool|null $save_payment_method = null) : self ``` **Summary** Устанавливает флаг сохранения платёжных данных. Значение true инициирует создание многоразового payment_method. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | save_payment_method | Сохранить платежные данные для последующего использования | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если переданный аргумент не кастится в bool | **Returns:** self - #### public setTransfers() : self ```php public setTransfers(\YooKassa\Common\ListObjectInterface|array|null $transfers = null) : self ``` **Summary** Устанавливает transfers (массив распределения денег между магазинами). **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | transfers | Массив распределения денег | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public validate() : bool ```php public validate() : bool ``` **Summary** Проверяет на валидность текущий объект **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequest](../classes/YooKassa-Request-Payments-CreatePaymentRequest.md) **Returns:** bool - True если объект запроса валиден, false если нет #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setValidationError() : void ```php protected setValidationError(string $value) : void ``` **Summary** Устанавливает ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** void - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-InvalidRequestException.md000064400000004544150364342670024603 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\InvalidRequestException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-InvalidRequestException.md#method___construct) | | InvalidRequestException constructor. | | public | [getRequestObject()](../classes/YooKassa-Common-Exceptions-InvalidRequestException.md#method_getRequestObject) | | | --- ### Details * File: [lib/Common/Exceptions/InvalidRequestException.php](../../lib/Common/Exceptions/InvalidRequestException.php) * Package: Default * Class Hierarchy: * [\RuntimeException](\RuntimeException) * \YooKassa\Common\Exceptions\InvalidRequestException --- ## Methods #### public __construct() : mixed ```php public __construct(\YooKassa\Common\AbstractRequestInterface|string $error, int $code, ?\Throwable $previous = null) : mixed ``` **Summary** InvalidRequestException constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\InvalidRequestException](../classes/YooKassa-Common-Exceptions-InvalidRequestException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\AbstractRequestInterface OR string | error | | | int | code | | | ?\Throwable | previous | | **Returns:** mixed - #### public getRequestObject() : ?\YooKassa\Common\AbstractRequestInterface ```php public getRequestObject() : ?\YooKassa\Common\AbstractRequestInterface ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\InvalidRequestException](../classes/YooKassa-Common-Exceptions-InvalidRequestException.md) **Returns:** ?\YooKassa\Common\AbstractRequestInterface - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Helpers-ProductCode.md000064400000045473150364342670020241 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Helpers\ProductCode ### Namespace: [\YooKassa\Helpers](../namespaces/yookassa-helpers.md) --- **Summary:** Класс, представляющий модель ProductCode. **Description:** Класс для формирования тега 1162 на основе кода в формате Data Matrix. --- ### Examples Вариант через метод ```php $inputDataMatrix = '010463003407001221SxMGorvNuq6Wk91fgr92sdfsdfghfgjh'; $productCode = new \YooKassa\Helpers\ProductCode($inputDataMatrix); $receiptItem = new \YooKassa\Model\Receipt\ReceiptItem(); $receiptItem->setProductCode($productCode); $receiptItem->setMarkCodeInfo($productCode->getMarkCodeInfo()); var_dump($receiptItem); ``` Вариант через массив ```php $inputDataMatrix = '010463003407001221SxMGorvNuq6Wk91fgr92sdfsdfghfgjh'; $receiptItem = new \YooKassa\Model\Receipt\ReceiptItem([ 'product_code' => (string) ($code = new \YooKassa\Helpers\ProductCode($inputDataMatrix)), 'mark_code_info' => $code->getMarkCodeInfo(), ]); var_dump($receiptItem); ``` --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [PREFIX_DATA_MATRIX](../classes/YooKassa-Helpers-ProductCode.md#constant_PREFIX_DATA_MATRIX) | | | | public | [PREFIX_UNKNOWN](../classes/YooKassa-Helpers-ProductCode.md#constant_PREFIX_UNKNOWN) | | | | public | [PREFIX_EAN_8](../classes/YooKassa-Helpers-ProductCode.md#constant_PREFIX_EAN_8) | | | | public | [PREFIX_EAN_13](../classes/YooKassa-Helpers-ProductCode.md#constant_PREFIX_EAN_13) | | | | public | [PREFIX_ITF_14](../classes/YooKassa-Helpers-ProductCode.md#constant_PREFIX_ITF_14) | | | | public | [PREFIX_FUR](../classes/YooKassa-Helpers-ProductCode.md#constant_PREFIX_FUR) | | | | public | [PREFIX_EGAIS_20](../classes/YooKassa-Helpers-ProductCode.md#constant_PREFIX_EGAIS_20) | | | | public | [PREFIX_EGAIS_30](../classes/YooKassa-Helpers-ProductCode.md#constant_PREFIX_EGAIS_30) | | | | public | [TYPE_UNKNOWN](../classes/YooKassa-Helpers-ProductCode.md#constant_TYPE_UNKNOWN) | | | | public | [TYPE_EAN_8](../classes/YooKassa-Helpers-ProductCode.md#constant_TYPE_EAN_8) | | | | public | [TYPE_EAN_13](../classes/YooKassa-Helpers-ProductCode.md#constant_TYPE_EAN_13) | | | | public | [TYPE_ITF_14](../classes/YooKassa-Helpers-ProductCode.md#constant_TYPE_ITF_14) | | | | public | [TYPE_GS_10](../classes/YooKassa-Helpers-ProductCode.md#constant_TYPE_GS_10) | | | | public | [TYPE_GS_1M](../classes/YooKassa-Helpers-ProductCode.md#constant_TYPE_GS_1M) | | | | public | [TYPE_SHORT](../classes/YooKassa-Helpers-ProductCode.md#constant_TYPE_SHORT) | | | | public | [TYPE_FUR](../classes/YooKassa-Helpers-ProductCode.md#constant_TYPE_FUR) | | | | public | [TYPE_EGAIS_20](../classes/YooKassa-Helpers-ProductCode.md#constant_TYPE_EGAIS_20) | | | | public | [TYPE_EGAIS_30](../classes/YooKassa-Helpers-ProductCode.md#constant_TYPE_EGAIS_30) | | | | public | [AI_GTIN](../classes/YooKassa-Helpers-ProductCode.md#constant_AI_GTIN) | | | | public | [AI_SERIAL](../classes/YooKassa-Helpers-ProductCode.md#constant_AI_SERIAL) | | | | public | [AI_SUM](../classes/YooKassa-Helpers-ProductCode.md#constant_AI_SUM) | | | | public | [MAX_PRODUCT_CODE_LENGTH](../classes/YooKassa-Helpers-ProductCode.md#constant_MAX_PRODUCT_CODE_LENGTH) | | | | public | [MAX_MARK_CODE_LENGTH](../classes/YooKassa-Helpers-ProductCode.md#constant_MAX_MARK_CODE_LENGTH) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Helpers-ProductCode.md#method___construct) | | ProductCode constructor. | | public | [__toString()](../classes/YooKassa-Helpers-ProductCode.md#method___toString) | | Приводит объект к строке. | | public | [calcResult()](../classes/YooKassa-Helpers-ProductCode.md#method_calcResult) | | Формирует тег 1162. | | public | [getAppIdentifiers()](../classes/YooKassa-Helpers-ProductCode.md#method_getAppIdentifiers) | | Возвращает массив дополнительных идентификаторов применения. | | public | [getGtin()](../classes/YooKassa-Helpers-ProductCode.md#method_getGtin) | | Возвращает глобальный номер товарной продукции. | | public | [getMarkCodeInfo()](../classes/YooKassa-Helpers-ProductCode.md#method_getMarkCodeInfo) | | | | public | [getPrefix()](../classes/YooKassa-Helpers-ProductCode.md#method_getPrefix) | | Возвращает код типа маркировки. | | public | [getResult()](../classes/YooKassa-Helpers-ProductCode.md#method_getResult) | | Возвращает сформированный тег 1162. | | public | [getSerial()](../classes/YooKassa-Helpers-ProductCode.md#method_getSerial) | | Возвращает серийный номер товара. | | public | [getType()](../classes/YooKassa-Helpers-ProductCode.md#method_getType) | | Возвращает тип маркировки. | | public | [isUsePrefix()](../classes/YooKassa-Helpers-ProductCode.md#method_isUsePrefix) | | Возвращает флаг использования кода типа маркировки. | | public | [setAppIdentifiers()](../classes/YooKassa-Helpers-ProductCode.md#method_setAppIdentifiers) | | Устанавливает массив дополнительных идентификаторов применения. | | public | [setGtin()](../classes/YooKassa-Helpers-ProductCode.md#method_setGtin) | | Устанавливает глобальный номер товарной продукции. | | public | [setMarkCodeInfo()](../classes/YooKassa-Helpers-ProductCode.md#method_setMarkCodeInfo) | | | | public | [setPrefix()](../classes/YooKassa-Helpers-ProductCode.md#method_setPrefix) | | Устанавливает код типа маркировки. | | public | [setSerial()](../classes/YooKassa-Helpers-ProductCode.md#method_setSerial) | | Устанавливает серийный номер товара. | | public | [setType()](../classes/YooKassa-Helpers-ProductCode.md#method_setType) | | Устанавливает тип маркировки. | | public | [setUsePrefix()](../classes/YooKassa-Helpers-ProductCode.md#method_setUsePrefix) | | Устанавливает флаг использования кода типа маркировки. | | public | [validate()](../classes/YooKassa-Helpers-ProductCode.md#method_validate) | | Проверяет заполненность необходимых свойств. | --- ### Details * File: [lib/Helpers/ProductCode.php](../../lib/Helpers/ProductCode.php) * Package: YooKassa\Model * Class Hierarchy: * \YooKassa\Helpers\ProductCode * See Also: * [](https://yookassa.ru/developers/api) * [](https://git.yoomoney.ru/projects/SDK/repos/yookassa-sdk-php/browse/lib/Helpers/ProductCode.php) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### PREFIX_DATA_MATRIX ```php PREFIX_DATA_MATRIX = '444D' : string ``` ###### PREFIX_UNKNOWN ```php PREFIX_UNKNOWN = '0000' : string ``` ###### PREFIX_EAN_8 ```php PREFIX_EAN_8 = '4508' : string ``` ###### PREFIX_EAN_13 ```php PREFIX_EAN_13 = '450D' : string ``` ###### PREFIX_ITF_14 ```php PREFIX_ITF_14 = '4909' : string ``` ###### PREFIX_FUR ```php PREFIX_FUR = '5246' : string ``` ###### PREFIX_EGAIS_20 ```php PREFIX_EGAIS_20 = 'C514' : string ``` ###### PREFIX_EGAIS_30 ```php PREFIX_EGAIS_30 = 'C51E' : string ``` ###### TYPE_UNKNOWN ```php TYPE_UNKNOWN = 'unknown' : string ``` ###### TYPE_EAN_8 ```php TYPE_EAN_8 = 'ean_8' : string ``` ###### TYPE_EAN_13 ```php TYPE_EAN_13 = 'ean_13' : string ``` ###### TYPE_ITF_14 ```php TYPE_ITF_14 = 'itf_14' : string ``` ###### TYPE_GS_10 ```php TYPE_GS_10 = 'gs_10' : string ``` ###### TYPE_GS_1M ```php TYPE_GS_1M = 'gs_1m' : string ``` ###### TYPE_SHORT ```php TYPE_SHORT = 'short' : string ``` ###### TYPE_FUR ```php TYPE_FUR = 'fur' : string ``` ###### TYPE_EGAIS_20 ```php TYPE_EGAIS_20 = 'egais_20' : string ``` ###### TYPE_EGAIS_30 ```php TYPE_EGAIS_30 = 'egais_30' : string ``` ###### AI_GTIN ```php AI_GTIN = '01' : string ``` ###### AI_SERIAL ```php AI_SERIAL = '21' : string ``` ###### AI_SUM ```php AI_SUM = '8005' : string ``` ###### MAX_PRODUCT_CODE_LENGTH ```php MAX_PRODUCT_CODE_LENGTH = 30 : int ``` ###### MAX_MARK_CODE_LENGTH ```php MAX_MARK_CODE_LENGTH = 32 : int ``` --- ## Methods #### public __construct() : mixed ```php public __construct(null|string $codeDataMatrix = null, bool|string $usePrefix = true) : mixed ``` **Summary** ProductCode constructor. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | codeDataMatrix | Строка, расшифрованная из QR-кода | | bool OR string | usePrefix | Нужен ли код типа маркировки в результате | **Returns:** mixed - #### public __toString() : string ```php public __toString() : string ``` **Summary** Приводит объект к строке. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) **Returns:** string - #### public calcResult() : string ```php public calcResult() : string ``` **Summary** Формирует тег 1162. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) **Returns:** string - Сформированный тег 1162 #### public getAppIdentifiers() : null|array ```php public getAppIdentifiers() : null|array ``` **Summary** Возвращает массив дополнительных идентификаторов применения. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) **Returns:** null|array - Массив дополнительных идентификаторов применения #### public getGtin() : string|null ```php public getGtin() : string|null ``` **Summary** Возвращает глобальный номер товарной продукции. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) **Returns:** string|null - Глобальный номер товарной продукции #### public getMarkCodeInfo() : ?\YooKassa\Model\Receipt\MarkCodeInfo ```php public getMarkCodeInfo() : ?\YooKassa\Model\Receipt\MarkCodeInfo ``` **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) **Returns:** ?\YooKassa\Model\Receipt\MarkCodeInfo - #### public getPrefix() : ?string ```php public getPrefix() : ?string ``` **Summary** Возвращает код типа маркировки. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) **Returns:** ?string - Код типа маркировки #### public getResult() : string ```php public getResult() : string ``` **Summary** Возвращает сформированный тег 1162. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) **Returns:** string - Сформированный тег 1162 #### public getSerial() : string|null ```php public getSerial() : string|null ``` **Summary** Возвращает серийный номер товара. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) **Returns:** string|null - Серийный номер товара #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип маркировки. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) **Returns:** string|null - Тип маркировки #### public isUsePrefix() : bool ```php public isUsePrefix() : bool ``` **Summary** Возвращает флаг использования кода типа маркировки. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) **Returns:** bool - #### public setAppIdentifiers() : void ```php public setAppIdentifiers(null|array $appIdentifiers) : void ``` **Summary** Устанавливает массив дополнительных идентификаторов применения. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array | appIdentifiers | Массив дополнительных идентификаторов применения | **Returns:** void - #### public setGtin() : \YooKassa\Helpers\ProductCode ```php public setGtin(string|null $gtin) : \YooKassa\Helpers\ProductCode ``` **Summary** Устанавливает глобальный номер товарной продукции. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | gtin | Глобальный номер товарной продукции | **Returns:** \YooKassa\Helpers\ProductCode - #### public setMarkCodeInfo() : void ```php public setMarkCodeInfo(array|\YooKassa\Model\Receipt\MarkCodeInfo|string $markCodeInfo) : void ``` **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\MarkCodeInfo OR string | markCodeInfo | | **Returns:** void - #### public setPrefix() : \YooKassa\Helpers\ProductCode ```php public setPrefix(int|string|null $prefix) : \YooKassa\Helpers\ProductCode ``` **Summary** Устанавливает код типа маркировки. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR string OR null | prefix | Код типа маркировки | **Returns:** \YooKassa\Helpers\ProductCode - #### public setSerial() : \YooKassa\Helpers\ProductCode ```php public setSerial(string|null $serial) : \YooKassa\Helpers\ProductCode ``` **Summary** Устанавливает серийный номер товара. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | serial | Серийный номер товара | **Returns:** \YooKassa\Helpers\ProductCode - #### public setType() : void ```php public setType(string $type) : void ``` **Summary** Устанавливает тип маркировки. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | type | Тип маркировки | **Returns:** void - #### public setUsePrefix() : \YooKassa\Helpers\ProductCode ```php public setUsePrefix(bool $usePrefix) : \YooKassa\Helpers\ProductCode ``` **Summary** Устанавливает флаг использования кода типа маркировки. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | usePrefix | Флаг использования кода типа маркировки | **Returns:** \YooKassa\Helpers\ProductCode - #### public validate() : bool ```php public validate() : bool ``` **Summary** Проверяет заполненность необходимых свойств. **Details:** * Inherited From: [\YooKassa\Helpers\ProductCode](../classes/YooKassa-Helpers-ProductCode.md) **Returns:** bool - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-DealStatus.md000064400000012147150364342670020370 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Deal\DealStatus ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Класс, представляющий модель DealStatus. **Description:** Тип операции. Фиксированное значение: ~`opened` — Сделка открыта. ~`closed` — Сделка закрыта. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [OPENED](../classes/YooKassa-Model-Deal-DealStatus.md#constant_OPENED) | | Сделка открыта. Можно выполнять платежи, возвраты и выплаты в составе сделки | | public | [CLOSED](../classes/YooKassa-Model-Deal-DealStatus.md#constant_CLOSED) | | Сделка закрыта. Вознаграждение перечислено продавцу и платформе или оплата возвращена покупателю. | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Deal-DealStatus.md#property_validValues) | | Возвращает список доступных значений | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Deal/DealStatus.php](../../lib/Model/Deal/DealStatus.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Deal\DealStatus * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### OPENED Сделка открыта. Можно выполнять платежи, возвраты и выплаты в составе сделки ```php OPENED = 'opened' ``` ###### CLOSED Сделка закрыта. Вознаграждение перечислено продавцу и платформе или оплата возвращена покупателю. ```php CLOSED = 'closed' ``` Нельзя выполнять платежи, возвраты и выплаты в составе сделки. --- ## Properties #### protected $validValues : array --- **Summary** Возвращает список доступных значений **Type:** array Массив принимаемых enum'ом значений **Details:** ##### Tags | Tag | Version | Description | | --- | ------- | ----------- | | return | | | --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-EmptyPropertyValueException.md000064400000004472150364342670025504 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\EmptyPropertyValueException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md#method___construct) | | InvalidValueException constructor. | | public | [getProperty()](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md#method_getProperty) | | | --- ### Details * File: [lib/Common/Exceptions/EmptyPropertyValueException.php](../../lib/Common/Exceptions/EmptyPropertyValueException.php) * Package: Default * Class Hierarchy: * [\InvalidArgumentException](\InvalidArgumentException) * [\YooKassa\Common\Exceptions\InvalidPropertyException](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md) * \YooKassa\Common\Exceptions\EmptyPropertyValueException --- ## Methods #### public __construct() : mixed ```php public __construct(string $message = '', int $code, string $property = '') : mixed ``` **Summary** InvalidValueException constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\InvalidPropertyException](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | message | | | int | code | | | string | property | | **Returns:** mixed - #### public getProperty() : string ```php public getProperty() : string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\InvalidPropertyException](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md) **Returns:** string - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Helpers-Config-ConfigurationLoader.md000064400000004541150364342670023156 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Helpers\Config\ConfigurationLoader ### Namespace: [\YooKassa\Helpers\Config](../namespaces/yookassa-helpers-config.md) --- **Summary:** Класс, представляющий модель ConfigurationLoader. **Description:** Класс для загрузки конфига Curl клиента. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getConfig()](../classes/YooKassa-Helpers-Config-ConfigurationLoader.md#method_getConfig) | | | | public | [load()](../classes/YooKassa-Helpers-Config-ConfigurationLoader.md#method_load) | | | --- ### Details * File: [lib/Helpers/Config/ConfigurationLoader.php](../../lib/Helpers/Config/ConfigurationLoader.php) * Package: YooKassa\Helpers * Class Hierarchy: * \YooKassa\Helpers\Config\ConfigurationLoader * Implements: * [\YooKassa\Helpers\Config\ConfigurationLoaderInterface](../classes/YooKassa-Helpers-Config-ConfigurationLoaderInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public getConfig() : array ```php public getConfig() : array ``` **Details:** * Inherited From: [\YooKassa\Helpers\Config\ConfigurationLoader](../classes/YooKassa-Helpers-Config-ConfigurationLoader.md) **Returns:** array - #### public load() : self ```php public load(mixed $filePath = null) : self ``` **Details:** * Inherited From: [\YooKassa\Helpers\Config\ConfigurationLoader](../classes/YooKassa-Helpers-Config-ConfigurationLoader.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | filePath | | ##### Throws: | Type | Description | | ---- | ----------- | | \JsonException | | **Returns:** self - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesExternal.md000064400000046206150364342670032465 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesExternal ### Namespace: [\YooKassa\Request\Payments\ConfirmationAttributes](../namespaces/yookassa-request-payments-confirmationattributes.md) --- **Summary:** Класс, представляющий модель ConfirmationAttributesExternal. **Description:** Сценарий при котором необходимо ожидать пока пользователь самостоятельно подтвердит платеж. Например, пользователь подтверждает платеж ответом на SMS или в приложении партнера. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesExternal.md#property_locale) | | Язык интерфейса, писем и смс, которые будет видеть или получать пользователь | | public | [$locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property_locale) | | Язык интерфейса, писем и смс, которые будет видеть или получать пользователь | | public | [$type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesExternal.md#property_type) | | Код сценария подтверждения | | public | [$type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property_type) | | Код сценария подтверждения | | protected | [$_locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property__locale) | | | | protected | [$_type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesExternal.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getLocale()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_getLocale) | | Возвращает язык интерфейса, писем и смс | | public | [getType()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_getType) | | Возвращает код сценария подтверждения | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setLocale()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_setLocale) | | Устанавливает язык интерфейса, писем и смс | | public | [setType()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_setType) | | Устанавливает код сценария подтверждения. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/ConfirmationAttributes/ConfirmationAttributesExternal.php](../../lib/Request/Payments/ConfirmationAttributes/ConfirmationAttributesExternal.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) * \YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesExternal * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $locale : string --- ***Description*** Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Type:** string **Details:** #### public $locale : string --- ***Description*** Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### public $type : string --- ***Description*** Код сценария подтверждения **Type:** string **Details:** #### public $type : string --- ***Description*** Код сценария подтверждения **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### protected $_locale : ?string --- **Type:** ?string Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### protected $_type : ?string --- **Type:** ?string Код сценария подтверждения **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesExternal](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesExternal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getLocale() : string|null ```php public getLocale() : string|null ``` **Summary** Возвращает язык интерфейса, писем и смс **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) **Returns:** string|null - Язык интерфейса, писем и смс #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает код сценария подтверждения **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) **Returns:** string|null - Код сценария подтверждения #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setLocale() : self ```php public setLocale(string|null $locale = null) : self ``` **Summary** Устанавливает язык интерфейса, писем и смс **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | locale | Язык интерфейса, писем и смс | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает код сценария подтверждения. **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Код сценария подтверждения | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Refund-Refund.md000064400000107435150364342670020125 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Refund\Refund ### Namespace: [\YooKassa\Model\Refund](../namespaces/yookassa-model-refund.md) --- **Summary:** Класс, представляющий модель Refund. **Description:** Данные о возврате платежа. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Refund-Refund.md#constant_MAX_LENGTH_DESCRIPTION) | | Максимальная длина строки описания возврата | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Refund-Refund.md#property_amount) | | Сумма возврата | | public | [$cancellation_details](../classes/YooKassa-Model-Refund-Refund.md#property_cancellation_details) | | Комментарий к статусу `canceled` | | public | [$cancellationDetails](../classes/YooKassa-Model-Refund-Refund.md#property_cancellationDetails) | | Комментарий к статусу `canceled` | | public | [$created_at](../classes/YooKassa-Model-Refund-Refund.md#property_created_at) | | Время создания возврата | | public | [$createdAt](../classes/YooKassa-Model-Refund-Refund.md#property_createdAt) | | Время создания возврата | | public | [$deal](../classes/YooKassa-Model-Refund-Refund.md#property_deal) | | Данные о сделке, в составе которой проходит возврат | | public | [$description](../classes/YooKassa-Model-Refund-Refund.md#property_description) | | Комментарий, основание для возврата средств покупателю | | public | [$id](../classes/YooKassa-Model-Refund-Refund.md#property_id) | | Идентификатор возврата платежа | | public | [$payment_id](../classes/YooKassa-Model-Refund-Refund.md#property_payment_id) | | Идентификатор платежа | | public | [$paymentId](../classes/YooKassa-Model-Refund-Refund.md#property_paymentId) | | Идентификатор платежа | | public | [$receipt_registration](../classes/YooKassa-Model-Refund-Refund.md#property_receipt_registration) | | Статус регистрации чека | | public | [$receiptRegistration](../classes/YooKassa-Model-Refund-Refund.md#property_receiptRegistration) | | Статус регистрации чека | | public | [$sources](../classes/YooKassa-Model-Refund-Refund.md#property_sources) | | Данные о том, с какого магазина и какую сумму нужно удержать для проведения возврата | | public | [$status](../classes/YooKassa-Model-Refund-Refund.md#property_status) | | Статус возврата | | protected | [$_amount](../classes/YooKassa-Model-Refund-Refund.md#property__amount) | | | | protected | [$_cancellation_details](../classes/YooKassa-Model-Refund-Refund.md#property__cancellation_details) | | | | protected | [$_created_at](../classes/YooKassa-Model-Refund-Refund.md#property__created_at) | | | | protected | [$_deal](../classes/YooKassa-Model-Refund-Refund.md#property__deal) | | | | protected | [$_description](../classes/YooKassa-Model-Refund-Refund.md#property__description) | | | | protected | [$_id](../classes/YooKassa-Model-Refund-Refund.md#property__id) | | | | protected | [$_payment_id](../classes/YooKassa-Model-Refund-Refund.md#property__payment_id) | | | | protected | [$_receipt_registration](../classes/YooKassa-Model-Refund-Refund.md#property__receipt_registration) | | | | protected | [$_sources](../classes/YooKassa-Model-Refund-Refund.md#property__sources) | | | | protected | [$_status](../classes/YooKassa-Model-Refund-Refund.md#property__status) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Refund-Refund.md#method_getAmount) | | Возвращает сумму возврата. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Refund-Refund.md#method_getCancellationDetails) | | Возвращает cancellation_details. | | public | [getCreatedAt()](../classes/YooKassa-Model-Refund-Refund.md#method_getCreatedAt) | | Возвращает дату создания возврата. | | public | [getDeal()](../classes/YooKassa-Model-Refund-Refund.md#method_getDeal) | | Возвращает данные о сделке, в составе которой проходит возврат | | public | [getDescription()](../classes/YooKassa-Model-Refund-Refund.md#method_getDescription) | | Возвращает комментарий к возврату. | | public | [getId()](../classes/YooKassa-Model-Refund-Refund.md#method_getId) | | Возвращает идентификатор возврата платежа. | | public | [getPaymentId()](../classes/YooKassa-Model-Refund-Refund.md#method_getPaymentId) | | Возвращает идентификатор платежа. | | public | [getReceiptRegistration()](../classes/YooKassa-Model-Refund-Refund.md#method_getReceiptRegistration) | | Возвращает статус регистрации чека. | | public | [getSources()](../classes/YooKassa-Model-Refund-Refund.md#method_getSources) | | Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. | | public | [getStatus()](../classes/YooKassa-Model-Refund-Refund.md#method_getStatus) | | Возвращает статус текущего возврата. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Refund-Refund.md#method_setAmount) | | Устанавливает сумму возврата. | | public | [setCancellationDetails()](../classes/YooKassa-Model-Refund-Refund.md#method_setCancellationDetails) | | Устанавливает cancellation_details. | | public | [setCreatedAt()](../classes/YooKassa-Model-Refund-Refund.md#method_setCreatedAt) | | Устанавливает время создания возврата. | | public | [setDeal()](../classes/YooKassa-Model-Refund-Refund.md#method_setDeal) | | Устанавливает данные о сделке, в составе которой проходит возврат. | | public | [setDescription()](../classes/YooKassa-Model-Refund-Refund.md#method_setDescription) | | Устанавливает комментарий к возврату. | | public | [setId()](../classes/YooKassa-Model-Refund-Refund.md#method_setId) | | Устанавливает идентификатор возврата. | | public | [setPaymentId()](../classes/YooKassa-Model-Refund-Refund.md#method_setPaymentId) | | Устанавливает идентификатор платежа. | | public | [setReceiptRegistration()](../classes/YooKassa-Model-Refund-Refund.md#method_setReceiptRegistration) | | Устанавливает статус регистрации чека. | | public | [setSources()](../classes/YooKassa-Model-Refund-Refund.md#method_setSources) | | Устанавливает sources (массив распределения денег между магазинами). | | public | [setStatus()](../classes/YooKassa-Model-Refund-Refund.md#method_setStatus) | | Устанавливает статус возврата платежа. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Refund/Refund.php](../../lib/Model/Refund/Refund.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Refund\Refund * Implements: * [\YooKassa\Model\Refund\RefundInterface](../classes/YooKassa-Model-Refund-RefundInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Максимальная длина строки описания возврата ```php MAX_LENGTH_DESCRIPTION = 250 ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возврата **Type:** AmountInterface **Details:** #### public $cancellation_details : \YooKassa\Model\Refund\RefundCancellationDetails --- ***Description*** Комментарий к статусу `canceled` **Type:** RefundCancellationDetails **Details:** #### public $cancellationDetails : \YooKassa\Model\Refund\RefundCancellationDetails --- ***Description*** Комментарий к статусу `canceled` **Type:** RefundCancellationDetails **Details:** #### public $created_at : \DateTime --- ***Description*** Время создания возврата **Type:** \DateTime **Details:** #### public $createdAt : \DateTime --- ***Description*** Время создания возврата **Type:** \DateTime **Details:** #### public $deal : \YooKassa\Model\Deal\RefundDealInfo --- ***Description*** Данные о сделке, в составе которой проходит возврат **Type:** RefundDealInfo **Details:** #### public $description : string --- ***Description*** Комментарий, основание для возврата средств покупателю **Type:** string **Details:** #### public $id : string --- ***Description*** Идентификатор возврата платежа **Type:** string **Details:** #### public $payment_id : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** #### public $paymentId : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** #### public $receipt_registration : string --- ***Description*** Статус регистрации чека **Type:** string **Details:** #### public $receiptRegistration : string --- ***Description*** Статус регистрации чека **Type:** string **Details:** #### public $sources : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Refund\SourceInterface[] --- ***Description*** Данные о том, с какого магазина и какую сумму нужно удержать для проведения возврата **Type:** SourceInterface[] **Details:** #### public $status : string --- ***Description*** Статус возврата **Type:** string **Details:** #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface Сумма возврата **Details:** #### protected $_cancellation_details : ?\YooKassa\Model\CancellationDetailsInterface --- **Type:** CancellationDetailsInterface Комментарий к статусу `canceled` **Details:** #### protected $_created_at : ?\DateTime --- **Type:** DateTime Время создания возврата **Details:** #### protected $_deal : ?\YooKassa\Model\Deal\RefundDealInfo --- **Type:** RefundDealInfo Данные о сделке, в составе которой проходит возврат **Details:** #### protected $_description : ?string --- **Type:** ?string Комментарий, основание для возврата средств покупателю **Details:** #### protected $_id : ?string --- **Type:** ?string Идентификатор возврата платежа **Details:** #### protected $_payment_id : ?string --- **Type:** ?string Идентификатор платежа **Details:** #### protected $_receipt_registration : ?string --- **Type:** ?string Статус регистрации чека **Details:** #### protected $_sources : ?\YooKassa\Common\ListObject --- **Type:** ListObject Данные о распределении денег — сколько и в какой магазин нужно перевести **Details:** #### protected $_status : ?string --- **Type:** ?string Статус возврата **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма возврата #### public getCancellationDetails() : \YooKassa\Model\CancellationDetailsInterface|null ```php public getCancellationDetails() : \YooKassa\Model\CancellationDetailsInterface|null ``` **Summary** Возвращает cancellation_details. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \YooKassa\Model\CancellationDetailsInterface|null - #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает дату создания возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \DateTime|null - Время создания возврата #### public getDeal() : null|\YooKassa\Model\Deal\RefundDealInfo ```php public getDeal() : null|\YooKassa\Model\Deal\RefundDealInfo ``` **Summary** Возвращает данные о сделке, в составе которой проходит возврат **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** null|\YooKassa\Model\Deal\RefundDealInfo - Данные о сделке, в составе которой проходит возврат #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает комментарий к возврату. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Комментарий, основание для возврата средств покупателю #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор возврата платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Идентификатор возврата #### public getPaymentId() : string|null ```php public getPaymentId() : string|null ``` **Summary** Возвращает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Идентификатор платежа #### public getReceiptRegistration() : string|null ```php public getReceiptRegistration() : string|null ``` **Summary** Возвращает статус регистрации чека. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Статус регистрации чека #### public getSources() : \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSources() : \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface - #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус текущего возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Статус возврата #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма возврата | **Returns:** self - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\CancellationDetailsInterface|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает cancellation_details. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\CancellationDetailsInterface OR array OR null | cancellation_details | | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания возврата | **Returns:** self - #### public setDeal() : self ```php public setDeal(\YooKassa\Model\Deal\RefundDealInfo|array|null $deal = null) : self ``` **Summary** Устанавливает данные о сделке, в составе которой проходит возврат. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Deal\RefundDealInfo OR array OR null | deal | Данные о сделке, в составе которой проходит возврат | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает комментарий к возврату. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Комментарий, основание для возврата средств покупателю | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор возврата | **Returns:** self - #### public setPaymentId() : self ```php public setPaymentId(string|null $payment_id = null) : self ``` **Summary** Устанавливает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_id | Идентификатор платежа | **Returns:** self - #### public setReceiptRegistration() : self ```php public setReceiptRegistration(string|null $receipt_registration = null) : self ``` **Summary** Устанавливает статус регистрации чека. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | receipt_registration | Статус регистрации чека | **Returns:** self - #### public setSources() : self ```php public setSources(\YooKassa\Common\ListObjectInterface|array|null $sources = null) : self ``` **Summary** Устанавливает sources (массив распределения денег между магазинами). **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | sources | | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус возврата платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус возврата платежа | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Webhook-WebhookInterface.md000064400000012474150364342670022272 0ustar00# [YooKassa API SDK](../home.md) # Interface: WebhookInterface ### Namespace: [\YooKassa\Model\Webhook](../namespaces/yookassa-model-webhook.md) --- **Summary:** Interface WebhookInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEvent()](../classes/YooKassa-Model-Webhook-WebhookInterface.md#method_getEvent) | | Возвращает событие, о котором уведомляет ЮKassa. | | public | [getId()](../classes/YooKassa-Model-Webhook-WebhookInterface.md#method_getId) | | Возвращает идентификатор webhook. | | public | [getUrl()](../classes/YooKassa-Model-Webhook-WebhookInterface.md#method_getUrl) | | Возвращает URL, на который ЮKassa будет отправлять уведомления. | | public | [setEvent()](../classes/YooKassa-Model-Webhook-WebhookInterface.md#method_setEvent) | | Устанавливает событие, о котором уведомляет ЮKassa. | | public | [setId()](../classes/YooKassa-Model-Webhook-WebhookInterface.md#method_setId) | | Устанавливает идентификатор webhook. | | public | [setUrl()](../classes/YooKassa-Model-Webhook-WebhookInterface.md#method_setUrl) | | Устанавливает URL, на который ЮKassa будет отправлять уведомления. | --- ### Details * File: [lib/Model/Webhook/WebhookInterface.php](../../lib/Model/Webhook/WebhookInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Идентификатор webhook | | property | | Событие, о котором уведомляет ЮKassa | | property | | URL, на который ЮKassa будет отправлять уведомления | --- ## Methods #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор webhook. **Details:** * Inherited From: [\YooKassa\Model\Webhook\WebhookInterface](../classes/YooKassa-Model-Webhook-WebhookInterface.md) **Returns:** string|null - Идентификатор webhook #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор webhook. **Details:** * Inherited From: [\YooKassa\Model\Webhook\WebhookInterface](../classes/YooKassa-Model-Webhook-WebhookInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор webhook | **Returns:** self - #### public getEvent() : string ```php public getEvent() : string ``` **Summary** Возвращает событие, о котором уведомляет ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\Webhook\WebhookInterface](../classes/YooKassa-Model-Webhook-WebhookInterface.md) **Returns:** string - Событие, о котором уведомляет ЮKassa #### public setEvent() : self ```php public setEvent(string|null $event = null) : self ``` **Summary** Устанавливает событие, о котором уведомляет ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\Webhook\WebhookInterface](../classes/YooKassa-Model-Webhook-WebhookInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | event | Событие, о котором уведомляет ЮKassa | **Returns:** self - #### public getUrl() : string ```php public getUrl() : string ``` **Summary** Возвращает URL, на который ЮKassa будет отправлять уведомления. **Details:** * Inherited From: [\YooKassa\Model\Webhook\WebhookInterface](../classes/YooKassa-Model-Webhook-WebhookInterface.md) **Returns:** string - URL, на который ЮKassa будет отправлять уведомления #### public setUrl() : self ```php public setUrl(string|null $url = null) : self ``` **Summary** Устанавливает URL, на который ЮKassa будет отправлять уведомления. **Details:** * Inherited From: [\YooKassa\Model\Webhook\WebhookInterface](../classes/YooKassa-Model-Webhook-WebhookInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | url | URL, на который ЮKassa будет отправлять уведомления | **Returns:** self - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md000064400000127554150364342670025606 0ustar00# [YooKassa API SDK](../home.md) # Interface: CreatePaymentRequestInterface ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Interface CreatePaymentRequestInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAirline()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getAirline) | | Возвращает данные длинной записи. | | public | [getAmount()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getAmount) | | Возвращает сумму заказа. | | public | [getCapture()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getCapture) | | Возвращает флаг автоматического принятия поступившей оплаты. | | public | [getClientIp()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getClientIp) | | Возвращает IPv4 или IPv6-адрес покупателя. | | public | [getConfirmation()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getConfirmation) | | Возвращает способ подтверждения платежа. | | public | [getDeal()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getDeal) | | Возвращает данные о сделке, в составе которой проходит платеж. | | public | [getDescription()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getDescription) | | Возвращает описание транзакции. | | public | [getFraudData()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getFraudData) | | Возвращает информацию для проверки операции на мошенничество. | | public | [getMerchantCustomerId()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getMerchantCustomerId) | | Возвращает идентификатор покупателя в вашей системе. | | public | [getMetadata()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getMetadata) | | Возвращает данные оплаты установленные мерчантом | | public | [getPaymentMethodData()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getPaymentMethodData) | | Возвращает данные для создания метода оплаты. | | public | [getPaymentMethodId()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getPaymentMethodId) | | Устанавливает идентификатор записи платёжных данных покупателя. | | public | [getPaymentToken()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getPaymentToken) | | Возвращает одноразовый токен для проведения оплаты. | | public | [getReceipt()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getReceipt) | | Возвращает чек, если он есть. | | public | [getRecipient()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getRecipient) | | Возвращает объект получателя платежа. | | public | [getSavePaymentMethod()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getSavePaymentMethod) | | Возвращает флаг сохранения платёжных данных. | | public | [getTransfers()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_getTransfers) | | Возвращает данные о распределении денег — сколько и в какой магазин нужно перевести. | | public | [hasAirline()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasAirline) | | Проверяет, были ли установлены данные длинной записи. | | public | [hasCapture()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasCapture) | | Проверяет, был ли установлен флаг автоматического приняти поступившей оплаты. | | public | [hasClientIp()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasClientIp) | | Проверяет, был ли установлен IPv4 или IPv6-адрес покупателя. | | public | [hasConfirmation()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasConfirmation) | | Проверяет, был ли установлен способ подтверждения платежа. | | public | [hasDeal()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasDeal) | | Проверяет, были ли установлены данные о сделке. | | public | [hasDescription()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasDescription) | | Проверяет наличие описания транзакции в создаваемом платеже. | | public | [hasFraudData()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasFraudData) | | Проверяет, была ли установлена информация для проверки операции на мошенничество. | | public | [hasMerchantCustomerId()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasMerchantCustomerId) | | Проверяет, был ли установлен идентификатор покупателя в вашей системе. | | public | [hasMetadata()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasMetadata) | | Проверяет, были ли установлены метаданные заказа. | | public | [hasPaymentMethodData()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasPaymentMethodData) | | Проверяет установлен ли объект с методом оплаты. | | public | [hasPaymentMethodId()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasPaymentMethodId) | | Проверяет наличие идентификатора записи о платёжных данных покупателя. | | public | [hasPaymentToken()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasPaymentToken) | | Проверяет наличие одноразового токена для проведения оплаты. | | public | [hasReceipt()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasReceipt) | | Проверяет наличие чека в создаваемом платеже. | | public | [hasRecipient()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasRecipient) | | Проверяет наличие получателя платежа в запросе. | | public | [hasSavePaymentMethod()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasSavePaymentMethod) | | Проверяет, был ли установлен флаг сохранения платёжных данных. | | public | [hasTransfers()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_hasTransfers) | | Проверяет наличие данных о распределении денег. | | public | [setAirline()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setAirline) | | Устанавливает данные авиабилетов. | | public | [setCapture()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setCapture) | | Устанавливает флаг автоматического принятия поступившей оплаты. | | public | [setClientIp()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setClientIp) | | Устанавливает IP адрес покупателя. | | public | [setConfirmation()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setConfirmation) | | Устанавливает способ подтверждения платежа. | | public | [setDeal()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setDeal) | | Устанавливает данные о сделке, в составе которой проходит платеж. | | public | [setDescription()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setDescription) | | Устанавливает описание транзакции. | | public | [setFraudData()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setFraudData) | | Устанавливает информацию для проверки операции на мошенничество. | | public | [setMerchantCustomerId()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setMerchantCustomerId) | | Устанавливает идентификатор покупателя в вашей системе. | | public | [setMetadata()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setMetadata) | | Устанавливает метаданные, привязанные к платежу. | | public | [setPaymentMethodData()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setPaymentMethodData) | | Устанавливает объект с информацией для создания метода оплаты. | | public | [setPaymentMethodId()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setPaymentMethodId) | | Устанавливает идентификатор записи о сохранённых данных покупателя. | | public | [setPaymentToken()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setPaymentToken) | | Устанавливает одноразовый токен для проведения оплаты, сформированный YooKassa JS widget. | | public | [setRecipient()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setRecipient) | | Устанавливает объект с информацией о получателе платежа. | | public | [setSavePaymentMethod()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setSavePaymentMethod) | | Устанавливает флаг сохранения платёжных данных. Значение true инициирует создание многоразового payment_method. | | public | [setTransfers()](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md#method_setTransfers) | | Устанавливает данные о распределении денег — сколько и в какой магазин нужно перевести. | --- ### Details * File: [lib/Request/Payments/CreatePaymentRequestInterface.php](../../lib/Request/Payments/CreatePaymentRequestInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Получатель платежа, если задан | | property | | Сумма создаваемого платежа | | property | | Описание транзакции | | property | | Данные фискального чека 54-ФЗ | | property | | Одноразовый токен для проведения оплаты, сформированный YooKassa JS widget | | property | | Одноразовый токен для проведения оплаты, сформированный YooKassa JS widget | | property | | Идентификатор записи о сохраненных платежных данных покупателя | | property | | Идентификатор записи о сохраненных платежных данных покупателя | | property | | Данные используемые для создания метода оплаты | | property | | Данные используемые для создания метода оплаты | | property | | Способ подтверждения платежа | | property | | Сохранить платежные данные для последующего использования. Значение true инициирует создание многоразового payment_method | | property | | Сохранить платежные данные для последующего использования. Значение true инициирует создание многоразового payment_method | | property | | Автоматически принять поступившую оплату | | property | | IPv4 или IPv6-адрес покупателя. Если не указан, используется IP-адрес TCP-подключения | | property | | IPv4 или IPv6-адрес покупателя. Если не указан, используется IP-адрес TCP-подключения | | property | | Метаданные привязанные к платежу | | property | | Данные о сделке, в составе которой проходит платеж | | property | | Информация для проверки операции на мошенничество | | property | | Информация для проверки операции на мошенничество | | property | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | property | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | --- ## Methods #### public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ```php public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ``` **Summary** Возвращает объект получателя платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** null|\YooKassa\Model\Payment\RecipientInterface - Объект с информацией о получателе платежа или null, если получатель не задан #### public hasRecipient() : bool ```php public hasRecipient() : bool ``` **Summary** Проверяет наличие получателя платежа в запросе. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если получатель платежа задан, false если нет #### public setRecipient() : mixed ```php public setRecipient(null|\YooKassa\Model\Payment\RecipientInterface $recipient) : mixed ``` **Summary** Устанавливает объект с информацией о получателе платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \YooKassa\Model\Payment\RecipientInterface | recipient | Инстанс объекта информации о получателе платежа или null | **Returns:** mixed - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму заказа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма заказа #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** string|null - Описание транзакции #### public hasDescription() : bool ```php public hasDescription() : bool ``` **Summary** Проверяет наличие описания транзакции в создаваемом платеже. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если описание транзакции установлено, false если нет #### public setDescription() : self ```php public setDescription(string|null $description) : self ``` **Summary** Устанавливает описание транзакции. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Описание транзакции | **Returns:** self - #### public getReceipt() : null|\YooKassa\Model\Receipt\ReceiptInterface ```php public getReceipt() : null|\YooKassa\Model\Receipt\ReceiptInterface ``` **Summary** Возвращает чек, если он есть. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** null|\YooKassa\Model\Receipt\ReceiptInterface - Данные фискального чека 54-ФЗ или null, если чека нет #### public hasReceipt() : bool ```php public hasReceipt() : bool ``` **Summary** Проверяет наличие чека в создаваемом платеже. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если чек есть, false если нет #### public getPaymentToken() : string|null ```php public getPaymentToken() : string|null ``` **Summary** Возвращает одноразовый токен для проведения оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** string|null - Одноразовый токен для проведения оплаты, сформированный YooKassa JS widget #### public hasPaymentToken() : bool ```php public hasPaymentToken() : bool ``` **Summary** Проверяет наличие одноразового токена для проведения оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если токен установлен, false если нет #### public setPaymentToken() : self ```php public setPaymentToken(string|null $payment_token) : self ``` **Summary** Устанавливает одноразовый токен для проведения оплаты, сформированный YooKassa JS widget. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_token | Одноразовый токен для проведения оплаты | **Returns:** self - #### public getPaymentMethodId() : string|null ```php public getPaymentMethodId() : string|null ``` **Summary** Устанавливает идентификатор записи платёжных данных покупателя. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** string|null - Идентификатор записи о сохраненных платежных данных покупателя #### public hasPaymentMethodId() : bool ```php public hasPaymentMethodId() : bool ``` **Summary** Проверяет наличие идентификатора записи о платёжных данных покупателя. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если идентификатор задан, false если нет #### public setPaymentMethodId() : self ```php public setPaymentMethodId(string|null $payment_method_id) : self ``` **Summary** Устанавливает идентификатор записи о сохранённых данных покупателя. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_method_id | Идентификатор записи о сохраненных платежных данных покупателя | **Returns:** self - #### public getPaymentMethodData() : \YooKassa\Request\Payments\PaymentData\AbstractPaymentData|null ```php public getPaymentMethodData() : \YooKassa\Request\Payments\PaymentData\AbstractPaymentData|null ``` **Summary** Возвращает данные для создания метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** \YooKassa\Request\Payments\PaymentData\AbstractPaymentData|null - Данные используемые для создания метода оплаты #### public hasPaymentMethodData() : bool ```php public hasPaymentMethodData() : bool ``` **Summary** Проверяет установлен ли объект с методом оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если объект метода оплаты установлен, false если нет #### public setPaymentMethodData() : self ```php public setPaymentMethodData(null|\YooKassa\Request\Payments\PaymentData\AbstractPaymentData $payment_method_data) : self ``` **Summary** Устанавливает объект с информацией для создания метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \YooKassa\Request\Payments\PaymentData\AbstractPaymentData | payment_method_data | Объект создания метода оплаты или null | **Returns:** self - #### public getConfirmation() : \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes|null ```php public getConfirmation() : \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes|null ``` **Summary** Возвращает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes|null - Способ подтверждения платежа #### public hasConfirmation() : bool ```php public hasConfirmation() : bool ``` **Summary** Проверяет, был ли установлен способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если способ подтверждения платежа был установлен, false если нет #### public setConfirmation() : self ```php public setConfirmation(null|array|\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes $confirmation) : self ``` **Summary** Устанавливает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes | confirmation | Способ подтверждения платежа | **Returns:** self - #### public getSavePaymentMethod() : bool|null ```php public getSavePaymentMethod() : bool|null ``` **Summary** Возвращает флаг сохранения платёжных данных. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool|null - Флаг сохранения платёжных данных #### public hasSavePaymentMethod() : bool ```php public hasSavePaymentMethod() : bool ``` **Summary** Проверяет, был ли установлен флаг сохранения платёжных данных. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если флыг был установлен, false если нет #### public setSavePaymentMethod() : self ```php public setSavePaymentMethod(bool|null $save_payment_method = null) : self ``` **Summary** Устанавливает флаг сохранения платёжных данных. Значение true инициирует создание многоразового payment_method. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | save_payment_method | Сохранить платежные данные для последующего использования | **Returns:** self - #### public getCapture() : bool ```php public getCapture() : bool ``` **Summary** Возвращает флаг автоматического принятия поступившей оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если требуется автоматически принять поступившую оплату, false если нет #### public hasCapture() : bool ```php public hasCapture() : bool ``` **Summary** Проверяет, был ли установлен флаг автоматического приняти поступившей оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если флаг автоматического принятия оплаты был установлен, false если нет #### public setCapture() : self ```php public setCapture(bool $capture) : self ``` **Summary** Устанавливает флаг автоматического принятия поступившей оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | capture | Автоматически принять поступившую оплату | **Returns:** self - #### public getClientIp() : string|null ```php public getClientIp() : string|null ``` **Summary** Возвращает IPv4 или IPv6-адрес покупателя. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** string|null - IPv4 или IPv6-адрес покупателя #### public hasClientIp() : bool ```php public hasClientIp() : bool ``` **Summary** Проверяет, был ли установлен IPv4 или IPv6-адрес покупателя. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если IP адрес покупателя был установлен, false если нет #### public setClientIp() : self ```php public setClientIp(string|null $client_ip) : self ``` **Summary** Устанавливает IP адрес покупателя. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | client_ip | IPv4 или IPv6-адрес покупателя | **Returns:** self - #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает данные оплаты установленные мерчантом **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные привязанные к платежу #### public hasMetadata() : bool ```php public hasMetadata() : bool ``` **Summary** Проверяет, были ли установлены метаданные заказа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если метаданные были установлены, false если нет #### public setMetadata() : self ```php public setMetadata(null|array|\YooKassa\Model\Metadata $metadata) : self ``` **Summary** Устанавливает метаданные, привязанные к платежу. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Metadata | metadata | Метаданные платежа, устанавливаемые мерчантом | **Returns:** self - #### public getAirline() : ?\YooKassa\Request\Payments\AirlineInterface ```php public getAirline() : ?\YooKassa\Request\Payments\AirlineInterface ``` **Summary** Возвращает данные длинной записи. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** ?\YooKassa\Request\Payments\AirlineInterface - #### public hasAirline() : bool ```php public hasAirline() : bool ``` **Summary** Проверяет, были ли установлены данные длинной записи. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - #### public setAirline() : \YooKassa\Common\AbstractRequestInterface ```php public setAirline(\YooKassa\Request\Payments\AirlineInterface|array|null $airline) : \YooKassa\Common\AbstractRequestInterface ``` **Summary** Устанавливает данные авиабилетов. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Payments\AirlineInterface OR array OR null | airline | Данные авиабилетов | **Returns:** \YooKassa\Common\AbstractRequestInterface - #### public hasTransfers() : bool ```php public hasTransfers() : bool ``` **Summary** Проверяет наличие данных о распределении денег. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - #### public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface|null ```php public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface|null ``` **Summary** Возвращает данные о распределении денег — сколько и в какой магазин нужно перевести. **Description** Присутствует, если вы используете решение ЮKassa для платформ. (https://yookassa.ru/developers/special-solutions/checkout-for-platforms/basics). **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface|null - Данные о распределении денег #### public setTransfers() : self ```php public setTransfers(\YooKassa\Common\ListObjectInterface|array|null $transfers = null) : self ``` **Summary** Устанавливает данные о распределении денег — сколько и в какой магазин нужно перевести. **Description** Присутствует, если вы используете решение ЮKassa для платформ. (https://yookassa.ru/developers/special-solutions/checkout-for-platforms/basics). **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | transfers | Массив распределения денег | **Returns:** self - #### public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ``` **Summary** Возвращает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** \YooKassa\Model\Deal\PaymentDealInfo|null - Данные о сделке, в составе которой проходит платеж #### public hasDeal() : bool ```php public hasDeal() : bool ``` **Summary** Проверяет, были ли установлены данные о сделке. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если данные о сделке были установлены, false если нет #### public setDeal() : self ```php public setDeal(null|array|\YooKassa\Model\Deal\PaymentDealInfo $deal) : self ``` **Summary** Устанавливает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\PaymentDealInfo | deal | Данные о сделке, в составе которой проходит платеж | **Returns:** self - #### public getFraudData() : null|\YooKassa\Request\Payments\FraudData ```php public getFraudData() : null|\YooKassa\Request\Payments\FraudData ``` **Summary** Возвращает информацию для проверки операции на мошенничество. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** null|\YooKassa\Request\Payments\FraudData - Информация для проверки операции на мошенничество #### public hasFraudData() : bool ```php public hasFraudData() : bool ``` **Summary** Проверяет, была ли установлена информация для проверки операции на мошенничество. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если информация была установлена, false если нет #### public setFraudData() : self ```php public setFraudData(null|array|\YooKassa\Request\Payments\FraudData $fraud_data) : self ``` **Summary** Устанавливает информацию для проверки операции на мошенничество. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Payments\FraudData | fraud_data | Информация для проверки операции на мошенничество | **Returns:** self - #### public getMerchantCustomerId() : string|null ```php public getMerchantCustomerId() : string|null ``` **Summary** Возвращает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** string|null - Идентификатор покупателя в вашей системе #### public hasMerchantCustomerId() : bool ```php public hasMerchantCustomerId() : bool ``` **Summary** Проверяет, был ли установлен идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) **Returns:** bool - True если идентификатор покупателя был установлен, false если нет #### public setMerchantCustomerId() : self ```php public setMerchantCustomerId(string|null $merchant_customer_id) : self ``` **Summary** Устанавливает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestInterface](../classes/YooKassa-Request-Payments-CreatePaymentRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | merchant_customer_id | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов | **Returns:** self - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Deals-DealResponse.md000064400000120362150364342670021455 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Deals\DealResponse ### Namespace: [\YooKassa\Request\Deals](../namespaces/yookassa-request-deals.md) --- **Summary:** Класс, представляющий DealResponse. **Description:** Класс объекта ответа, возвращаемого API при запросе конкретной сделки. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_ID](../classes/YooKassa-Model-Deal-SafeDeal.md#constant_MAX_LENGTH_ID) | | | | public | [MIN_LENGTH_ID](../classes/YooKassa-Model-Deal-SafeDeal.md#constant_MIN_LENGTH_ID) | | | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Deal-SafeDeal.md#constant_MAX_LENGTH_DESCRIPTION) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property_balance) | | Баланс сделки. | | public | [$created_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property_created_at) | | Время создания сделки. | | public | [$createdAt](../classes/YooKassa-Model-Deal-SafeDeal.md#property_createdAt) | | Время создания сделки. | | public | [$description](../classes/YooKassa-Model-Deal-SafeDeal.md#property_description) | | Описание сделки (не более 128 символов). | | public | [$expires_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property_expires_at) | | Время автоматического закрытия сделки. | | public | [$expiresAt](../classes/YooKassa-Model-Deal-SafeDeal.md#property_expiresAt) | | Время автоматического закрытия сделки. | | public | [$fee_moment](../classes/YooKassa-Model-Deal-SafeDeal.md#property_fee_moment) | | Момент перечисления вам вознаграждения платформы. | | public | [$feeMoment](../classes/YooKassa-Model-Deal-SafeDeal.md#property_feeMoment) | | Момент перечисления вам вознаграждения платформы. | | public | [$id](../classes/YooKassa-Model-Deal-SafeDeal.md#property_id) | | Идентификатор сделки. | | public | [$metadata](../classes/YooKassa-Model-Deal-SafeDeal.md#property_metadata) | | Любые дополнительные данные, которые нужны вам для работы. | | public | [$payout_balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property_payout_balance) | | Сумма вознаграждения продавцаю. | | public | [$payoutBalance](../classes/YooKassa-Model-Deal-SafeDeal.md#property_payoutBalance) | | Сумма вознаграждения продавца. | | public | [$status](../classes/YooKassa-Model-Deal-SafeDeal.md#property_status) | | Статус сделки. | | public | [$test](../classes/YooKassa-Model-Deal-SafeDeal.md#property_test) | | Признак тестовой операции. | | public | [$type](../classes/YooKassa-Model-Deal-BaseDeal.md#property_type) | | Тип сделки | | protected | [$_balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property__balance) | | Баланс сделки | | protected | [$_created_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property__created_at) | | Время создания сделки. | | protected | [$_description](../classes/YooKassa-Model-Deal-SafeDeal.md#property__description) | | Описание сделки (не более 128 символов). Используется для фильтрации при [получении списка сделок](/developers/api#get_deals_list). | | protected | [$_expires_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property__expires_at) | | Время автоматического закрытия сделки. | | protected | [$_fee_moment](../classes/YooKassa-Model-Deal-SafeDeal.md#property__fee_moment) | | Момент перечисления вам вознаграждения платформы | | protected | [$_id](../classes/YooKassa-Model-Deal-SafeDeal.md#property__id) | | Идентификатор сделки. | | protected | [$_metadata](../classes/YooKassa-Model-Deal-SafeDeal.md#property__metadata) | | Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). | | protected | [$_payout_balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property__payout_balance) | | Сумма вознаграждения продавца | | protected | [$_status](../classes/YooKassa-Model-Deal-SafeDeal.md#property__status) | | Статус сделки | | protected | [$_test](../classes/YooKassa-Model-Deal-SafeDeal.md#property__test) | | Признак тестовой операции. | | protected | [$_type](../classes/YooKassa-Model-Deal-BaseDeal.md#property__type) | | Тип сделки | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getBalance) | | Возвращает баланс сделки. | | public | [getCreatedAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getCreatedAt) | | Возвращает время создания сделки. | | public | [getDescription()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getDescription) | | Возвращает описание сделки (не более 128 символов). | | public | [getExpiresAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getExpiresAt) | | Возвращает время автоматического закрытия сделки. | | public | [getFeeMoment()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getFeeMoment) | | Возвращает момент перечисления вам вознаграждения платформы. | | public | [getId()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getId) | | Возвращает Id сделки. | | public | [getMetadata()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getMetadata) | | Возвращает дополнительные данные сделки. | | public | [getPayoutBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getPayoutBalance) | | Возвращает сумму вознаграждения продавца. | | public | [getStatus()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getStatus) | | Возвращает статус сделки. | | public | [getTest()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getType()](../classes/YooKassa-Model-Deal-BaseDeal.md#method_getType) | | Возвращает тип сделки. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setBalance) | | Устанавливает баланс сделки. | | public | [setCreatedAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setCreatedAt) | | Устанавливает created_at. | | public | [setDescription()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setDescription) | | Устанавливает описание сделки (не более 128 символов). | | public | [setExpiresAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setExpiresAt) | | Устанавливает время автоматического закрытия сделки. | | public | [setFeeMoment()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setFeeMoment) | | Устанавливает момент перечисления вам вознаграждения платформы. | | public | [setId()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setId) | | Устанавливает Id сделки. | | public | [setMetadata()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setMetadata) | | Устанавливает metadata. | | public | [setPayoutBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setPayoutBalance) | | Устанавливает сумму вознаграждения продавца. | | public | [setStatus()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setStatus) | | Устанавливает статус сделки. | | public | [setTest()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [setType()](../classes/YooKassa-Model-Deal-BaseDeal.md#method_setType) | | Устанавливает тип сделки. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Deals/DealResponse.php](../../lib/Request/Deals/DealResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) * [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) * [\YooKassa\Request\Deals\AbstractDealResponse](../classes/YooKassa-Request-Deals-AbstractDealResponse.md) * \YooKassa\Request\Deals\DealResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Abstract Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_ID Inherited from [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ```php MAX_LENGTH_ID = 50 : int ``` ###### MIN_LENGTH_ID Inherited from [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ```php MIN_LENGTH_ID = 36 : int ``` ###### MAX_LENGTH_DESCRIPTION Inherited from [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ```php MAX_LENGTH_DESCRIPTION = 128 : int ``` --- ## Properties #### public $balance : \YooKassa\Model\AmountInterface --- ***Description*** Баланс сделки. **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $created_at : \DateTime --- ***Description*** Время создания сделки. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $createdAt : \DateTime --- ***Description*** Время создания сделки. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $description : string --- ***Description*** Описание сделки (не более 128 символов). **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $expires_at : \DateTime --- ***Description*** Время автоматического закрытия сделки. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $expiresAt : \DateTime --- ***Description*** Время автоматического закрытия сделки. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $fee_moment : string --- ***Description*** Момент перечисления вам вознаграждения платформы. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $feeMoment : string --- ***Description*** Момент перечисления вам вознаграждения платформы. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $id : string --- ***Description*** Идентификатор сделки. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Любые дополнительные данные, которые нужны вам для работы. **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $payout_balance : \YooKassa\Model\AmountInterface --- ***Description*** Сумма вознаграждения продавцаю. **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $payoutBalance : \YooKassa\Model\AmountInterface --- ***Description*** Сумма вознаграждения продавца. **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $status : string --- ***Description*** Статус сделки. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $test : bool --- ***Description*** Признак тестовой операции. **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $type : string --- ***Description*** Тип сделки **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) #### protected $_balance : ?\YooKassa\Model\AmountInterface --- **Summary** Баланс сделки **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_created_at : ?\DateTime --- **Summary** Время создания сделки. **Type:** DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_description : ?string --- **Summary** Описание сделки (не более 128 символов). Используется для фильтрации при [получении списка сделок](/developers/api#get_deals_list). **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_expires_at : ?\DateTime --- **Summary** Время автоматического закрытия сделки. **Type:** DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_fee_moment : ?string --- **Summary** Момент перечисления вам вознаграждения платформы **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_id : ?string --- **Summary** Идентификатор сделки. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Summary** Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_payout_balance : ?\YooKassa\Model\AmountInterface --- **Summary** Сумма вознаграждения продавца **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_status : ?string --- **Summary** Статус сделки **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_test : ?bool --- **Summary** Признак тестовой операции. **Type:** ?bool **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_type : ?string --- **Summary** Тип сделки **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getBalance() : \YooKassa\Model\AmountInterface|null ```php public getBalance() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает баланс сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \YooKassa\Model\AmountInterface|null - Баланс сделки #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \DateTime|null - Время создания сделки #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание сделки (не более 128 символов). **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Описание сделки #### public getExpiresAt() : \DateTime|null ```php public getExpiresAt() : \DateTime|null ``` **Summary** Возвращает время автоматического закрытия сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \DateTime|null - Время автоматического закрытия сделки #### public getFeeMoment() : string|null ```php public getFeeMoment() : string|null ``` **Summary** Возвращает момент перечисления вам вознаграждения платформы. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Момент перечисления вознаграждения #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Id сделки #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает дополнительные данные сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \YooKassa\Model\Metadata|null - Дополнительные данные сделки #### public getPayoutBalance() : \YooKassa\Model\AmountInterface|null ```php public getPayoutBalance() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму вознаграждения продавца. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма вознаграждения продавца #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Статус сделки #### public getTest() : bool|null ```php public getTest() : bool|null ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** bool|null - Признак тестовой операции #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setBalance() : self ```php public setBalance(\YooKassa\Model\AmountInterface|array|null $balance = null) : self ``` **Summary** Устанавливает баланс сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | balance | | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает created_at. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания сделки. | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание сделки (не более 128 символов). **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Описание сделки (не более 128 символов). | **Returns:** self - #### public setExpiresAt() : self ```php public setExpiresAt(\DateTime|string|null $expires_at = null) : self ``` **Summary** Устанавливает время автоматического закрытия сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at | Время автоматического закрытия сделки. | **Returns:** self - #### public setFeeMoment() : self ```php public setFeeMoment(string|null $fee_moment = null) : self ``` **Summary** Устанавливает момент перечисления вам вознаграждения платформы. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fee_moment | Момент перечисления вам вознаграждения платформы | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор сделки. | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает metadata. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Любые дополнительные данные, которые нужны вам для работы. | **Returns:** self - #### public setPayoutBalance() : self ```php public setPayoutBalance(\YooKassa\Model\AmountInterface|array|null $payout_balance = null) : self ``` **Summary** Устанавливает сумму вознаграждения продавца. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | payout_balance | Сумма вознаграждения продавца | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус сделки | **Returns:** self - #### public setTest() : self ```php public setTest(bool|null $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | test | Признак тестовой операции | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataApplePay.md000064400000042320150364342670025706 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataApplePay ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentDataApplePay. **Description:** Платежные данные для проведения оплаты при помощи Apple Pay. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$payment_data](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataApplePay.md#property_payment_data) | | содержимое поля paymentData объекта PKPaymentToken, закодированное в Base64 | | public | [$paymentData](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataApplePay.md#property_paymentData) | | содержимое поля paymentData объекта PKPaymentToken, закодированное в Base64 | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataApplePay.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getPaymentData()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataApplePay.md#method_getPaymentData) | | Возвращает содержимое поля paymentData объекта PKPaymentToken, закодированное в Base64. | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setPaymentData()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataApplePay.md#method_setPaymentData) | | Устанавливает содержимое поля paymentData объекта PKPaymentToken, закодированное в Base64. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataApplePay.php](../../lib/Request/Payments/PaymentData/PaymentDataApplePay.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataApplePay * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $payment_data : string --- ***Description*** содержимое поля paymentData объекта PKPaymentToken, закодированное в Base64 **Type:** string **Details:** #### public $paymentData : string --- ***Description*** содержимое поля paymentData объекта PKPaymentToken, закодированное в Base64 **Type:** string **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) #### protected $_type : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataApplePay](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataApplePay.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getPaymentData() : string|null ```php public getPaymentData() : string|null ``` **Summary** Возвращает содержимое поля paymentData объекта PKPaymentToken, закодированное в Base64. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataApplePay](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataApplePay.md) **Returns:** string|null - содержимое поля paymentData объекта PKPaymentToken, закодированное в Base64 #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setPaymentData() : self ```php public setPaymentData(string|null $payment_data) : self ``` **Summary** Устанавливает содержимое поля paymentData объекта PKPaymentToken, закодированное в Base64. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataApplePay](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataApplePay.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_data | содержимое поля paymentData объекта PKPaymentToken, закодированное в Base64 | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-ConfirmationType.md000064400000016550150364342670022363 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\ConfirmationType ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Класс, представляющий модель ConfirmationType. **Description:** Тип пользовательского процесса подтверждения платежа. Возможные значения: - `redirect` - Необходимо направить плательщика на страницу партнера - `external` - Для подтверждения платежа пользователю необходимо совершить действия во внешней системе (например, ответить на смс) - `code_verification` - Необходимо получить одноразовый код от плательщика для подтверждения платежа - `embedded` - Необходимо получить токен для checkout.js - `qr` - Необходимо получить QR-код - `mobile_application` - Необходимо совершить действия в мобильном приложении --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [REDIRECT](../classes/YooKassa-Model-Payment-ConfirmationType.md#constant_REDIRECT) | | Необходимо направить плательщика на страницу партнера | | public | [EXTERNAL](../classes/YooKassa-Model-Payment-ConfirmationType.md#constant_EXTERNAL) | | Для подтверждения платежа пользователю необходимо совершить действия во внешней системе (например, ответить на смс) | | public | [CODE_VERIFICATION](../classes/YooKassa-Model-Payment-ConfirmationType.md#constant_CODE_VERIFICATION) | *deprecated* | Необходимо ждать пока плательщик самостоятельно подтвердит платеж. | | public | [EMBEDDED](../classes/YooKassa-Model-Payment-ConfirmationType.md#constant_EMBEDDED) | | Необходимо получить одноразовый код от плательщика для подтверждения платежа | | public | [QR](../classes/YooKassa-Model-Payment-ConfirmationType.md#constant_QR) | | Необходимо получить QR-код | | public | [MOBILE_APPLICATION](../classes/YooKassa-Model-Payment-ConfirmationType.md#constant_MOBILE_APPLICATION) | | Необходимо совершить действия в мобильном приложении | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payment-ConfirmationType.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payment/ConfirmationType.php](../../lib/Model/Payment/ConfirmationType.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payment\ConfirmationType * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### REDIRECT Необходимо направить плательщика на страницу партнера ```php REDIRECT = 'redirect' ``` ###### EXTERNAL Для подтверждения платежа пользователю необходимо совершить действия во внешней системе (например, ответить на смс) ```php EXTERNAL = 'external' ``` ###### ~~CODE_VERIFICATION~~ Необходимо ждать пока плательщик самостоятельно подтвердит платеж. ```php CODE_VERIFICATION = 'code_verification' ``` **deprecated** Будет удален в следующих версиях ###### EMBEDDED Необходимо получить одноразовый код от плательщика для подтверждения платежа ```php EMBEDDED = 'embedded' ``` ###### QR Необходимо получить QR-код ```php QR = 'qr' ``` ###### MOBILE_APPLICATION Необходимо совершить действия в мобильном приложении ```php MOBILE_APPLICATION = 'mobile_application' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Client-BaseClient.md000064400000061026150364342670017643 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Client\BaseClient ### Namespace: [\YooKassa\Client](../namespaces/yookassa-client.md) --- **Summary:** Класс, представляющий модель BaseClient. **Description:** Базовый класс Curl клиента. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [ME_PATH](../classes/YooKassa-Client-BaseClient.md#constant_ME_PATH) | | Точка входа для запроса к API по магазину | | public | [PAYMENTS_PATH](../classes/YooKassa-Client-BaseClient.md#constant_PAYMENTS_PATH) | | Точка входа для запросов к API по платежам | | public | [REFUNDS_PATH](../classes/YooKassa-Client-BaseClient.md#constant_REFUNDS_PATH) | | Точка входа для запросов к API по возвратам | | public | [WEBHOOKS_PATH](../classes/YooKassa-Client-BaseClient.md#constant_WEBHOOKS_PATH) | | Точка входа для запросов к API по вебхукам | | public | [RECEIPTS_PATH](../classes/YooKassa-Client-BaseClient.md#constant_RECEIPTS_PATH) | | Точка входа для запросов к API по чекам | | public | [DEALS_PATH](../classes/YooKassa-Client-BaseClient.md#constant_DEALS_PATH) | | Точка входа для запросов к API по сделкам | | public | [PAYOUTS_PATH](../classes/YooKassa-Client-BaseClient.md#constant_PAYOUTS_PATH) | | Точка входа для запросов к API по выплатам | | public | [PERSONAL_DATA_PATH](../classes/YooKassa-Client-BaseClient.md#constant_PERSONAL_DATA_PATH) | | Точка входа для запросов к API по персональным данным | | public | [SBP_BANKS_PATH](../classes/YooKassa-Client-BaseClient.md#constant_SBP_BANKS_PATH) | | Точка входа для запросов к API по участникам СБП | | public | [SELF_EMPLOYED_PATH](../classes/YooKassa-Client-BaseClient.md#constant_SELF_EMPLOYED_PATH) | | Точка входа для запросов к API по самозанятым | | public | [IDEMPOTENCY_KEY_HEADER](../classes/YooKassa-Client-BaseClient.md#constant_IDEMPOTENCY_KEY_HEADER) | | Имя HTTP заголовка, используемого для передачи idempotence key | | public | [DEFAULT_DELAY](../classes/YooKassa-Client-BaseClient.md#constant_DEFAULT_DELAY) | | Значение по умолчанию времени ожидания между запросами при отправке повторного запроса в случае получения ответа с HTTP статусом 202. | | public | [DEFAULT_TRIES_COUNT](../classes/YooKassa-Client-BaseClient.md#constant_DEFAULT_TRIES_COUNT) | | Значение по умолчанию количества попыток получения информации от API если пришёл ответ с HTTP статусом 202 | | public | [DEFAULT_ATTEMPTS_COUNT](../classes/YooKassa-Client-BaseClient.md#constant_DEFAULT_ATTEMPTS_COUNT) | | Значение по умолчанию количества попыток получения информации от API если пришёл ответ с HTTP статусом 202 | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$apiClient](../classes/YooKassa-Client-BaseClient.md#property_apiClient) | | CURL клиент | | protected | [$attempts](../classes/YooKassa-Client-BaseClient.md#property_attempts) | | Количество повторных запросов при ответе API статусом 202. | | protected | [$config](../classes/YooKassa-Client-BaseClient.md#property_config) | | Настройки для CURL клиента. | | protected | [$logger](../classes/YooKassa-Client-BaseClient.md#property_logger) | | Объект для логирования работы SDK. | | protected | [$login](../classes/YooKassa-Client-BaseClient.md#property_login) | | shopId магазина. | | protected | [$password](../classes/YooKassa-Client-BaseClient.md#property_password) | | Секретный ключ магазина. | | protected | [$timeout](../classes/YooKassa-Client-BaseClient.md#property_timeout) | | Время через которое будут осуществляться повторные запросы. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Client-BaseClient.md#method___construct) | | Constructor. | | public | [getApiClient()](../classes/YooKassa-Client-BaseClient.md#method_getApiClient) | | Возвращает CURL клиента для работы с API. | | public | [getConfig()](../classes/YooKassa-Client-BaseClient.md#method_getConfig) | | Возвращает настройки клиента. | | public | [isNotificationIPTrusted()](../classes/YooKassa-Client-BaseClient.md#method_isNotificationIPTrusted) | | Метод проверяет, находится ли IP адрес среди IP адресов Юkassa, с которых отправляются уведомления. | | public | [setApiClient()](../classes/YooKassa-Client-BaseClient.md#method_setApiClient) | | Устанавливает CURL клиента для работы с API. | | public | [setAuth()](../classes/YooKassa-Client-BaseClient.md#method_setAuth) | | Устанавливает авторизацию по логин/паролю. | | public | [setAuthToken()](../classes/YooKassa-Client-BaseClient.md#method_setAuthToken) | | Устанавливает авторизацию по Oauth-токену. | | public | [setConfig()](../classes/YooKassa-Client-BaseClient.md#method_setConfig) | | Устанавливает настройки клиента. | | public | [setLogger()](../classes/YooKassa-Client-BaseClient.md#method_setLogger) | | Устанавливает логгер приложения. | | public | [setMaxRequestAttempts()](../classes/YooKassa-Client-BaseClient.md#method_setMaxRequestAttempts) | | Установка значения количества попыток повторных запросов при статусе 202. | | public | [setRetryTimeout()](../classes/YooKassa-Client-BaseClient.md#method_setRetryTimeout) | | Установка значения задержки между повторными запросами. | | protected | [decodeData()](../classes/YooKassa-Client-BaseClient.md#method_decodeData) | | Декодирует JSON строку в массив данных. | | protected | [delay()](../classes/YooKassa-Client-BaseClient.md#method_delay) | | Задержка между повторными запросами. | | protected | [encodeData()](../classes/YooKassa-Client-BaseClient.md#method_encodeData) | | Кодирует массив данных в JSON строку. | | protected | [execute()](../classes/YooKassa-Client-BaseClient.md#method_execute) | | Выполнение запроса и обработка 202 статуса. | | protected | [handleError()](../classes/YooKassa-Client-BaseClient.md#method_handleError) | | Выбрасывает исключение по коду ошибки. | --- ### Details * File: [lib/Client/BaseClient.php](../../lib/Client/BaseClient.php) * Package: YooKassa * Class Hierarchy: * \YooKassa\Client\BaseClient * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### ME_PATH Точка входа для запроса к API по магазину ```php ME_PATH = '/me' ``` ###### PAYMENTS_PATH Точка входа для запросов к API по платежам ```php PAYMENTS_PATH = '/payments' ``` ###### REFUNDS_PATH Точка входа для запросов к API по возвратам ```php REFUNDS_PATH = '/refunds' ``` ###### WEBHOOKS_PATH Точка входа для запросов к API по вебхукам ```php WEBHOOKS_PATH = '/webhooks' ``` ###### RECEIPTS_PATH Точка входа для запросов к API по чекам ```php RECEIPTS_PATH = '/receipts' ``` ###### DEALS_PATH Точка входа для запросов к API по сделкам ```php DEALS_PATH = '/deals' ``` ###### PAYOUTS_PATH Точка входа для запросов к API по выплатам ```php PAYOUTS_PATH = '/payouts' ``` ###### PERSONAL_DATA_PATH Точка входа для запросов к API по персональным данным ```php PERSONAL_DATA_PATH = '/personal_data' ``` ###### SBP_BANKS_PATH Точка входа для запросов к API по участникам СБП ```php SBP_BANKS_PATH = '/sbp_banks' ``` ###### SELF_EMPLOYED_PATH Точка входа для запросов к API по самозанятым ```php SELF_EMPLOYED_PATH = '/self_employed' ``` ###### IDEMPOTENCY_KEY_HEADER Имя HTTP заголовка, используемого для передачи idempotence key ```php IDEMPOTENCY_KEY_HEADER = 'Idempotence-Key' ``` ###### DEFAULT_DELAY Значение по умолчанию времени ожидания между запросами при отправке повторного запроса в случае получения ответа с HTTP статусом 202. ```php DEFAULT_DELAY = 1800 ``` ###### DEFAULT_TRIES_COUNT Значение по умолчанию количества попыток получения информации от API если пришёл ответ с HTTP статусом 202 ```php DEFAULT_TRIES_COUNT = 3 ``` ###### DEFAULT_ATTEMPTS_COUNT Значение по умолчанию количества попыток получения информации от API если пришёл ответ с HTTP статусом 202 ```php DEFAULT_ATTEMPTS_COUNT = 3 ``` --- ## Properties #### protected $apiClient : ?\YooKassa\Client\ApiClientInterface --- **Summary** CURL клиент **Type:** ApiClientInterface **Details:** #### protected $attempts : int --- **Summary** Количество повторных запросов при ответе API статусом 202. ***Description*** Значение по умолчанию 3 **Type:** int **Details:** #### protected $config : array --- **Summary** Настройки для CURL клиента. **Type:** array **Details:** #### protected $logger : ?\Psr\Log\LoggerInterface --- **Summary** Объект для логирования работы SDK. **Type:** LoggerInterface **Details:** #### protected $login : ?int --- **Summary** shopId магазина. **Type:** ?int **Details:** #### protected $password : ?string --- **Summary** Секретный ключ магазина. **Type:** ?string **Details:** #### protected $timeout : int --- **Summary** Время через которое будут осуществляться повторные запросы. ***Description*** Значение по умолчанию - 1800 миллисекунд. **Type:** int Значение в миллисекундах **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(\YooKassa\Client\ApiClientInterface $apiClient = null, \YooKassa\Helpers\Config\ConfigurationLoaderInterface $configLoader = null) : mixed ``` **Summary** Constructor. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Client\ApiClientInterface | apiClient | | | \YooKassa\Helpers\Config\ConfigurationLoaderInterface | configLoader | | **Returns:** mixed - #### public getApiClient() : \YooKassa\Client\ApiClientInterface ```php public getApiClient() : \YooKassa\Client\ApiClientInterface ``` **Summary** Возвращает CURL клиента для работы с API. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) **Returns:** \YooKassa\Client\ApiClientInterface - #### public getConfig() : array ```php public getConfig() : array ``` **Summary** Возвращает настройки клиента. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) **Returns:** array - #### public isNotificationIPTrusted() : bool ```php public isNotificationIPTrusted(string $ip) : bool ``` **Summary** Метод проверяет, находится ли IP адрес среди IP адресов Юkassa, с которых отправляются уведомления. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | ip | IPv4 или IPv6 адрес webhook уведомления | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | Выбрасывается, если будет передан IP адрес неверного формата | **Returns:** bool - #### public setApiClient() : $this ```php public setApiClient(\YooKassa\Client\ApiClientInterface $apiClient) : $this ``` **Summary** Устанавливает CURL клиента для работы с API. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Client\ApiClientInterface | apiClient | | **Returns:** $this - #### public setAuth() : $this ```php public setAuth(string|int $login, string $password) : $this ``` **Summary** Устанавливает авторизацию по логин/паролю. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR int | login | | | string | password | | **Returns:** $this - ##### Examples: Пример авторизации: ```php $client->setAuth('xxxxxx', 'test_XXXXXXX'); ``` #### public setAuthToken() : $this ```php public setAuthToken(string $token) : $this ``` **Summary** Устанавливает авторизацию по Oauth-токену. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | token | | **Returns:** $this - ##### Examples: Пример авторизации: ```php $client->setAuthToken('token_XXXXXXX'); ``` #### public setConfig() : void ```php public setConfig(array $config) : void ``` **Summary** Устанавливает настройки клиента. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | config | | **Returns:** void - #### public setLogger() : self ```php public setLogger(null|callable|\Psr\Log\LoggerInterface|object $value) : self ``` **Summary** Устанавливает логгер приложения. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR callable OR \Psr\Log\LoggerInterface OR object | value | Инстанс логгера | **Returns:** self - #### public setMaxRequestAttempts() : $this ```php public setMaxRequestAttempts(int $attempts = self::DEFAULT_ATTEMPTS_COUNT) : $this ``` **Summary** Установка значения количества попыток повторных запросов при статусе 202. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | attempts | | **Returns:** $this - #### public setRetryTimeout() : $this ```php public setRetryTimeout(int $timeout = self::DEFAULT_DELAY) : $this ``` **Summary** Установка значения задержки между повторными запросами. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | timeout | | **Returns:** $this - #### protected decodeData() : array ```php protected decodeData(\YooKassa\Common\ResponseObject $response) : array ``` **Summary** Декодирует JSON строку в массив данных. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ResponseObject | response | Объект ответа на запрос к API | ##### Throws: | Type | Description | | ---- | ----------- | | \JsonException | | **Returns:** array - Массив данных #### protected delay() : void ```php protected delay(\YooKassa\Common\ResponseObject $response) : void ``` **Summary** Задержка между повторными запросами. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ResponseObject | response | Объект ответа на запрос к API | ##### Throws: | Type | Description | | ---- | ----------- | | \JsonException | | **Returns:** void - #### protected encodeData() : string ```php protected encodeData(array $serializedData) : string ``` **Summary** Кодирует массив данных в JSON строку. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | serializedData | Массив данных для кодировки | ##### Throws: | Type | Description | | ---- | ----------- | | \JsonException | Выбрасывается, если не удалось конвертировать данные в строку JSON | **Returns:** string - Строка JSON #### protected execute() : mixed|\YooKassa\Common\ResponseObject ```php protected execute(string $path, string $method, array $queryParams, null|string $httpBody = null, array $headers = []) : mixed|\YooKassa\Common\ResponseObject ``` **Summary** Выполнение запроса и обработка 202 статуса. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | path | URL запроса | | string | method | HTTP метод | | array | queryParams | Массив GET параметров запроса | | null OR string | httpBody | Тело запроса | | array | headers | Массив заголовков запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | | | \YooKassa\Common\Exceptions\AuthorizeException | | | \YooKassa\Common\Exceptions\ApiConnectionException | | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | | **Returns:** mixed|\YooKassa\Common\ResponseObject - #### protected handleError() : void ```php protected handleError(\YooKassa\Common\ResponseObject $response) : void ``` **Summary** Выбрасывает исключение по коду ошибки. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ResponseObject | response | | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API. | | \YooKassa\Common\Exceptions\ForbiddenException | секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности. | | \YooKassa\Common\Exceptions\NotFoundException | ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов. | | \YooKassa\Common\Exceptions\UnauthorizedException | неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\AuthorizeException | Ошибка авторизации. Не установлен заголовок. | **Returns:** void - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-AdditionalUserProps.md000064400000042004150364342670022773 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\AdditionalUserProps ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Class AdditionalUserProps. **Description:** Дополнительный реквизит пользователя (тег в 54 ФЗ — 1084).
Можно передавать, если вы отправляете данные для формирования чека по сценарию [Сначала платеж, потом чек](/developers/payment-acceptance/receipts/54fz/other-services/basics#receipt-after-payment) --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [NAME_MAX_LENGTH](../classes/YooKassa-Model-Receipt-AdditionalUserProps.md#constant_NAME_MAX_LENGTH) | | | | public | [VALUE_MAX_LENGTH](../classes/YooKassa-Model-Receipt-AdditionalUserProps.md#constant_VALUE_MAX_LENGTH) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$name](../classes/YooKassa-Model-Receipt-AdditionalUserProps.md#property_name) | | Наименование дополнительного реквизита пользователя (тег в 54 ФЗ — 1085). Не более 64 символов. | | public | [$value](../classes/YooKassa-Model-Receipt-AdditionalUserProps.md#property_value) | | Значение дополнительного реквизита пользователя (тег в 54 ФЗ — 1086). Не более 234 символов. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getName()](../classes/YooKassa-Model-Receipt-AdditionalUserProps.md#method_getName) | | Возвращает наименование дополнительного реквизита пользователя. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [getValue()](../classes/YooKassa-Model-Receipt-AdditionalUserProps.md#method_getValue) | | Возвращает значение дополнительного реквизита пользователя. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setName()](../classes/YooKassa-Model-Receipt-AdditionalUserProps.md#method_setName) | | Устанавливает наименование дополнительного реквизита пользователя. | | public | [setValue()](../classes/YooKassa-Model-Receipt-AdditionalUserProps.md#method_setValue) | | Устанавливает значение дополнительного реквизита пользователя. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Receipt/AdditionalUserProps.php](../../lib/Model/Receipt/AdditionalUserProps.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Receipt\AdditionalUserProps * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### NAME_MAX_LENGTH ```php NAME_MAX_LENGTH = 64 : int ``` ###### VALUE_MAX_LENGTH ```php VALUE_MAX_LENGTH = 234 : int ``` --- ## Properties #### public $name : string --- ***Description*** Наименование дополнительного реквизита пользователя (тег в 54 ФЗ — 1085). Не более 64 символов. **Type:** string **Details:** #### public $value : string --- ***Description*** Значение дополнительного реквизита пользователя (тег в 54 ФЗ — 1086). Не более 234 символов. **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getName() : string|null ```php public getName() : string|null ``` **Summary** Возвращает наименование дополнительного реквизита пользователя. **Details:** * Inherited From: [\YooKassa\Model\Receipt\AdditionalUserProps](../classes/YooKassa-Model-Receipt-AdditionalUserProps.md) **Returns:** string|null - Наименование дополнительного реквизита пользователя #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public getValue() : string|null ```php public getValue() : string|null ``` **Summary** Возвращает значение дополнительного реквизита пользователя. **Details:** * Inherited From: [\YooKassa\Model\Receipt\AdditionalUserProps](../classes/YooKassa-Model-Receipt-AdditionalUserProps.md) **Returns:** string|null - Значение дополнительного реквизита пользователя #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setName() : self ```php public setName(string|null $name = null) : self ``` **Summary** Устанавливает наименование дополнительного реквизита пользователя. **Details:** * Inherited From: [\YooKassa\Model\Receipt\AdditionalUserProps](../classes/YooKassa-Model-Receipt-AdditionalUserProps.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | name | Наименование дополнительного реквизита пользователя | **Returns:** self - #### public setValue() : self ```php public setValue(string|null $value = null) : self ``` **Summary** Устанавливает значение дополнительного реквизита пользователя. **Details:** * Inherited From: [\YooKassa\Model\Receipt\AdditionalUserProps](../classes/YooKassa-Model-Receipt-AdditionalUserProps.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Значение дополнительного реквизита пользователя | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-IncomeReceipt.md000064400000050531150364342670021460 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payout\IncomeReceipt ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель IncomeReceipt. **Description:** Данные чека, зарегистрированного в ФНС. Присутствует, если вы делаете выплату [самозанятому](/developers/payouts/scenario-extensions/self-employed). --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_SERVICE_NAME](../classes/YooKassa-Model-Payout-IncomeReceipt.md#constant_MAX_LENGTH_SERVICE_NAME) | | | | public | [MIN_LENGTH_SERVICE_NAME](../classes/YooKassa-Model-Payout-IncomeReceipt.md#constant_MIN_LENGTH_SERVICE_NAME) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Payout-IncomeReceipt.md#property_amount) | | Сумма, указанная в чеке. Присутствует, если в запросе передавалась сумма для печати в чеке. | | public | [$npd_receipt_id](../classes/YooKassa-Model-Payout-IncomeReceipt.md#property_npd_receipt_id) | | Идентификатор чека в сервисе. | | public | [$npdReceiptId](../classes/YooKassa-Model-Payout-IncomeReceipt.md#property_npdReceiptId) | | Идентификатор чека в сервисе. | | public | [$service_name](../classes/YooKassa-Model-Payout-IncomeReceipt.md#property_service_name) | | Описание услуги, оказанной получателем выплаты. Не более 50 символов. | | public | [$serviceName](../classes/YooKassa-Model-Payout-IncomeReceipt.md#property_serviceName) | | Описание услуги, оказанной получателем выплаты. Не более 50 символов. | | public | [$url](../classes/YooKassa-Model-Payout-IncomeReceipt.md#property_url) | | Ссылка на зарегистрированный чек. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Payout-IncomeReceipt.md#method_getAmount) | | Возвращает amount. | | public | [getNpdReceiptId()](../classes/YooKassa-Model-Payout-IncomeReceipt.md#method_getNpdReceiptId) | | Возвращает npd_receipt_id. | | public | [getServiceName()](../classes/YooKassa-Model-Payout-IncomeReceipt.md#method_getServiceName) | | Возвращает service_name. | | public | [getUrl()](../classes/YooKassa-Model-Payout-IncomeReceipt.md#method_getUrl) | | Возвращает ссылку на зарегистрированный чек. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Payout-IncomeReceipt.md#method_setAmount) | | Устанавливает amount. | | public | [setNpdReceiptId()](../classes/YooKassa-Model-Payout-IncomeReceipt.md#method_setNpdReceiptId) | | Устанавливает npd_receipt_id. | | public | [setServiceName()](../classes/YooKassa-Model-Payout-IncomeReceipt.md#method_setServiceName) | | Устанавливает service_name. | | public | [setUrl()](../classes/YooKassa-Model-Payout-IncomeReceipt.md#method_setUrl) | | Устанавливает ссылку на зарегистрированный чек. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payout/IncomeReceipt.php](../../lib/Model/Payout/IncomeReceipt.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payout\IncomeReceipt * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_SERVICE_NAME ```php MAX_LENGTH_SERVICE_NAME = 50 : int ``` ###### MIN_LENGTH_SERVICE_NAME ```php MIN_LENGTH_SERVICE_NAME = 1 : int ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма, указанная в чеке. Присутствует, если в запросе передавалась сумма для печати в чеке. **Type:** AmountInterface **Details:** #### public $npd_receipt_id : string --- ***Description*** Идентификатор чека в сервисе. **Type:** string **Details:** #### public $npdReceiptId : string --- ***Description*** Идентификатор чека в сервисе. **Type:** string **Details:** #### public $service_name : string --- ***Description*** Описание услуги, оказанной получателем выплаты. Не более 50 символов. **Type:** string **Details:** #### public $serviceName : string --- ***Description*** Описание услуги, оказанной получателем выплаты. Не более 50 символов. **Type:** string **Details:** #### public $url : string --- ***Description*** Ссылка на зарегистрированный чек. **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает amount. **Details:** * Inherited From: [\YooKassa\Model\Payout\IncomeReceipt](../classes/YooKassa-Model-Payout-IncomeReceipt.md) **Returns:** \YooKassa\Model\AmountInterface|null - #### public getNpdReceiptId() : string|null ```php public getNpdReceiptId() : string|null ``` **Summary** Возвращает npd_receipt_id. **Details:** * Inherited From: [\YooKassa\Model\Payout\IncomeReceipt](../classes/YooKassa-Model-Payout-IncomeReceipt.md) **Returns:** string|null - #### public getServiceName() : string|null ```php public getServiceName() : string|null ``` **Summary** Возвращает service_name. **Details:** * Inherited From: [\YooKassa\Model\Payout\IncomeReceipt](../classes/YooKassa-Model-Payout-IncomeReceipt.md) **Returns:** string|null - #### public getUrl() : string|null ```php public getUrl() : string|null ``` **Summary** Возвращает ссылку на зарегистрированный чек. **Details:** * Inherited From: [\YooKassa\Model\Payout\IncomeReceipt](../classes/YooKassa-Model-Payout-IncomeReceipt.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает amount. **Details:** * Inherited From: [\YooKassa\Model\Payout\IncomeReceipt](../classes/YooKassa-Model-Payout-IncomeReceipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | | **Returns:** self - #### public setNpdReceiptId() : self ```php public setNpdReceiptId(string|null $npd_receipt_id = null) : self ``` **Summary** Устанавливает npd_receipt_id. **Details:** * Inherited From: [\YooKassa\Model\Payout\IncomeReceipt](../classes/YooKassa-Model-Payout-IncomeReceipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | npd_receipt_id | Идентификатор чека в сервисе | **Returns:** self - #### public setServiceName() : self ```php public setServiceName(string|null $service_name = null) : self ``` **Summary** Устанавливает service_name. **Details:** * Inherited From: [\YooKassa\Model\Payout\IncomeReceipt](../classes/YooKassa-Model-Payout-IncomeReceipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | service_name | Описание услуги, оказанной получателем выплаты. Не более 50 символов. | **Returns:** self - #### public setUrl() : self ```php public setUrl(string|null $url = null) : self ``` **Summary** Устанавливает ссылку на зарегистрированный чек. **Details:** * Inherited From: [\YooKassa\Model\Payout\IncomeReceipt](../classes/YooKassa-Model-Payout-IncomeReceipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | url | Ссылка на зарегистрированный чек | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md000064400000037245150364342670024576 0ustar00# [YooKassa API SDK](../home.md) # Interface: ReceiptsRequestInterface ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Интерфейс объекта запроса списка возвратов. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getCreatedAtGt()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_getCreatedAtGt) | | Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCreatedAtGte()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_getCreatedAtGte) | | Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCreatedAtLt()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_getCreatedAtLt) | | Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCreatedAtLte()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_getCreatedAtLte) | | Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCursor()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_getCursor) | | Возвращает токен для получения следующей страницы выборки. | | public | [getLimit()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_getLimit) | | Возвращает ограничение количества объектов или null, если оно до этого не было установлено. | | public | [getPaymentId()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_getPaymentId) | | Возвращает идентификатор платежа если он задан или null. | | public | [getRefundId()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_getRefundId) | | Возвращает идентификатор возврата. | | public | [getStatus()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_getStatus) | | Возвращает статус выбираемых возвратов или null, если он до этого не был установлен. | | public | [hasCreatedAtGt()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_hasCreatedAtGt) | | Проверяет, была ли установлена дата создания от которой выбираются возвраты. | | public | [hasCreatedAtGte()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_hasCreatedAtGte) | | Проверяет, была ли установлена дата создания от которой выбираются возвраты. | | public | [hasCreatedAtLt()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_hasCreatedAtLt) | | Проверяет, была ли установлена дата создания до которой выбираются возвраты. | | public | [hasCreatedAtLte()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_hasCreatedAtLte) | | Проверяет, была ли установлена дата создания до которой выбираются возвраты. | | public | [hasCursor()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_hasCursor) | | Проверяет, был ли установлен токен следующей страницы. | | public | [hasLimit()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_hasLimit) | | Проверяет, было ли установлено ограничение количества объектов. | | public | [hasPaymentId()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_hasPaymentId) | | Проверяет, был ли задан идентификатор платежа. | | public | [hasRefundId()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_hasRefundId) | | Проверяет, был ли установлен идентификатор возврата. | | public | [hasStatus()](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md#method_hasStatus) | | Проверяет, был ли установлен статус выбираемых возвратов. | --- ### Details * File: [lib/Request/Receipts/ReceiptsRequestInterface.php](../../lib/Request/Receipts/ReceiptsRequestInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Идентификатор платежа | | property | | Идентификатор возврата | | property | | Время создания, от (включительно) | | property | | Время создания, от (не включая) | | property | | Время создания, до (включительно) | | property | | Время создания, до (не включая) | | property | | Статус возврата | | property | | Токен для получения следующей страницы выборки | | property | | Ограничение количества объектов, отображаемых на одной странице выдачи | --- ## Methods #### public getRefundId() : string|null ```php public getRefundId() : string|null ``` **Summary** Возвращает идентификатор возврата. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** string|null - Идентификатор возврата #### public hasRefundId() : bool ```php public hasRefundId() : bool ``` **Summary** Проверяет, был ли установлен идентификатор возврата. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** bool - True если идентификатор возврата был установлен, false если не был #### public getPaymentId() : null|string ```php public getPaymentId() : null|string ``` **Summary** Возвращает идентификатор платежа если он задан или null. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** null|string - Идентификатор платежа #### public hasPaymentId() : bool ```php public hasPaymentId() : bool ``` **Summary** Проверяет, был ли задан идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** bool - True если идентификатор был задан, false если нет #### public getCreatedAtGte() : null|\DateTime ```php public getCreatedAtGte() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** null|\DateTime - Время создания, от (включительно) #### public hasCreatedAtGte() : bool ```php public hasCreatedAtGte() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public getCreatedAtGt() : null|\DateTime ```php public getCreatedAtGt() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** null|\DateTime - Время создания, от (не включая) #### public hasCreatedAtGt() : bool ```php public hasCreatedAtGt() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public getCreatedAtLte() : null|\DateTime ```php public getCreatedAtLte() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** null|\DateTime - Время создания, до (включительно) #### public hasCreatedAtLte() : bool ```php public hasCreatedAtLte() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public getCreatedAtLt() : null|\DateTime ```php public getCreatedAtLt() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** null|\DateTime - Время создания, до (не включая) #### public hasCreatedAtLt() : bool ```php public hasCreatedAtLt() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public getStatus() : null|string ```php public getStatus() : null|string ``` **Summary** Возвращает статус выбираемых возвратов или null, если он до этого не был установлен. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** null|string - Статус выбираемых возвратов #### public hasStatus() : bool ```php public hasStatus() : bool ``` **Summary** Проверяет, был ли установлен статус выбираемых возвратов. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** bool - True если статус был установлен, false если нет #### public getCursor() : null|string ```php public getCursor() : null|string ``` **Summary** Возвращает токен для получения следующей страницы выборки. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** null|string - Токен для получения следующей страницы выборки #### public hasCursor() : bool ```php public hasCursor() : bool ``` **Summary** Проверяет, был ли установлен токен следующей страницы. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** bool - True если токен был установлен, false если нет #### public getLimit() : null|int ```php public getLimit() : null|int ``` **Summary** Возвращает ограничение количества объектов или null, если оно до этого не было установлено. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** null|int - Ограничение количества объектов #### public hasLimit() : bool ```php public hasLimit() : bool ``` **Summary** Проверяет, было ли установлено ограничение количества объектов. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) **Returns:** bool - True если ограничение количества объектов было установлено, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestSerializer.md000064400000004576150364342670026015 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\CreatePaymentRequestSerializer ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель CreatePaymentRequestSerializer. **Description:** Класс объекта осуществляющего сериализацию запроса к API на проведение платежа. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [serialize()](../classes/YooKassa-Request-Payments-CreatePaymentRequestSerializer.md#method_serialize) | | Формирует ассоциативный массив данных из объекта запроса. | --- ### Details * File: [lib/Request/Payments/CreatePaymentRequestSerializer.php](../../lib/Request/Payments/CreatePaymentRequestSerializer.php) * Package: YooKassa\Request * Class Hierarchy: * \YooKassa\Request\Payments\CreatePaymentRequestSerializer * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public serialize() : array ```php public serialize(\YooKassa\Request\Payments\CreatePaymentRequestInterface $request) : array ``` **Summary** Формирует ассоциативный массив данных из объекта запроса. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestSerializer](../classes/YooKassa-Request-Payments-CreatePaymentRequestSerializer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Payments\CreatePaymentRequestInterface | request | Объект запроса | **Returns:** array - Массив данных для дальнейшего кодирования в JSON --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-CalculatedVatData.md000064400000044430150364342670027301 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\CalculatedVatData ### Namespace: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank](../namespaces/yookassa-model-payment-paymentmethod-b2b-sberbank.md) --- **Summary:** Класс, представляющий модель CalculatedVatData. **Description:** Данные об НДС, если товар или услуга облагается налогом (в параметре `type` передано значение ~`calculated`). --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-CalculatedVatData.md#property_amount) | | Сумма НДС | | public | [$rate](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-CalculatedVatData.md#property_rate) | | Налоговая ставка (в процентах). Возможные значения: ~`7`, ~`10`, ~`18` и ~`20`. | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#property_type) | | Способ расчёта НДС | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-CalculatedVatData.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-CalculatedVatData.md#method_getAmount) | | Возвращает сумму НДС | | public | [getRate()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-CalculatedVatData.md#method_getRate) | | Возвращает налоговую ставку НДС | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#method_getType) | | Возвращает способ расчёта НДС | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-CalculatedVatData.md#method_setAmount) | | Устанавливает сумму НДС | | public | [setRate()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-CalculatedVatData.md#method_setRate) | | Устанавливает налоговую ставку НДС | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#method_setType) | | Устанавливает способ расчёта НДС | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/B2b/Sberbank/CalculatedVatData.php](../../lib/Model/Payment/PaymentMethod/B2b/Sberbank/CalculatedVatData.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) * \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\CalculatedVatData * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма НДС **Type:** AmountInterface **Details:** #### public $rate : string --- ***Description*** Налоговая ставка (в процентах). Возможные значения: ~`7`, ~`10`, ~`18` и ~`20`. **Type:** string **Details:** #### public $type : string --- ***Description*** Способ расчёта НДС **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) #### protected $_type : ?string --- **Type:** ?string Способ расчёта НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\CalculatedVatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-CalculatedVatData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\CalculatedVatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-CalculatedVatData.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма НДС #### public getRate() : string|null ```php public getRate() : string|null ``` **Summary** Возвращает налоговую ставку НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\CalculatedVatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-CalculatedVatData.md) **Returns:** string|null - Налоговая ставка НДС #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает способ расчёта НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) **Returns:** string|null - Способ расчёта НДС #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(null|\YooKassa\Model\AmountInterface|array $amount) : self ``` **Summary** Устанавливает сумму НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\CalculatedVatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-CalculatedVatData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \YooKassa\Model\AmountInterface OR array | amount | Сумма НДС | **Returns:** self - #### public setRate() : self ```php public setRate(string|null $rate) : self ``` **Summary** Устанавливает налоговую ставку НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\CalculatedVatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-CalculatedVatData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | rate | Налоговая ставка НДС | **Returns:** self - #### public setType() : self ```php public setType(string|null $type) : self ``` **Summary** Устанавливает способ расчёта НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Способ расчёта НДС | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-TooManyRequestsException.md000064400000010712150364342670024760 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\TooManyRequestsException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- **Summary:** Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [HTTP_CODE](../classes/YooKassa-Common-Exceptions-TooManyRequestsException.md#constant_HTTP_CODE) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$retryAfter](../classes/YooKassa-Common-Exceptions-TooManyRequestsException.md#property_retryAfter) | | | | public | [$type](../classes/YooKassa-Common-Exceptions-TooManyRequestsException.md#property_type) | | | | protected | [$responseBody](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseBody) | | | | protected | [$responseHeaders](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseHeaders) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-TooManyRequestsException.md#method___construct) | | Constructor. | | public | [getResponseBody()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseBody) | | | | public | [getResponseHeaders()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseHeaders) | | | --- ### Details * File: [lib/Common/Exceptions/TooManyRequestsException.php](../../lib/Common/Exceptions/TooManyRequestsException.php) * Package: Default * Class Hierarchy: * [\Exception](\Exception) * [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) * \YooKassa\Common\Exceptions\TooManyRequestsException --- ## Constants ###### HTTP_CODE ```php HTTP_CODE = 429 ``` --- ## Properties #### public $retryAfter : mixed --- **Type:** mixed **Details:** #### public $type : mixed --- **Type:** mixed **Details:** #### protected $responseBody : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) #### protected $responseHeaders : array --- **Type:** array **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array $responseHeaders = [], ?string $responseBody = '') : mixed ``` **Summary** Constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\TooManyRequestsException](../classes/YooKassa-Common-Exceptions-TooManyRequestsException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | responseHeaders | HTTP header | | ?string | responseBody | HTTP body | **Returns:** mixed - #### public getResponseBody() : ?string ```php public getResponseBody() : ?string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** ?string - #### public getResponseHeaders() : string[] ```php public getResponseHeaders() : string[] ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** string[] - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Helpers-UUID.md000064400000002624150364342670016563 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Helpers\UUID ### Namespace: [\YooKassa\Helpers](../namespaces/yookassa-helpers.md) --- **Summary:** Класс, представляющий модель UUID. **Description:** Класс для получения UUID. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [v4()](../classes/YooKassa-Helpers-UUID.md#method_v4) | | | --- ### Details * File: [lib/Helpers/UUID.php](../../lib/Helpers/UUID.php) * Package: YooKassa\Helpers * Class Hierarchy: * \YooKassa\Helpers\UUID * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public v4() : string ```php Static public v4() : string ``` **Details:** * Inherited From: [\YooKassa\Helpers\UUID](../classes/YooKassa-Helpers-UUID.md) **Returns:** string - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Deals-CreateDealRequestInterface.md000064400000023675150364342670024265 0ustar00# [YooKassa API SDK](../home.md) # Interface: CreateDealRequestInterface ### Namespace: [\YooKassa\Request\Deals](../namespaces/yookassa-request-deals.md) --- **Summary:** Interface CreateDealRequestInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getDescription()](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md#method_getDescription) | | Возвращает описание сделки (не более 128 символов). | | public | [getFeeMoment()](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md#method_getFeeMoment) | | Возвращает момент перечисления вам вознаграждения платформы. | | public | [getMetadata()](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md#method_getMetadata) | | Возвращает дополнительные данные сделки. | | public | [getType()](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md#method_getType) | | Возвращает тип сделки. | | public | [hasDescription()](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md#method_hasDescription) | | Проверяет наличие описания в создаваемой сделке. | | public | [hasFeeMoment()](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md#method_hasFeeMoment) | | Проверяет наличие момента перечисления вознаграждения в создаваемой сделке. | | public | [hasMetadata()](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md#method_hasMetadata) | | Проверяет, были ли установлены метаданные сделки. | | public | [hasType()](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md#method_hasType) | | Проверяет наличие типа в создаваемой сделке. | | public | [setDescription()](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md#method_setDescription) | | Устанавливает описание сделки. | | public | [setFeeMoment()](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md#method_setFeeMoment) | | Устанавливает момент перечисления вознаграждения платформы. | | public | [setMetadata()](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md#method_setMetadata) | | Устанавливает метаданные, привязанные к сделке. | | public | [setType()](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md#method_setType) | | Устанавливает тип сделки. | --- ### Details * File: [lib/Request/Deals/CreateDealRequestInterface.php](../../lib/Request/Deals/CreateDealRequestInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Тип сделки | | property | | Момент перечисления вознаграждения | | property | | Момент перечисления вознаграждения | | property | | Описание сделки | | property | | Дополнительные данные сделки | --- ## Methods #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestInterface](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md) **Returns:** string|null - Тип сделки #### public hasType() : bool ```php public hasType() : bool ``` **Summary** Проверяет наличие типа в создаваемой сделке. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestInterface](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md) **Returns:** bool - True если тип сделки установлен, false если нет #### public setType() : self ```php public setType(string $type) : self ``` **Summary** Устанавливает тип сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestInterface](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | type | Тип сделки | **Returns:** self - #### public getFeeMoment() : string|null ```php public getFeeMoment() : string|null ``` **Summary** Возвращает момент перечисления вам вознаграждения платформы. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestInterface](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md) **Returns:** string|null - Момент перечисления вознаграждения #### public hasFeeMoment() : bool ```php public hasFeeMoment() : bool ``` **Summary** Проверяет наличие момента перечисления вознаграждения в создаваемой сделке. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestInterface](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md) **Returns:** bool - True если момент перечисления вознаграждения установлен, false если нет #### public setFeeMoment() : self ```php public setFeeMoment(string $fee_moment) : self ``` **Summary** Устанавливает момент перечисления вознаграждения платформы. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestInterface](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | fee_moment | Момент перечисления вознаграждения | **Returns:** self - #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание сделки (не более 128 символов). **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestInterface](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md) **Returns:** string|null - Описание сделки #### public hasDescription() : bool ```php public hasDescription() : bool ``` **Summary** Проверяет наличие описания в создаваемой сделке. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestInterface](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md) **Returns:** bool - True если описание сделки установлено, false если нет #### public setDescription() : self ```php public setDescription(string|null $description) : self ``` **Summary** Устанавливает описание сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestInterface](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Описание сделки | **Returns:** self - #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает дополнительные данные сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestInterface](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md) **Returns:** \YooKassa\Model\Metadata|null - Дополнительные данные сделки #### public hasMetadata() : bool ```php public hasMetadata() : bool ``` **Summary** Проверяет, были ли установлены метаданные сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestInterface](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md) **Returns:** bool - True если метаданные были установлены, false если нет #### public setMetadata() : self ```php public setMetadata(null|array|\YooKassa\Model\Metadata $metadata) : self ``` **Summary** Устанавливает метаданные, привязанные к сделке. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestInterface](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Metadata | metadata | Метаданные сделки, устанавливаемые мерчантом | **Returns:** self - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationType.md000064400000011203150364342670025635 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\SelfEmployed\SelfEmployedConfirmationType ### Namespace: [\YooKassa\Model\SelfEmployed](../namespaces/yookassa-model-selfemployed.md) --- **Summary:** Класс, представляющий модель SelfEmployedConfirmationType. **Description:** Код сценария подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [REDIRECT](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationType.md#constant_REDIRECT) | | Необходимо направить плательщика на страницу партнера | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationType.md#property_validValues) | | Возвращает список доступных значений | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/SelfEmployed/SelfEmployedConfirmationType.php](../../lib/Model/SelfEmployed/SelfEmployedConfirmationType.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\SelfEmployed\SelfEmployedConfirmationType * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### REDIRECT Необходимо направить плательщика на страницу партнера ```php REDIRECT = 'redirect' ``` --- ## Properties #### protected $validValues : array --- **Summary** Возвращает список доступных значений **Type:** array Массив принимаемых enum'ом значений **Details:** ##### Tags | Tag | Version | Description | | --- | ------- | ----------- | | return | | | --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-TransferData.md000064400000063242150364342670022222 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\TransferData ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель Transfer. **Description:** Данные о распределении денег — сколько и в какой магазин нужно перевести. Присутствует, если вы используете [Сплитование платежей](/developers/solutions-for-platforms/split-payments/basics). --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Request-Payments-TransferData.md#constant_MAX_LENGTH_DESCRIPTION) | | Максимальная длина строки описания транзакции | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$account_id](../classes/YooKassa-Request-Payments-TransferData.md#property_account_id) | | Идентификатор магазина, в пользу которого вы принимаете оплату | | public | [$accountId](../classes/YooKassa-Request-Payments-TransferData.md#property_accountId) | | Идентификатор магазина, в пользу которого вы принимаете оплату | | public | [$amount](../classes/YooKassa-Request-Payments-TransferData.md#property_amount) | | Сумма, которую необходимо перечислить магазину | | public | [$description](../classes/YooKassa-Request-Payments-TransferData.md#property_description) | | Описание транзакции, которое продавец увидит в личном кабинете ЮKassa. (например: «Заказ маркетплейса №72») | | public | [$metadata](../classes/YooKassa-Request-Payments-TransferData.md#property_metadata) | | Любые дополнительные данные, которые нужны вам для работы с платежами (например, ваш внутренний идентификатор заказа) | | public | [$platform_fee_amount](../classes/YooKassa-Request-Payments-TransferData.md#property_platform_fee_amount) | | Комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу | | public | [$platformFeeAmount](../classes/YooKassa-Request-Payments-TransferData.md#property_platformFeeAmount) | | Комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAccountId()](../classes/YooKassa-Request-Payments-TransferData.md#method_getAccountId) | | Возвращает account_id. | | public | [getAmount()](../classes/YooKassa-Request-Payments-TransferData.md#method_getAmount) | | Возвращает amount. | | public | [getDescription()](../classes/YooKassa-Request-Payments-TransferData.md#method_getDescription) | | Возвращает description. | | public | [getMetadata()](../classes/YooKassa-Request-Payments-TransferData.md#method_getMetadata) | | Возвращает metadata. | | public | [getPlatformFeeAmount()](../classes/YooKassa-Request-Payments-TransferData.md#method_getPlatformFeeAmount) | | Возвращает platform_fee_amount. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasAccountId()](../classes/YooKassa-Request-Payments-TransferData.md#method_hasAccountId) | | | | public | [hasAmount()](../classes/YooKassa-Request-Payments-TransferData.md#method_hasAmount) | | | | public | [hasDescription()](../classes/YooKassa-Request-Payments-TransferData.md#method_hasDescription) | | | | public | [hasMetadata()](../classes/YooKassa-Request-Payments-TransferData.md#method_hasMetadata) | | | | public | [hasPlatformFeeAmount()](../classes/YooKassa-Request-Payments-TransferData.md#method_hasPlatformFeeAmount) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAccountId()](../classes/YooKassa-Request-Payments-TransferData.md#method_setAccountId) | | Устанавливает account_id. | | public | [setAmount()](../classes/YooKassa-Request-Payments-TransferData.md#method_setAmount) | | Устанавливает amount. | | public | [setDescription()](../classes/YooKassa-Request-Payments-TransferData.md#method_setDescription) | | Устанавливает description. | | public | [setMetadata()](../classes/YooKassa-Request-Payments-TransferData.md#method_setMetadata) | | Устанавливает metadata. | | public | [setPlatformFeeAmount()](../classes/YooKassa-Request-Payments-TransferData.md#method_setPlatformFeeAmount) | | Устанавливает platform_fee_amount. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/TransferData.php](../../lib/Request/Payments/TransferData.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\Payments\TransferData * Implements: * [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Максимальная длина строки описания транзакции ```php MAX_LENGTH_DESCRIPTION = 128 ``` --- ## Properties #### public $account_id : string --- ***Description*** Идентификатор магазина, в пользу которого вы принимаете оплату **Type:** string **Details:** #### public $accountId : string --- ***Description*** Идентификатор магазина, в пользу которого вы принимаете оплату **Type:** string **Details:** #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма, которую необходимо перечислить магазину **Type:** AmountInterface **Details:** #### public $description : string --- ***Description*** Описание транзакции, которое продавец увидит в личном кабинете ЮKassa. (например: «Заказ маркетплейса №72») **Type:** string **Details:** #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Любые дополнительные данные, которые нужны вам для работы с платежами (например, ваш внутренний идентификатор заказа) **Type:** Metadata **Details:** #### public $platform_fee_amount : \YooKassa\Model\AmountInterface --- ***Description*** Комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу **Type:** AmountInterface **Details:** #### public $platformFeeAmount : \YooKassa\Model\AmountInterface --- ***Description*** Комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу **Type:** AmountInterface **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAccountId() : string|null ```php public getAccountId() : string|null ``` **Summary** Возвращает account_id. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) **Returns:** string|null - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает amount. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) **Returns:** \YooKassa\Model\AmountInterface|null - #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает description. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) **Returns:** string|null - #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает metadata. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) **Returns:** \YooKassa\Model\Metadata|null - #### public getPlatformFeeAmount() : \YooKassa\Model\AmountInterface|null ```php public getPlatformFeeAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает platform_fee_amount. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) **Returns:** \YooKassa\Model\AmountInterface|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasAccountId() : bool ```php public hasAccountId() : bool ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) **Returns:** bool - #### public hasAmount() : bool ```php public hasAmount() : bool ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) **Returns:** bool - #### public hasDescription() : bool ```php public hasDescription() : bool ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) **Returns:** bool - #### public hasMetadata() : bool ```php public hasMetadata() : bool ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) **Returns:** bool - #### public hasPlatformFeeAmount() : bool ```php public hasPlatformFeeAmount() : bool ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) **Returns:** bool - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAccountId() : self ```php public setAccountId(string|null $value = null) : self ``` **Summary** Устанавливает account_id. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | | **Returns:** self - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $value = null) : self ``` **Summary** Устанавливает amount. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | value | | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $value = null) : self ``` **Summary** Устанавливает description. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Описание транзакции (не более 128 символов), которое продавец увидит в личном кабинете ЮKassa. Например: «Заказ маркетплейса №72». | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(string|array|null $value = null) : self ``` **Summary** Устанавливает metadata. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR array OR null | value | Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). Передаются в виде набора пар «ключ-значение» и возвращаются в ответе от ЮKassa. Ограничения: максимум 16 ключей, имя ключа не больше 32 символов, значение ключа не больше 512 символов, тип данных — строка в формате UTF-8. | **Returns:** self - #### public setPlatformFeeAmount() : self ```php public setPlatformFeeAmount(\YooKassa\Model\AmountInterface|array|null $value = null) : self ``` **Summary** Устанавливает platform_fee_amount. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferData](../classes/YooKassa-Request-Payments-TransferData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | value | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md000064400000164747150364342670024434 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Request\Receipts\AbstractReceiptResponse ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Class AbstractReceipt. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [LENGTH_RECEIPT_ID](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#constant_LENGTH_RECEIPT_ID) | | Длина идентификатора чека | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$fiscal_attribute](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_attribute) | | Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. | | public | [$fiscal_document_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_document_number) | | Номер фискального документа. | | public | [$fiscal_provider_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_provider_id) | | Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. | | public | [$fiscal_storage_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_storage_number) | | Номер фискального накопителя в кассовом аппарате. | | public | [$fiscalAttribute](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalAttribute) | | Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. | | public | [$fiscalDocumentNumber](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalDocumentNumber) | | Номер фискального документа. | | public | [$fiscalProviderId](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalProviderId) | | Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. | | public | [$fiscalStorageNumber](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalStorageNumber) | | Номер фискального накопителя в кассовом аппарате. | | public | [$id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_id) | | Идентификатор чека в ЮKassa. | | public | [$items](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_items) | | Список товаров в заказе. | | public | [$object_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_object_id) | | Идентификатор объекта чека. | | public | [$objectId](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_objectId) | | Идентификатор объекта чека. | | public | [$on_behalf_of](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_on_behalf_of) | | Идентификатор магазина. | | public | [$onBehalfOf](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_onBehalfOf) | | Идентификатор магазина. | | public | [$receipt_industry_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receipt_industry_details) | | Отраслевой реквизит чека. | | public | [$receipt_operational_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receipt_operational_details) | | Операционный реквизит чека. | | public | [$receiptIndustryDetails](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receiptIndustryDetails) | | Отраслевой реквизит чека. | | public | [$receiptOperationalDetails](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receiptOperationalDetails) | | Операционный реквизит чека. | | public | [$registered_at](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_registered_at) | | Дата и время формирования чека в фискальном накопителе. | | public | [$registeredAt](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_registeredAt) | | Дата и время формирования чека в фискальном накопителе. | | public | [$settlements](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_settlements) | | Перечень совершенных расчетов. | | public | [$status](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_status) | | Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled"). | | public | [$tax_system_code](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_tax_system_code) | | Код системы налогообложения. Число 1-6. | | public | [$taxSystemCode](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_taxSystemCode) | | Код системы налогообложения. Число 1-6. | | public | [$type](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_type) | | Тип чека в онлайн-кассе: приход "payment" или возврат "refund". | | protected | [$_fiscal_attribute](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_attribute) | | | | protected | [$_fiscal_document_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_document_number) | | | | protected | [$_fiscal_provider_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_provider_id) | | | | protected | [$_fiscal_storage_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_storage_number) | | | | protected | [$_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__id) | | | | protected | [$_items](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__items) | | | | protected | [$_object_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__object_id) | | | | protected | [$_on_behalf_of](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__on_behalf_of) | | | | protected | [$_receipt_industry_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__receipt_industry_details) | | | | protected | [$_receipt_operational_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__receipt_operational_details) | | | | protected | [$_registered_at](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__registered_at) | | | | protected | [$_settlements](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__settlements) | | | | protected | [$_status](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__status) | | | | protected | [$_tax_system_code](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__tax_system_code) | | | | protected | [$_type](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [addItem()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_addItem) | | Добавляет товар в чек. | | public | [addSettlement()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_addSettlement) | | Добавляет оплату в массив. | | public | [fromArray()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_fromArray) | | AbstractReceiptResponse constructor. | | public | [getFiscalAttribute()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalAttribute) | | Возвращает фискальный признак чека. | | public | [getFiscalDocumentNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalDocumentNumber) | | Возвращает номер фискального документа. | | public | [getFiscalProviderId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalProviderId) | | Возвращает идентификатор чека в онлайн-кассе. | | public | [getFiscalStorageNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalStorageNumber) | | Возвращает номер фискального накопителя в кассовом аппарате. | | public | [getId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getId) | | Возвращает идентификатор чека в ЮKassa. | | public | [getItems()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getItems) | | Возвращает список товаров в заказ. | | public | [getObjectId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getObjectId) | | Возвращает идентификатор платежа или возврата, для которого был сформирован чек. | | public | [getOnBehalfOf()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getOnBehalfOf) | | Возвращает идентификатор магазин | | public | [getReceiptIndustryDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getReceiptIndustryDetails) | | Возвращает отраслевой реквизит чека. | | public | [getReceiptOperationalDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getReceiptOperationalDetails) | | Возвращает операционный реквизит чека. | | public | [getRegisteredAt()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getRegisteredAt) | | Возвращает дату и время формирования чека в фискальном накопителе. | | public | [getSettlements()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getSettlements) | | Возвращает Массив оплат, обеспечивающих выдачу товара. | | public | [getStatus()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getStatus) | | Возвращает статус доставки данных для чека в онлайн-кассу. | | public | [getTaxSystemCode()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getTaxSystemCode) | | Возвращает код системы налогообложения. | | public | [getType()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getType) | | Возвращает тип чека в онлайн-кассе. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [notEmpty()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_notEmpty) | | Проверяет есть ли в чеке хотя бы одна позиция. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setFiscalAttribute()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalAttribute) | | Устанавливает фискальный признак чека. | | public | [setFiscalDocumentNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalDocumentNumber) | | Устанавливает номер фискального документа | | public | [setFiscalProviderId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalProviderId) | | Устанавливает идентификатор чека в онлайн-кассе. | | public | [setFiscalStorageNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalStorageNumber) | | Устанавливает номер фискального накопителя в кассовом аппарате. | | public | [setId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setId) | | Устанавливает идентификатор чека. | | public | [setItems()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setItems) | | Устанавливает список позиций в чеке. | | public | [setObjectId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setObjectId) | | Устанавливает идентификатор платежа или возврата, для которого был сформирован чек. | | public | [setOnBehalfOf()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setOnBehalfOf) | | Возвращает идентификатор магазина, от имени которого нужно отправить чек. | | public | [setReceiptIndustryDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setReceiptIndustryDetails) | | Устанавливает отраслевой реквизит чека. | | public | [setReceiptOperationalDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setReceiptOperationalDetails) | | Устанавливает операционный реквизит чека. | | public | [setRegisteredAt()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setRegisteredAt) | | Устанавливает дату и время формирования чека в фискальном накопителе. | | public | [setSettlements()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setSettlements) | | Устанавливает массив оплат, обеспечивающих выдачу товара. | | public | [setSpecificProperties()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setSpecificProperties) | | Установка свойств, присущих конкретному объекту. | | public | [setStatus()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setStatus) | | Устанавливает состояние регистрации фискального чека. | | public | [setTaxSystemCode()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setTaxSystemCode) | | Устанавливает код системы налогообложения. | | public | [setType()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setType) | | Устанавливает типа чека. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Receipts/AbstractReceiptResponse.php](../../lib/Request/Receipts/AbstractReceiptResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\Receipts\AbstractReceiptResponse * Implements: * [\YooKassa\Request\Receipts\ReceiptResponseInterface](../classes/YooKassa-Request-Receipts-ReceiptResponseInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### LENGTH_RECEIPT_ID Длина идентификатора чека ```php LENGTH_RECEIPT_ID = 39 ``` --- ## Properties #### public $fiscal_attribute : string --- ***Description*** Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. **Type:** string **Details:** #### public $fiscal_document_number : string --- ***Description*** Номер фискального документа. **Type:** string **Details:** #### public $fiscal_provider_id : string --- ***Description*** Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. **Type:** string **Details:** #### public $fiscal_storage_number : string --- ***Description*** Номер фискального накопителя в кассовом аппарате. **Type:** string **Details:** #### public $fiscalAttribute : string --- ***Description*** Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. **Type:** string **Details:** #### public $fiscalDocumentNumber : string --- ***Description*** Номер фискального документа. **Type:** string **Details:** #### public $fiscalProviderId : string --- ***Description*** Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. **Type:** string **Details:** #### public $fiscalStorageNumber : string --- ***Description*** Номер фискального накопителя в кассовом аппарате. **Type:** string **Details:** #### public $id : string --- ***Description*** Идентификатор чека в ЮKassa. **Type:** string **Details:** #### public $items : \YooKassa\Common\ListObjectInterface|\YooKassa\Request\Receipts\ReceiptResponseItemInterface[] --- ***Description*** Список товаров в заказе. **Type:** ReceiptResponseItemInterface[] **Details:** #### public $object_id : string --- ***Description*** Идентификатор объекта чека. **Type:** string **Details:** #### public $objectId : string --- ***Description*** Идентификатор объекта чека. **Type:** string **Details:** #### public $on_behalf_of : string --- ***Description*** Идентификатор магазина. **Type:** string **Details:** #### public $onBehalfOf : string --- ***Description*** Идентификатор магазина. **Type:** string **Details:** #### public $receipt_industry_details : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\IndustryDetails[] --- ***Description*** Отраслевой реквизит чека. **Type:** IndustryDetails[] **Details:** #### public $receipt_operational_details : \YooKassa\Model\Receipt\OperationalDetails --- ***Description*** Операционный реквизит чека. **Type:** OperationalDetails **Details:** #### public $receiptIndustryDetails : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\IndustryDetails[] --- ***Description*** Отраслевой реквизит чека. **Type:** IndustryDetails[] **Details:** #### public $receiptOperationalDetails : \YooKassa\Model\Receipt\OperationalDetails --- ***Description*** Операционный реквизит чека. **Type:** OperationalDetails **Details:** #### public $registered_at : \DateTime --- ***Description*** Дата и время формирования чека в фискальном накопителе. **Type:** \DateTime **Details:** #### public $registeredAt : \DateTime --- ***Description*** Дата и время формирования чека в фискальном накопителе. **Type:** \DateTime **Details:** #### public $settlements : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\SettlementInterface[] --- ***Description*** Перечень совершенных расчетов. **Type:** SettlementInterface[] **Details:** #### public $status : string --- ***Description*** Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled"). **Type:** string **Details:** #### public $tax_system_code : int --- ***Description*** Код системы налогообложения. Число 1-6. **Type:** int **Details:** #### public $taxSystemCode : int --- ***Description*** Код системы налогообложения. Число 1-6. **Type:** int **Details:** #### public $type : string --- ***Description*** Тип чека в онлайн-кассе: приход "payment" или возврат "refund". **Type:** string **Details:** #### protected $_fiscal_attribute : ?string --- **Type:** ?string Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. **Details:** #### protected $_fiscal_document_number : ?string --- **Type:** ?string Номер фискального документа. **Details:** #### protected $_fiscal_provider_id : ?string --- **Type:** ?string Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. **Details:** #### protected $_fiscal_storage_number : ?string --- **Type:** ?string Номер фискального накопителя в кассовом аппарате. **Details:** #### protected $_id : ?string --- **Type:** ?string Идентификатор чека в ЮKassa. **Details:** #### protected $_items : ?\YooKassa\Common\ListObject --- **Type:** ListObject Список товаров в заказе **Details:** #### protected $_object_id : ?string --- **Type:** ?string Идентификатор объекта чека **Details:** #### protected $_on_behalf_of : ?string --- **Type:** ?string Идентификатор магазина **Details:** #### protected $_receipt_industry_details : ?\YooKassa\Common\ListObject --- **Type:** ListObject Отраслевой реквизит предмета расчета **Details:** #### protected $_receipt_operational_details : ?\YooKassa\Model\Receipt\OperationalDetails --- **Type:** OperationalDetails Операционный реквизит чека **Details:** #### protected $_registered_at : ?\DateTime --- **Type:** DateTime Дата и время формирования чека в фискальном накопителе. Указывается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). **Details:** #### protected $_settlements : ?\YooKassa\Common\ListObject --- **Type:** ListObject Список оплат **Details:** #### protected $_status : ?string --- **Type:** ?string Статус доставки данных для чека в онлайн-кассу "pending", "succeeded" или "canceled". **Details:** #### protected $_tax_system_code : ?int --- **Type:** ?int Код системы налогообложения. Число 1-6. **Details:** #### protected $_type : ?string --- **Type:** ?string Тип чека в онлайн-кассе: приход "payment" или возврат "refund". **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public addItem() : void ```php public addItem(\YooKassa\Request\Receipts\ReceiptResponseItemInterface $value) : void ``` **Summary** Добавляет товар в чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Receipts\ReceiptResponseItemInterface | value | Объект добавляемой в чек позиции | **Returns:** void - #### public addSettlement() : void ```php public addSettlement(\YooKassa\Model\Receipt\SettlementInterface $value) : void ``` **Summary** Добавляет оплату в массив. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\SettlementInterface | value | | **Returns:** void - #### public fromArray() : void ```php public fromArray(mixed $sourceArray) : void ``` **Summary** AbstractReceiptResponse constructor. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | sourceArray | | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** void - #### public getFiscalAttribute() : string|null ```php public getFiscalAttribute() : string|null ``` **Summary** Возвращает фискальный признак чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Фискальный признак чека #### public getFiscalDocumentNumber() : string|null ```php public getFiscalDocumentNumber() : string|null ``` **Summary** Возвращает номер фискального документа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Номер фискального документа #### public getFiscalProviderId() : string|null ```php public getFiscalProviderId() : string|null ``` **Summary** Возвращает идентификатор чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Идентификатор чека в онлайн-кассе #### public getFiscalStorageNumber() : string|null ```php public getFiscalStorageNumber() : string|null ``` **Summary** Возвращает номер фискального накопителя в кассовом аппарате. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Номер фискального накопителя в кассовом аппарате #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор чека в ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Идентификатор чека в ЮKassa #### public getItems() : \YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|\YooKassa\Common\ListObjectInterface ```php public getItems() : \YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список товаров в заказ. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|\YooKassa\Common\ListObjectInterface - #### public getObjectId() : string|null ```php public getObjectId() : string|null ``` **Summary** Возвращает идентификатор платежа или возврата, для которого был сформирован чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - #### public getOnBehalfOf() : string|null ```php public getOnBehalfOf() : string|null ``` **Summary** Возвращает идентификатор магазин **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - #### public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ```php public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface - Отраслевой реквизит чека #### public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails|null ```php public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails|null ``` **Summary** Возвращает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Model\Receipt\OperationalDetails|null - Операционный реквизит чека #### public getRegisteredAt() : \DateTime|null ```php public getRegisteredAt() : \DateTime|null ``` **Summary** Возвращает дату и время формирования чека в фискальном накопителе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \DateTime|null - Дата и время формирования чека в фискальном накопителе #### public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает Массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface - #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус доставки данных для чека в онлайн-кассу. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled") #### public getTaxSystemCode() : int|null ```php public getTaxSystemCode() : int|null ``` **Summary** Возвращает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** int|null - Код системы налогообложения. Число 1-6. #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Тип чека в онлайн-кассе: приход "payment" или возврат "refund" #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public notEmpty() : bool ```php public notEmpty() : bool ``` **Summary** Проверяет есть ли в чеке хотя бы одна позиция. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** bool - True если чек не пуст, false если в чеке нет ни одной позиции #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setFiscalAttribute() : self ```php public setFiscalAttribute(string|null $fiscal_attribute = null) : self ``` **Summary** Устанавливает фискальный признак чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_attribute | Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. | **Returns:** self - #### public setFiscalDocumentNumber() : self ```php public setFiscalDocumentNumber(string|null $fiscal_document_number = null) : self ``` **Summary** Устанавливает номер фискального документа **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_document_number | Номер фискального документа. | **Returns:** self - #### public setFiscalProviderId() : self ```php public setFiscalProviderId(string|null $fiscal_provider_id = null) : self ``` **Summary** Устанавливает идентификатор чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_provider_id | Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. | **Returns:** self - #### public setFiscalStorageNumber() : self ```php public setFiscalStorageNumber(string|null $fiscal_storage_number = null) : self ``` **Summary** Устанавливает номер фискального накопителя в кассовом аппарате. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_storage_number | Номер фискального накопителя в кассовом аппарате. | **Returns:** self - #### public setId() : self ```php public setId(string $id) : self ``` **Summary** Устанавливает идентификатор чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | id | Идентификатор чека | **Returns:** self - #### public setItems() : self ```php public setItems(\YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|null $items) : self ``` **Summary** Устанавливает список позиций в чеке. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Receipts\ReceiptResponseItemInterface[] OR null | items | Список товаров в заказе | **Returns:** self - #### public setObjectId() : self ```php public setObjectId(string|null $object_id) : self ``` **Summary** Устанавливает идентификатор платежа или возврата, для которого был сформирован чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | object_id | | **Returns:** self - #### public setOnBehalfOf() : self ```php public setOnBehalfOf(string|null $on_behalf_of = null) : self ``` **Summary** Возвращает идентификатор магазина, от имени которого нужно отправить чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | on_behalf_of | Идентификатор магазина, от имени которого нужно отправить чек | **Returns:** self - #### public setReceiptIndustryDetails() : self ```php public setReceiptIndustryDetails(array|\YooKassa\Model\Receipt\IndustryDetails[]|null $receipt_industry_details = null) : self ``` **Summary** Устанавливает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\IndustryDetails[] OR null | receipt_industry_details | Отраслевой реквизит чека | **Returns:** self - #### public setReceiptOperationalDetails() : self ```php public setReceiptOperationalDetails(array|\YooKassa\Model\Receipt\OperationalDetails|null $receipt_operational_details = null) : self ``` **Summary** Устанавливает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\OperationalDetails OR null | receipt_operational_details | Операционный реквизит чека | **Returns:** self - #### public setRegisteredAt() : self ```php public setRegisteredAt(\DateTime|string|null $registered_at = null) : self ``` **Summary** Устанавливает дату и время формирования чека в фискальном накопителе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | registered_at | Дата и время формирования чека в фискальном накопителе. Указывается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). | **Returns:** self - #### public setSettlements() : self ```php public setSettlements(\YooKassa\Model\Receipt\SettlementInterface[]|null $settlements) : self ``` **Summary** Устанавливает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\SettlementInterface[] OR null | settlements | | **Returns:** self - #### public setSpecificProperties() : void ```php Abstract public setSpecificProperties(array $receiptData) : void ``` **Summary** Установка свойств, присущих конкретному объекту. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | receiptData | | **Returns:** void - #### public setStatus() : self ```php public setStatus(string|null $status) : self ``` **Summary** Устанавливает состояние регистрации фискального чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Состояние регистрации фискального чека | **Returns:** self - #### public setTaxSystemCode() : self ```php public setTaxSystemCode(int|null $tax_system_code) : self ``` **Summary** Устанавливает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | tax_system_code | Код системы налогообложения. Число 1-6 | **Returns:** self - #### public setType() : self ```php public setType(string $type) : self ``` **Summary** Устанавливает типа чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | type | Тип чека | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-FeeMoment.md000064400000011144150364342670020172 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Deal\FeeMoment ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Класс, представляющий модель FeeMoment. **Description:** Момент перечисления вам вознаграждения платформы. Возможные значения: ~`payment_succeeded` — после успешной оплаты; ~`deal_closed` — при закрытии сделки после успешной выплаты. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [PAYMENT_SUCCEEDED](../classes/YooKassa-Model-Deal-FeeMoment.md#constant_PAYMENT_SUCCEEDED) | | | | public | [DEAL_CLOSED](../classes/YooKassa-Model-Deal-FeeMoment.md#constant_DEAL_CLOSED) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Deal-FeeMoment.md#property_validValues) | | Возвращает список доступных значений | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Deal/FeeMoment.php](../../lib/Model/Deal/FeeMoment.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Deal\FeeMoment * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### PAYMENT_SUCCEEDED ```php PAYMENT_SUCCEEDED = 'payment_succeeded' : string ``` ###### DEAL_CLOSED ```php DEAL_CLOSED = 'deal_closed' : string ``` --- ## Properties #### protected $validValues : array --- **Summary** Возвращает список доступных значений **Type:** array Массив принимаемых enum'ом значений **Details:** ##### Tags | Tag | Version | Description | | --- | ------- | ----------- | | return | | | --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Client-UserAgent.md000064400000020612150364342670017523 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Client\UserAgent ### Namespace: [\YooKassa\Client](../namespaces/yookassa-client.md) --- **Summary:** Класс, представляющий модель UserAgent. **Description:** Класс для создания заголовка User-Agent в запросах к API. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [HEADER](../classes/YooKassa-Client-UserAgent.md#constant_HEADER) | | Имя заголовка для User-Agent | | public | [VERSION_DELIMITER](../classes/YooKassa-Client-UserAgent.md#constant_VERSION_DELIMITER) | | Разделитель части заголовка и её версии | | public | [PART_DELIMITER](../classes/YooKassa-Client-UserAgent.md#constant_PART_DELIMITER) | | Разделитель между частями заголовка | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Client-UserAgent.md#method___construct) | | Конструктор UserAgent. | | public | [createVersion()](../classes/YooKassa-Client-UserAgent.md#method_createVersion) | | Создание строки версии компонента. | | public | [getCms()](../classes/YooKassa-Client-UserAgent.md#method_getCms) | | Возвращает версию CMS. | | public | [getFramework()](../classes/YooKassa-Client-UserAgent.md#method_getFramework) | | Возвращает версию фреймворка. | | public | [getHeaderString()](../classes/YooKassa-Client-UserAgent.md#method_getHeaderString) | | Формирует конечную строку из составных частей. | | public | [getModule()](../classes/YooKassa-Client-UserAgent.md#method_getModule) | | Возвращает версию модуля. | | public | [getOs()](../classes/YooKassa-Client-UserAgent.md#method_getOs) | | Возвращает версию операционной системы. | | public | [getPhp()](../classes/YooKassa-Client-UserAgent.md#method_getPhp) | | Возвращает версию PHP. | | public | [getSdk()](../classes/YooKassa-Client-UserAgent.md#method_getSdk) | | Возвращает версию SDK. | | public | [setCms()](../classes/YooKassa-Client-UserAgent.md#method_setCms) | | Устанавливает версию CMS. | | public | [setFramework()](../classes/YooKassa-Client-UserAgent.md#method_setFramework) | | Устанавливает версию фреймворка. | | public | [setModule()](../classes/YooKassa-Client-UserAgent.md#method_setModule) | | Устанавливает версию модуля. | --- ### Details * File: [lib/Client/UserAgent.php](../../lib/Client/UserAgent.php) * Package: YooKassa * Class Hierarchy: * \YooKassa\Client\UserAgent * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### HEADER Имя заголовка для User-Agent ```php HEADER = 'YM-User-Agent' ``` ###### VERSION_DELIMITER Разделитель части заголовка и её версии ```php VERSION_DELIMITER = '/' ``` ###### PART_DELIMITER Разделитель между частями заголовка ```php PART_DELIMITER = ' ' ``` --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор UserAgent. **Details:** * Inherited From: [\YooKassa\Client\UserAgent](../classes/YooKassa-Client-UserAgent.md) **Returns:** mixed - #### public createVersion() : string ```php public createVersion(string $name, string $version) : string ``` **Summary** Создание строки версии компонента. **Details:** * Inherited From: [\YooKassa\Client\UserAgent](../classes/YooKassa-Client-UserAgent.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | name | | | string | version | | **Returns:** string - #### public getCms() : ?string ```php public getCms() : ?string ``` **Summary** Возвращает версию CMS. **Details:** * Inherited From: [\YooKassa\Client\UserAgent](../classes/YooKassa-Client-UserAgent.md) **Returns:** ?string - #### public getFramework() : ?string ```php public getFramework() : ?string ``` **Summary** Возвращает версию фреймворка. **Details:** * Inherited From: [\YooKassa\Client\UserAgent](../classes/YooKassa-Client-UserAgent.md) **Returns:** ?string - #### public getHeaderString() : string ```php public getHeaderString() : string ``` **Summary** Формирует конечную строку из составных частей. **Details:** * Inherited From: [\YooKassa\Client\UserAgent](../classes/YooKassa-Client-UserAgent.md) **Returns:** string - #### public getModule() : ?string ```php public getModule() : ?string ``` **Summary** Возвращает версию модуля. **Details:** * Inherited From: [\YooKassa\Client\UserAgent](../classes/YooKassa-Client-UserAgent.md) **Returns:** ?string - #### public getOs() : ?string ```php public getOs() : ?string ``` **Summary** Возвращает версию операционной системы. **Details:** * Inherited From: [\YooKassa\Client\UserAgent](../classes/YooKassa-Client-UserAgent.md) **Returns:** ?string - #### public getPhp() : ?string ```php public getPhp() : ?string ``` **Summary** Возвращает версию PHP. **Details:** * Inherited From: [\YooKassa\Client\UserAgent](../classes/YooKassa-Client-UserAgent.md) **Returns:** ?string - #### public getSdk() : ?string ```php public getSdk() : ?string ``` **Summary** Возвращает версию SDK. **Details:** * Inherited From: [\YooKassa\Client\UserAgent](../classes/YooKassa-Client-UserAgent.md) **Returns:** ?string - #### public setCms() : void ```php public setCms(string $name, string $version) : void ``` **Summary** Устанавливает версию CMS. **Details:** * Inherited From: [\YooKassa\Client\UserAgent](../classes/YooKassa-Client-UserAgent.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | name | | | string | version | | **Returns:** void - #### public setFramework() : void ```php public setFramework(string $name, string $version) : void ``` **Summary** Устанавливает версию фреймворка. **Details:** * Inherited From: [\YooKassa\Client\UserAgent](../classes/YooKassa-Client-UserAgent.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | name | | | string | version | | **Returns:** void - #### public setModule() : void ```php public setModule(string $name, string $version) : void ``` **Summary** Устанавливает версию модуля. **Details:** * Inherited From: [\YooKassa\Client\UserAgent](../classes/YooKassa-Client-UserAgent.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | name | | | string | version | | **Returns:** void - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Notification-NotificationCanceled.md000064400000055675150364342670024162 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Notification\NotificationCanceled ### Namespace: [\YooKassa\Model\Notification](../namespaces/yookassa-model-notification.md) --- **Summary:** Класс объекта, присылаемого API при изменении статуса платежа на "canceled". --- ### Examples Пример скрипта обработки уведомления ```php require_once '../vendor/autoload.php'; try { $source = file_get_contents('php://input'); $data = json_decode($source, true); $factory = new \YooKassa\Model\Notification\NotificationFactory(); $notificationObject = $factory->factory($data); $responseObject = $notificationObject->getObject(); $client = new \YooKassa\Client(); if (!$client->isNotificationIPTrusted($_SERVER['REMOTE_ADDR'])) { header('HTTP/1.1 400 Something went wrong'); exit; } if (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_CANCELED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::REFUND_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'refundId' => $responseObject->getId(), 'refundStatus' => $responseObject->getStatus(), 'paymentId' => $responseObject->getPaymentId(), ]; // ... // Специфичная логика } else { header('HTTP/1.1 400 Something went wrong'); exit; } // Специфичная логика // ... $client->setAuth('xxxxxx', 'test_XXXXXXX'); // Получим актуальную информацию о платеже if ($paymentInfo = $client->getPaymentInfo($someData['paymentId'])) { $paymentStatus = $paymentInfo->getStatus(); // Специфичная логика // ... } else { header('HTTP/1.1 400 Something went wrong'); exit; } } catch (Exception $e) { header('HTTP/1.1 400 Something went wrong'); exit; } ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_event) | | Тип события | | public | [$object](../classes/YooKassa-Model-Notification-NotificationCanceled.md#property_object) | | Объект с информацией о платеже | | public | [$type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_type) | | Тип уведомления в виде строки | | protected | [$_event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__event) | | | | protected | [$_type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Model-Notification-NotificationCanceled.md#method_fromArray) | | Конструктор объекта нотификации о возможности подтверждения платежа. | | public | [getEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getEvent) | | Возвращает тип события. | | public | [getObject()](../classes/YooKassa-Model-Notification-NotificationCanceled.md#method_getObject) | | Возвращает объект с информацией о платеже, уведомление о котором хранится в текущем объекте. | | public | [getType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getType) | | Возвращает тип уведомления. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setObject()](../classes/YooKassa-Model-Notification-NotificationCanceled.md#method_setObject) | | Устанавливает объект с информацией о платеже, уведомление о котором хранится в текущем объекте. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setEvent) | | Устанавливает тип события. | | protected | [setType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setType) | | Устанавливает тип уведомления. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Notification/NotificationCanceled.php](../../lib/Model/Notification/NotificationCanceled.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) * \YooKassa\Model\Notification\NotificationCanceled * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $event : string --- ***Description*** Тип события **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### public $object : \YooKassa\Model\Payment\PaymentInterface --- ***Description*** Объект с информацией о платеже **Type:** PaymentInterface **Details:** #### public $type : string --- ***Description*** Тип уведомления в виде строки **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### protected $_event : ?string --- **Type:** ?string Тип произошедшего события **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### protected $_type : ?string --- **Type:** ?string Тип уведомления **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array $sourceArray) : void ``` **Summary** Конструктор объекта нотификации о возможности подтверждения платежа. **Description** Инициализирует текущий объект из ассоциативного массива, который просто путём JSON десериализации получен из тела пришедшего запроса. При конструировании проверяется валидность типа передаваемого уведомления, если передать уведомление не того типа, будет сгенерировано исключение типа {@link} **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationCanceled](../classes/YooKassa-Model-Notification-NotificationCanceled.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | sourceArray | Ассоциативный массив с информацией об уведомлении | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если значение типа нотификации или события не равны "notification" и "payment.canceled" соответственно, что может говорить о том, что переданные в конструктор данные не являются уведомлением нужного типа. | **Returns:** void - #### public getEvent() : string|null ```php public getEvent() : string|null ``` **Summary** Возвращает тип события. **Description** Тип события - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип события #### public getObject() : \YooKassa\Model\Payment\PaymentInterface ```php public getObject() : \YooKassa\Model\Payment\PaymentInterface ``` **Summary** Возвращает объект с информацией о платеже, уведомление о котором хранится в текущем объекте. **Description** Так как нотификация может быть сгенерирована и поставлена в очередь на отправку гораздо раньше, чем она будет получена на сайте, то опираться на статус пришедшего платежа не стоит, лучше запросить текущую информацию о платеже у API. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationCanceled](../classes/YooKassa-Model-Notification-NotificationCanceled.md) **Returns:** \YooKassa\Model\Payment\PaymentInterface - Объект с информацией о платеже #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип уведомления. **Description** Тип уведомления - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип уведомления в виде строки #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setObject() : self ```php public setObject(\YooKassa\Model\Payment\PaymentInterface|array $object) : self ``` **Summary** Устанавливает объект с информацией о платеже, уведомление о котором хранится в текущем объекте. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationCanceled](../classes/YooKassa-Model-Notification-NotificationCanceled.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\PaymentInterface OR array | object | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setEvent() : self ```php protected setEvent(string|null $event) : self ``` **Summary** Устанавливает тип события. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | event | Тип события | **Returns:** self - #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип уведомления. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип уведомления | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-Confirmation-ConfirmationCodeVerification.md000064400000040072150364342670027301 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\Confirmation\ConfirmationCodeVerification ### Namespace: [\YooKassa\Model\Payment\Confirmation](../namespaces/yookassa-model-payment-confirmation.md) --- **Summary:** Класс, представляющий модель ConfirmationEmbedded. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#property_type) | | Тип подтверждения платежа | | protected | [$_type](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#property__type) | | Тип подтверждения платежа. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationCodeVerification.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getConfirmationData()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationData) | | | | public | [getConfirmationToken()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationToken) | | | | public | [getConfirmationUrl()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationUrl) | | | | public | [getType()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getType) | | Возвращает тип подтверждения платежа. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setType()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_setType) | | Устанавливает тип подтверждения платежа | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/Confirmation/ConfirmationCodeVerification.php](../../lib/Model/Payment/Confirmation/ConfirmationCodeVerification.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) * \YooKassa\Model\Payment\Confirmation\ConfirmationCodeVerification * See Also: * [Сценарий при котором необходимо получить одноразовый код от плательщика для подтверждения платежа.](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип подтверждения платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) #### protected $_type : ?string --- **Summary** Тип подтверждения платежа. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationCodeVerification](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationCodeVerification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getConfirmationData() ```php public getConfirmationData() ``` **Description** Для ConfirmationQr **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationToken() ```php public getConfirmationToken() ``` **Description** Для ConfirmationEmbedded **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationUrl() ```php public getConfirmationUrl() ``` **Description** Для ConfirmationRedirect **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getType() : ?string ```php public getType() : ?string ``` **Summary** Возвращает тип подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** ?string - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип подтверждения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип подтверждения платежа | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationFactory.md000064400000007361150364342670030217 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmationFactory ### Namespace: [\YooKassa\Request\SelfEmployed](../namespaces/yookassa-request-selfemployed.md) --- **Summary:** Класс, представляющий модель SelfEmployedRequestConfirmationFactory. **Description:** Фабрика создания объекта типа подтверждения для самозанятых --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [factory()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationFactory.md#method_factory) | | Возвращает объект, соответствующий типу подтверждения платежа. | | public | [factoryFromArray()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationFactory.md#method_factoryFromArray) | | Возвращает объект, соответствующий типу подтверждения платежа, из массива данных. | --- ### Details * File: [lib/Request/SelfEmployed/SelfEmployedRequestConfirmationFactory.php](../../lib/Request/SelfEmployed/SelfEmployedRequestConfirmationFactory.php) * Package: YooKassa\Request * Class Hierarchy: * \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmationFactory * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public factory() : \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation ```php public factory(string $type) : \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation ``` **Summary** Возвращает объект, соответствующий типу подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmationFactory](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | type | Тип подтверждения платежа | **Returns:** \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation - #### public factoryFromArray() : \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation ```php public factoryFromArray(array $data, null|string $type = null) : \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation ``` **Summary** Возвращает объект, соответствующий типу подтверждения платежа, из массива данных. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmationFactory](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | data | Массив данных подтверждения платежа | | null OR string | type | Тип подтверждения платежа | **Returns:** \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md000064400000047014150364342670024257 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Receipts\ReceiptsRequestBuilder ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Класс билдера объектов запросов к API списка чеков. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$currentObject](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md#property_currentObject) | | Инстанс собираемого запроса. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. | | public | [build()](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md#method_build) | | Собирает и возвращает объект запроса списка чеков магазина. | | public | [setCreatedAtGt()](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md#method_setCreatedAtGt) | | Устанавливает дату создания от которой выбираются чеки. | | public | [setCreatedAtGte()](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md#method_setCreatedAtGte) | | Устанавливает дату создания от которой выбираются чеки. | | public | [setCreatedAtLt()](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md#method_setCreatedAtLt) | | Устанавливает дату создания до которой выбираются чеки. | | public | [setCreatedAtLte()](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md#method_setCreatedAtLte) | | Устанавливает дату создания до которой выбираются чеки. | | public | [setCursor()](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md#method_setCursor) | | Устанавливает токен следующей страницы выборки. | | public | [setLimit()](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md#method_setLimit) | | Устанавливает ограничение количества объектов чеков. | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива. | | public | [setPaymentId()](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md#method_setPaymentId) | | Устанавливает идентификатор платежа или null, если требуется его удалить. | | public | [setRefundId()](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md#method_setRefundId) | | Устанавливает идентификатор возврата. | | public | [setStatus()](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md#method_setStatus) | | Устанавливает статус выбираемых чеков. | | protected | [initCurrentObject()](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md#method_initCurrentObject) | | Инициализирует новый инстанс собираемого объекта. | --- ### Details * File: [lib/Request/Receipts/ReceiptsRequestBuilder.php](../../lib/Request/Receipts/ReceiptsRequestBuilder.php) * Package: Default * Class Hierarchy: * [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) * \YooKassa\Request\Receipts\ReceiptsRequestBuilder --- ## Properties #### protected $currentObject : ?\YooKassa\Common\AbstractRequestInterface --- **Summary** Инстанс собираемого запроса. **Type:** AbstractRequestInterface Инстанс собираемого объекта запроса **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public build() : \YooKassa\Common\AbstractRequestInterface|\YooKassa\Request\Receipts\ReceiptsRequest ```php public build(null|array $options = null) : \YooKassa\Common\AbstractRequestInterface|\YooKassa\Request\Receipts\ReceiptsRequest ``` **Summary** Собирает и возвращает объект запроса списка чеков магазина. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestBuilder](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array | options | Массив с настройками запроса | **Returns:** \YooKassa\Common\AbstractRequestInterface|\YooKassa\Request\Receipts\ReceiptsRequest - Инстанс объекта запроса к API для получения списка чеков магазина #### public setCreatedAtGt() : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ```php public setCreatedAtGt(null|\DateTime|int|string $value) : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ``` **Summary** Устанавливает дату создания от которой выбираются чеки. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestBuilder](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, от (не включая) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Receipts\ReceiptsRequestBuilder - Инстанс текущего объекта билдера #### public setCreatedAtGte() : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ```php public setCreatedAtGte(null|\DateTime|int|string $value) : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ``` **Summary** Устанавливает дату создания от которой выбираются чеки. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestBuilder](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, от (включительно) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Receipts\ReceiptsRequestBuilder - Инстанс текущего объекта билдера #### public setCreatedAtLt() : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ```php public setCreatedAtLt(null|\DateTime|int|string $value) : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ``` **Summary** Устанавливает дату создания до которой выбираются чеки. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestBuilder](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, до (не включая) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Receipts\ReceiptsRequestBuilder - Инстанс текущего объекта билдера #### public setCreatedAtLte() : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ```php public setCreatedAtLte(null|\DateTime|int|string $value) : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ``` **Summary** Устанавливает дату создания до которой выбираются чеки. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestBuilder](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, до (включительно) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Receipts\ReceiptsRequestBuilder - Инстанс текущего объекта билдера #### public setCursor() : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ```php public setCursor(null|string $value) : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ``` **Summary** Устанавливает токен следующей страницы выборки. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestBuilder](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | value | Токен следующей страницы выборки или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод была передана не строка | **Returns:** \YooKassa\Request\Receipts\ReceiptsRequestBuilder - Инстанс текущего объекта билдера #### public setLimit() : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ```php public setLimit(null|int $value) : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ``` **Summary** Устанавливает ограничение количества объектов чеков. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestBuilder](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR int | value | Ограничение количества объектов чеков или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод было передана не целое число | **Returns:** \YooKassa\Request\Receipts\ReceiptsRequestBuilder - Инстанс текущего билдера #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(iterable|null $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable OR null | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### public setPaymentId() : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ```php public setPaymentId(null|string $value) : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ``` **Summary** Устанавливает идентификатор платежа или null, если требуется его удалить. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestBuilder](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | value | Идентификатор платежа | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если длина переданной строки не равна 36 символам | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод была передана не строка | **Returns:** \YooKassa\Request\Receipts\ReceiptsRequestBuilder - Инстанс текущего объекта билдера #### public setRefundId() : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ```php public setRefundId(string $value) : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ``` **Summary** Устанавливает идентификатор возврата. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestBuilder](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Идентификатор возврата, который ищется в API | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если длина переданного значения не равна 36 | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод была передана не строка | **Returns:** \YooKassa\Request\Receipts\ReceiptsRequestBuilder - Инстанс текущего объекта билдера #### public setStatus() : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ```php public setStatus(null|string $value) : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ``` **Summary** Устанавливает статус выбираемых чеков. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestBuilder](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | value | Статус выбираемых платежей или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если переданное значение не является валидным статусом | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод была передана не строка | **Returns:** \YooKassa\Request\Receipts\ReceiptsRequestBuilder - Инстанс текущего объекта билдера #### protected initCurrentObject() : \YooKassa\Request\Receipts\ReceiptsRequest ```php protected initCurrentObject() : \YooKassa\Request\Receipts\ReceiptsRequest ``` **Summary** Инициализирует новый инстанс собираемого объекта. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestBuilder](../classes/YooKassa-Request-Receipts-ReceiptsRequestBuilder.md) **Returns:** \YooKassa\Request\Receipts\ReceiptsRequest - Инстанс собираемого запроса --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-CancellationDetailsInterface.md000064400000004664150364342670023204 0ustar00# [YooKassa API SDK](../home.md) # Interface: CancellationDetailsInterface ### Namespace: [\YooKassa\Model](../namespaces/yookassa-model.md) --- **Summary:** Interface CancellationDetailsInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getParty()](../classes/YooKassa-Model-CancellationDetailsInterface.md#method_getParty) | | Возвращает участника процесса платежа, который принял решение об отмене транзакции. | | public | [getReason()](../classes/YooKassa-Model-CancellationDetailsInterface.md#method_getReason) | | Возвращает причину отмены платежа. | --- ### Details * File: [lib/Model/CancellationDetailsInterface.php](../../lib/Model/CancellationDetailsInterface.php) * Package: \Default --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | property | | Участник процесса платежа, который принял решение об отмене транзакции. | | property | | Причина отмены платежа. | --- ## Methods #### public getParty() : string ```php public getParty() : string ``` **Summary** Возвращает участника процесса платежа, который принял решение об отмене транзакции. **Details:** * Inherited From: [\YooKassa\Model\CancellationDetailsInterface](../classes/YooKassa-Model-CancellationDetailsInterface.md) **Returns:** string - Участник процесса платежа #### public getReason() : string ```php public getReason() : string ``` **Summary** Возвращает причину отмены платежа. **Details:** * Inherited From: [\YooKassa\Model\CancellationDetailsInterface](../classes/YooKassa-Model-CancellationDetailsInterface.md) **Returns:** string - Причина отмены платежа --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-RefundDealInfo.md000064400000040507150364342670021145 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Deal\RefundDealInfo ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Класс, представляющий модель RefundDealInfo. **Description:** Данные о сделке, в составе которой проходит возврат. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Deal-RefundDealInfo.md#property_id) | | Идентификатор сделки | | public | [$refund_settlements](../classes/YooKassa-Model-Deal-RefundDealInfo.md#property_refund_settlements) | | Данные о распределении денег | | public | [$refundSettlements](../classes/YooKassa-Model-Deal-RefundDealInfo.md#property_refundSettlements) | | Данные о распределении денег | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Deal-RefundDealInfo.md#method_getId) | | Возвращает Id сделки. | | public | [getRefundSettlements()](../classes/YooKassa-Model-Deal-RefundDealInfo.md#method_getRefundSettlements) | | Возвращает массив оплат, обеспечивающих выдачу товара. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Deal-RefundDealInfo.md#method_setId) | | Устанавливает Id сделки. | | public | [setRefundSettlements()](../classes/YooKassa-Model-Deal-RefundDealInfo.md#method_setRefundSettlements) | | Устанавливает массив оплат, обеспечивающих выдачу товара. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Deal/RefundDealInfo.php](../../lib/Model/Deal/RefundDealInfo.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Deal\RefundDealInfo * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $id : string --- ***Description*** Идентификатор сделки **Type:** string **Details:** #### public $refund_settlements : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\SettlementInterface[] --- ***Description*** Данные о распределении денег **Type:** SettlementInterface[] **Details:** #### public $refundSettlements : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\SettlementInterface[] --- ***Description*** Данные о распределении денег **Type:** SettlementInterface[] **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\RefundDealInfo](../classes/YooKassa-Model-Deal-RefundDealInfo.md) **Returns:** string|null - #### public getRefundSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ```php public getRefundSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Model\Deal\RefundDealInfo](../classes/YooKassa-Model-Deal-RefundDealInfo.md) **Returns:** \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface - Массив оплат, обеспечивающих выдачу товара #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\RefundDealInfo](../classes/YooKassa-Model-Deal-RefundDealInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | | **Returns:** self - #### public setRefundSettlements() : self ```php public setRefundSettlements(\YooKassa\Common\ListObjectInterface|array|null $refund_settlements = null) : self ``` **Summary** Устанавливает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Model\Deal\RefundDealInfo](../classes/YooKassa-Model-Deal-RefundDealInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | refund_settlements | Данные о распределении денег. | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Refunds-CreateRefundRequest.md000064400000104020150364342670023360 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Refunds\CreateRefundRequest ### Namespace: [\YooKassa\Request\Refunds](../namespaces/yookassa-request-refunds.md) --- **Summary:** Класс, представляющий модель CreateRefundRequest. **Description:** Класс объекта запроса для создания возврата. --- ### Examples Пример использования билдера ```php try { $refundBuilder = \YooKassa\Request\Refunds\CreateRefundRequest::builder(); $refundBuilder ->setPaymentId('24b94598-000f-5000-9000-1b68e7b15f3f') ->setAmount(3500.00) ->setCurrency(\YooKassa\Model\CurrencyCode::RUB) ->setDescription('Не подошел цвет') ->setReceiptItems([ (new \YooKassa\Model\Receipt\ReceiptItem) ->setDescription('Платок Gucci Новый') ->setQuantity(1) ->setVatCode(2) ->setPrice(new \YooKassa\Model\Receipt\ReceiptItemAmount(3500.00)) ->setPaymentSubject(\YooKassa\Model\Receipt\PaymentSubject::COMMODITY) ->setPaymentMode(\YooKassa\Model\Receipt\PaymentMode::FULL_PAYMENT) ]) ->setReceiptEmail('john.doe@merchant.com') ->setTaxSystemCode(1) ; // Создаем объект запроса $request = $refundBuilder->build(); // Можно изменить данные, если нужно $request->setDescription('Не подошел цвет и размер'); $idempotenceKey = uniqid('', true); $response = $client->createRefund($request, $idempotenceKey); } catch (Exception $e) { $response = $e; } var_dump($response); ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#property_amount) | | Сумма возврата | | public | [$deal](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#property_deal) | | Информация о сделке | | public | [$description](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#property_description) | | Комментарий к операции возврата, основание для возврата средств покупателю. | | public | [$paymentId](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#property_paymentId) | | Айди платежа для которого создаётся возврат | | public | [$receipt](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#property_receipt) | | Инстанс чека или null | | public | [$sources](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#property_sources) | | Информация о распределении денег — сколько и в какой магазин нужно перевести | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [builder()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_builder) | | Возвращает билдер объектов текущего типа. | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_getAmount) | | Возвращает сумму возврата. | | public | [getDeal()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_getDeal) | | Возвращает данные о сделке, в составе которой проходит возврат | | public | [getDescription()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_getDescription) | | Возвращает комментарий к возврату или null, если комментарий не задан. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [getPaymentId()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_getPaymentId) | | Возвращает идентификатор платежа для которого создаётся возврат средств. | | public | [getReceipt()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_getReceipt) | | Возвращает чек, если он есть. | | public | [getSources()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_getSources) | | Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasAmount()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_hasAmount) | | Проверяет, была ли установлена сумма возврата. | | public | [hasDeal()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_hasDeal) | | Проверяет, были ли установлены данные о сделке. | | public | [hasDescription()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_hasDescription) | | Проверяет задан ли комментарий к создаваемому возврату. | | public | [hasPaymentId()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_hasPaymentId) | | Проверяет, был ли установлена идентификатор платежа. | | public | [hasReceipt()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_hasReceipt) | | Проверяет наличие чека. | | public | [hasSources()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_hasSources) | | Проверяет наличие информации о распределении денег. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [removeReceipt()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_removeReceipt) | | Удаляет чек из запроса. | | public | [setAmount()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_setAmount) | | Устанавливает сумму. | | public | [setDeal()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_setDeal) | | Устанавливает данные о сделке, в составе которой проходит возврат | | public | [setDescription()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_setDescription) | | Устанавливает комментарий к возврату. | | public | [setPaymentId()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_setPaymentId) | | Устанавливает идентификатор платежа для которого создаётся возврат | | public | [setReceipt()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_setReceipt) | | Устанавливает чек. | | public | [setSources()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_setSources) | | Устанавливает sources (массив распределения денег между магазинами). | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | public | [validate()](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md#method_validate) | | Валидирует объект запроса. | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_setValidationError) | | Устанавливает ошибку валидации. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Refunds/CreateRefundRequest.php](../../lib/Request/Refunds/CreateRefundRequest.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) * \YooKassa\Request\Refunds\CreateRefundRequest * Implements: * [\YooKassa\Request\Refunds\CreateRefundRequestInterface](../classes/YooKassa-Request-Refunds-CreateRefundRequestInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возврата **Type:** AmountInterface **Details:** #### public $deal : null|\YooKassa\Model\Deal\RefundDealData --- ***Description*** Информация о сделке **Type:** RefundDealData **Details:** #### public $description : string --- ***Description*** Комментарий к операции возврата, основание для возврата средств покупателю. **Type:** string **Details:** #### public $paymentId : string --- ***Description*** Айди платежа для которого создаётся возврат **Type:** string **Details:** #### public $receipt : null|\YooKassa\Model\Receipt\ReceiptInterface --- ***Description*** Инстанс чека или null **Type:** ReceiptInterface **Details:** #### public $sources : null|\YooKassa\Common\ListObjectInterface|\YooKassa\Model\Refund\SourceInterface[] --- ***Description*** Информация о распределении денег — сколько и в какой магазин нужно перевести **Type:** SourceInterface[] **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public builder() : \YooKassa\Request\Refunds\CreateRefundRequestBuilder ```php Static public builder() : \YooKassa\Request\Refunds\CreateRefundRequestBuilder ``` **Summary** Возвращает билдер объектов текущего типа. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** \YooKassa\Request\Refunds\CreateRefundRequestBuilder - Инстанс билдера запросов #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму возврата. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма возврата #### public getDeal() : \YooKassa\Model\Deal\RefundDealData|null ```php public getDeal() : \YooKassa\Model\Deal\RefundDealData|null ``` **Summary** Возвращает данные о сделке, в составе которой проходит возврат **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** \YooKassa\Model\Deal\RefundDealData|null - Данные о сделке, в составе которой проходит возврат #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает комментарий к возврату или null, если комментарий не задан. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** string|null - Комментарий к операции возврата, основание для возврата средств покупателю #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string|null - Последняя произошедшая ошибка валидации #### public getPaymentId() : string|null ```php public getPaymentId() : string|null ``` **Summary** Возвращает идентификатор платежа для которого создаётся возврат средств. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** string|null - Идентификатор платежа для которого создаётся возврат #### public getReceipt() : null|\YooKassa\Model\Receipt\ReceiptInterface ```php public getReceipt() : null|\YooKassa\Model\Receipt\ReceiptInterface ``` **Summary** Возвращает чек, если он есть. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** null|\YooKassa\Model\Receipt\ReceiptInterface - Данные фискального чека 54-ФЗ или null, если чека нет #### public getSources() : \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSources() : \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface - Информация о распределении денег #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasAmount() : bool ```php public hasAmount() : bool ``` **Summary** Проверяет, была ли установлена сумма возврата. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** bool - True если сумма возврата была установлена, false если нет #### public hasDeal() : bool ```php public hasDeal() : bool ``` **Summary** Проверяет, были ли установлены данные о сделке. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** bool - True если данные о сделке были установлены, false если нет #### public hasDescription() : bool ```php public hasDescription() : bool ``` **Summary** Проверяет задан ли комментарий к создаваемому возврату. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** bool - True если комментарий установлен, false если нет #### public hasPaymentId() : bool ```php public hasPaymentId() : bool ``` **Summary** Проверяет, был ли установлена идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** bool - True если идентификатор платежа был установлен, false если нет #### public hasReceipt() : bool ```php public hasReceipt() : bool ``` **Summary** Проверяет наличие чека. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** bool - True если чек есть, false если нет #### public hasSources() : bool ```php public hasSources() : bool ``` **Summary** Проверяет наличие информации о распределении денег. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** bool - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public removeReceipt() : void ```php public removeReceipt() : void ``` **Summary** Удаляет чек из запроса. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|string $amount = null) : self ``` **Summary** Устанавливает сумму. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR string | amount | Сумма возврата | **Returns:** self - #### public setDeal() : self ```php public setDeal(null|array|\YooKassa\Model\Deal\RefundDealData $deal = null) : self ``` **Summary** Устанавливает данные о сделке, в составе которой проходит возврат **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\RefundDealData | deal | Данные о сделке, в составе которой проходит возврат | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает комментарий к возврату. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Комментарий к операции возврата, основание для возврата средств покупателю | **Returns:** self - #### public setPaymentId() : self ```php public setPaymentId(string|null $payment_id = null) : self ``` **Summary** Устанавливает идентификатор платежа для которого создаётся возврат **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_id | Идентификатор платежа | **Returns:** self - #### public setReceipt() : self ```php public setReceipt(null|array|\YooKassa\Model\Receipt\ReceiptInterface $receipt = null) : self ``` **Summary** Устанавливает чек. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Receipt\ReceiptInterface | receipt | Инстанс чека или null для удаления информации о чеке | **Returns:** self - #### public setSources() : self ```php public setSources(array|\YooKassa\Common\ListObjectInterface|null $sources = null) : self ``` **Summary** Устанавливает sources (массив распределения денег между магазинами). **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Common\ListObjectInterface OR null | sources | Массив распределения денег между магазинами | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public validate() : bool ```php public validate() : bool ``` **Summary** Валидирует объект запроса. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequest](../classes/YooKassa-Request-Refunds-CreateRefundRequest.md) **Returns:** bool - True если запрос валиден и его можно отправить в API, false если нет #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setValidationError() : void ```php protected setValidationError(string $value) : void ``` **Summary** Устанавливает ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** void - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentResponse.md000064400000230453150364342670023000 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentResponse ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель PaymentResponse. **Description:** Объект ответа, возвращаемого API при запросе конкретного платежа. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Payment-Payment.md#constant_MAX_LENGTH_DESCRIPTION) | | Максимальная длина строки описания платежа | | public | [MAX_LENGTH_MERCHANT_CUSTOMER_ID](../classes/YooKassa-Model-Payment-Payment.md#constant_MAX_LENGTH_MERCHANT_CUSTOMER_ID) | | Максимальная длина строки идентификатора покупателя в вашей системе | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Payment-Payment.md#property_amount) | | Сумма заказа | | public | [$authorization_details](../classes/YooKassa-Model-Payment-Payment.md#property_authorization_details) | | Данные об авторизации платежа | | public | [$authorizationDetails](../classes/YooKassa-Model-Payment-Payment.md#property_authorizationDetails) | | Данные об авторизации платежа | | public | [$cancellation_details](../classes/YooKassa-Model-Payment-Payment.md#property_cancellation_details) | | Комментарий к отмене платежа | | public | [$cancellationDetails](../classes/YooKassa-Model-Payment-Payment.md#property_cancellationDetails) | | Комментарий к отмене платежа | | public | [$captured_at](../classes/YooKassa-Model-Payment-Payment.md#property_captured_at) | | Время подтверждения платежа магазином | | public | [$capturedAt](../classes/YooKassa-Model-Payment-Payment.md#property_capturedAt) | | Время подтверждения платежа магазином | | public | [$confirmation](../classes/YooKassa-Model-Payment-Payment.md#property_confirmation) | | Способ подтверждения платежа | | public | [$created_at](../classes/YooKassa-Model-Payment-Payment.md#property_created_at) | | Время создания заказа | | public | [$createdAt](../classes/YooKassa-Model-Payment-Payment.md#property_createdAt) | | Время создания заказа | | public | [$deal](../classes/YooKassa-Model-Payment-Payment.md#property_deal) | | Данные о сделке, в составе которой проходит платеж | | public | [$description](../classes/YooKassa-Model-Payment-Payment.md#property_description) | | Описание транзакции | | public | [$expires_at](../classes/YooKassa-Model-Payment-Payment.md#property_expires_at) | | Время, до которого можно бесплатно отменить или подтвердить платеж | | public | [$expiresAt](../classes/YooKassa-Model-Payment-Payment.md#property_expiresAt) | | Время, до которого можно бесплатно отменить или подтвердить платеж | | public | [$id](../classes/YooKassa-Model-Payment-Payment.md#property_id) | | Идентификатор платежа | | public | [$income_amount](../classes/YooKassa-Model-Payment-Payment.md#property_income_amount) | | Сумма платежа, которую получит магазин | | public | [$incomeAmount](../classes/YooKassa-Model-Payment-Payment.md#property_incomeAmount) | | Сумма платежа, которую получит магазин | | public | [$merchant_customer_id](../classes/YooKassa-Model-Payment-Payment.md#property_merchant_customer_id) | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | public | [$merchantCustomerId](../classes/YooKassa-Model-Payment-Payment.md#property_merchantCustomerId) | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | public | [$metadata](../classes/YooKassa-Model-Payment-Payment.md#property_metadata) | | Метаданные платежа указанные мерчантом | | public | [$paid](../classes/YooKassa-Model-Payment-Payment.md#property_paid) | | Признак оплаты заказа | | public | [$payment_method](../classes/YooKassa-Model-Payment-Payment.md#property_payment_method) | | Способ проведения платежа | | public | [$paymentMethod](../classes/YooKassa-Model-Payment-Payment.md#property_paymentMethod) | | Способ проведения платежа | | public | [$receipt_registration](../classes/YooKassa-Model-Payment-Payment.md#property_receipt_registration) | | Состояние регистрации фискального чека | | public | [$receiptRegistration](../classes/YooKassa-Model-Payment-Payment.md#property_receiptRegistration) | | Состояние регистрации фискального чека | | public | [$recipient](../classes/YooKassa-Model-Payment-Payment.md#property_recipient) | | Получатель платежа | | public | [$refundable](../classes/YooKassa-Model-Payment-Payment.md#property_refundable) | | Возможность провести возврат по API | | public | [$refunded_amount](../classes/YooKassa-Model-Payment-Payment.md#property_refunded_amount) | | Сумма возвращенных средств платежа | | public | [$refundedAmount](../classes/YooKassa-Model-Payment-Payment.md#property_refundedAmount) | | Сумма возвращенных средств платежа | | public | [$status](../classes/YooKassa-Model-Payment-Payment.md#property_status) | | Текущее состояние платежа | | public | [$test](../classes/YooKassa-Model-Payment-Payment.md#property_test) | | Признак тестовой операции | | public | [$transfers](../classes/YooKassa-Model-Payment-Payment.md#property_transfers) | | Данные о распределении платежа между магазинами | | protected | [$_amount](../classes/YooKassa-Model-Payment-Payment.md#property__amount) | | | | protected | [$_authorization_details](../classes/YooKassa-Model-Payment-Payment.md#property__authorization_details) | | Данные об авторизации платежа | | protected | [$_cancellation_details](../classes/YooKassa-Model-Payment-Payment.md#property__cancellation_details) | | Комментарий к статусу canceled: кто отменил платеж и по какой причине | | protected | [$_captured_at](../classes/YooKassa-Model-Payment-Payment.md#property__captured_at) | | | | protected | [$_confirmation](../classes/YooKassa-Model-Payment-Payment.md#property__confirmation) | | | | protected | [$_created_at](../classes/YooKassa-Model-Payment-Payment.md#property__created_at) | | | | protected | [$_deal](../classes/YooKassa-Model-Payment-Payment.md#property__deal) | | | | protected | [$_description](../classes/YooKassa-Model-Payment-Payment.md#property__description) | | | | protected | [$_expires_at](../classes/YooKassa-Model-Payment-Payment.md#property__expires_at) | | Время, до которого можно бесплатно отменить или подтвердить платеж. В указанное время платеж в статусе `waiting_for_capture` будет автоматически отменен. | | protected | [$_id](../classes/YooKassa-Model-Payment-Payment.md#property__id) | | | | protected | [$_income_amount](../classes/YooKassa-Model-Payment-Payment.md#property__income_amount) | | | | protected | [$_merchant_customer_id](../classes/YooKassa-Model-Payment-Payment.md#property__merchant_customer_id) | | | | protected | [$_metadata](../classes/YooKassa-Model-Payment-Payment.md#property__metadata) | | | | protected | [$_paid](../classes/YooKassa-Model-Payment-Payment.md#property__paid) | | | | protected | [$_payment_method](../classes/YooKassa-Model-Payment-Payment.md#property__payment_method) | | | | protected | [$_receipt_registration](../classes/YooKassa-Model-Payment-Payment.md#property__receipt_registration) | | | | protected | [$_recipient](../classes/YooKassa-Model-Payment-Payment.md#property__recipient) | | | | protected | [$_refundable](../classes/YooKassa-Model-Payment-Payment.md#property__refundable) | | | | protected | [$_refunded_amount](../classes/YooKassa-Model-Payment-Payment.md#property__refunded_amount) | | | | protected | [$_status](../classes/YooKassa-Model-Payment-Payment.md#property__status) | | | | protected | [$_test](../classes/YooKassa-Model-Payment-Payment.md#property__test) | | Признак тестовой операции. | | protected | [$_transfers](../classes/YooKassa-Model-Payment-Payment.md#property__transfers) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getAmount) | | Возвращает сумму. | | public | [getAuthorizationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_getAuthorizationDetails) | | Возвращает данные об авторизации платежа. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_getCancellationDetails) | | Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [getCapturedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getCapturedAt) | | Возвращает время подтверждения платежа магазином или null, если время не задано. | | public | [getConfirmation()](../classes/YooKassa-Model-Payment-Payment.md#method_getConfirmation) | | Возвращает способ подтверждения платежа. | | public | [getCreatedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getCreatedAt) | | Возвращает время создания заказа. | | public | [getDeal()](../classes/YooKassa-Model-Payment-Payment.md#method_getDeal) | | Возвращает данные о сделке, в составе которой проходит платеж. | | public | [getDescription()](../classes/YooKassa-Model-Payment-Payment.md#method_getDescription) | | Возвращает описание транзакции | | public | [getExpiresAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getExpiresAt) | | Возвращает время до которого можно бесплатно отменить или подтвердить платеж, или null, если оно не задано. | | public | [getId()](../classes/YooKassa-Model-Payment-Payment.md#method_getId) | | Возвращает идентификатор платежа. | | public | [getIncomeAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getIncomeAmount) | | Возвращает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa. | | public | [getMerchantCustomerId()](../classes/YooKassa-Model-Payment-Payment.md#method_getMerchantCustomerId) | | Возвращает идентификатор покупателя в вашей системе. | | public | [getMetadata()](../classes/YooKassa-Model-Payment-Payment.md#method_getMetadata) | | Возвращает метаданные платежа установленные мерчантом | | public | [getPaid()](../classes/YooKassa-Model-Payment-Payment.md#method_getPaid) | | Проверяет, был ли уже оплачен заказ. | | public | [getPaymentMethod()](../classes/YooKassa-Model-Payment-Payment.md#method_getPaymentMethod) | | Возвращает используемый способ проведения платежа. | | public | [getReceiptRegistration()](../classes/YooKassa-Model-Payment-Payment.md#method_getReceiptRegistration) | | Возвращает состояние регистрации фискального чека. | | public | [getRecipient()](../classes/YooKassa-Model-Payment-Payment.md#method_getRecipient) | | Возвращает получателя платежа. | | public | [getRefundable()](../classes/YooKassa-Model-Payment-Payment.md#method_getRefundable) | | Проверяет возможность провести возврат по API. | | public | [getRefundedAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getRefundedAmount) | | Возвращает сумму возвращенных средств. | | public | [getStatus()](../classes/YooKassa-Model-Payment-Payment.md#method_getStatus) | | Возвращает состояние платежа. | | public | [getTest()](../classes/YooKassa-Model-Payment-Payment.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getTransfers()](../classes/YooKassa-Model-Payment-Payment.md#method_getTransfers) | | Возвращает массив распределения денег между магазинами. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setAmount) | | Устанавливает сумму платежа. | | public | [setAuthorizationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_setAuthorizationDetails) | | Устанавливает данные об авторизации платежа. | | public | [setCancellationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_setCancellationDetails) | | Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [setCapturedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setCapturedAt) | | Устанавливает время подтверждения платежа магазином | | public | [setConfirmation()](../classes/YooKassa-Model-Payment-Payment.md#method_setConfirmation) | | Устанавливает способ подтверждения платежа. | | public | [setCreatedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setCreatedAt) | | Устанавливает время создания заказа. | | public | [setDeal()](../classes/YooKassa-Model-Payment-Payment.md#method_setDeal) | | Устанавливает данные о сделке, в составе которой проходит платеж. | | public | [setDescription()](../classes/YooKassa-Model-Payment-Payment.md#method_setDescription) | | Устанавливает описание транзакции | | public | [setExpiresAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setExpiresAt) | | Устанавливает время до которого можно бесплатно отменить или подтвердить платеж. | | public | [setId()](../classes/YooKassa-Model-Payment-Payment.md#method_setId) | | Устанавливает идентификатор платежа. | | public | [setIncomeAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setIncomeAmount) | | Устанавливает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa | | public | [setMerchantCustomerId()](../classes/YooKassa-Model-Payment-Payment.md#method_setMerchantCustomerId) | | Устанавливает идентификатор покупателя в вашей системе. | | public | [setMetadata()](../classes/YooKassa-Model-Payment-Payment.md#method_setMetadata) | | Устанавливает метаданные платежа. | | public | [setPaid()](../classes/YooKassa-Model-Payment-Payment.md#method_setPaid) | | Устанавливает флаг оплаты заказа. | | public | [setPaymentMethod()](../classes/YooKassa-Model-Payment-Payment.md#method_setPaymentMethod) | | Устанавливает используемый способ проведения платежа. | | public | [setReceiptRegistration()](../classes/YooKassa-Model-Payment-Payment.md#method_setReceiptRegistration) | | Устанавливает состояние регистрации фискального чека | | public | [setRecipient()](../classes/YooKassa-Model-Payment-Payment.md#method_setRecipient) | | Устанавливает получателя платежа. | | public | [setRefundable()](../classes/YooKassa-Model-Payment-Payment.md#method_setRefundable) | | Устанавливает возможность провести возврат по API. | | public | [setRefundedAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setRefundedAmount) | | Устанавливает сумму возвращенных средств. | | public | [setStatus()](../classes/YooKassa-Model-Payment-Payment.md#method_setStatus) | | Устанавливает статус платежа | | public | [setTest()](../classes/YooKassa-Model-Payment-Payment.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [setTransfers()](../classes/YooKassa-Model-Payment-Payment.md#method_setTransfers) | | Устанавливает массив распределения денег между магазинами. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentResponse.php](../../lib/Request/Payments/PaymentResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) * [\YooKassa\Request\Payments\AbstractPaymentResponse](../classes/YooKassa-Request-Payments-AbstractPaymentResponse.md) * \YooKassa\Request\Payments\PaymentResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Inherited from [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) Максимальная длина строки описания платежа ```php MAX_LENGTH_DESCRIPTION = 128 ``` ###### MAX_LENGTH_MERCHANT_CUSTOMER_ID Inherited from [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) Максимальная длина строки идентификатора покупателя в вашей системе ```php MAX_LENGTH_MERCHANT_CUSTOMER_ID = 200 ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма заказа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $authorization_details : \YooKassa\Model\Payment\AuthorizationDetailsInterface --- ***Description*** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $authorizationDetails : \YooKassa\Model\Payment\AuthorizationDetailsInterface --- ***Description*** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $cancellation_details : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене платежа **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $cancellationDetails : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене платежа **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $captured_at : \DateTime --- ***Description*** Время подтверждения платежа магазином **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $capturedAt : \DateTime --- ***Description*** Время подтверждения платежа магазином **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $confirmation : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation --- ***Description*** Способ подтверждения платежа **Type:** AbstractConfirmation **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $created_at : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $createdAt : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $deal : \YooKassa\Model\Deal\PaymentDealInfo --- ***Description*** Данные о сделке, в составе которой проходит платеж **Type:** PaymentDealInfo **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $description : string --- ***Description*** Описание транзакции **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $expires_at : \DateTime --- ***Description*** Время, до которого можно бесплатно отменить или подтвердить платеж **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $expiresAt : \DateTime --- ***Description*** Время, до которого можно бесплатно отменить или подтвердить платеж **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $id : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $income_amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма платежа, которую получит магазин **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $incomeAmount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма платежа, которую получит магазин **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $merchant_customer_id : string --- ***Description*** Идентификатор покупателя в вашей системе, например электронная почта или номер телефона **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $merchantCustomerId : string --- ***Description*** Идентификатор покупателя в вашей системе, например электронная почта или номер телефона **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные платежа указанные мерчантом **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $paid : bool --- ***Description*** Признак оплаты заказа **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $payment_method : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения платежа **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $paymentMethod : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения платежа **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $receipt_registration : string --- ***Description*** Состояние регистрации фискального чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $receiptRegistration : string --- ***Description*** Состояние регистрации фискального чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $recipient : \YooKassa\Model\Payment\RecipientInterface --- ***Description*** Получатель платежа **Type:** RecipientInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refundable : bool --- ***Description*** Возможность провести возврат по API **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refunded_amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возвращенных средств платежа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refundedAmount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возвращенных средств платежа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $status : string --- ***Description*** Текущее состояние платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $test : bool --- ***Description*** Признак тестовой операции **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $transfers : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Payment\TransferInterface[] --- ***Description*** Данные о распределении платежа между магазинами **Type:** TransferInterface[] **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_authorization_details : ?\YooKassa\Model\Payment\AuthorizationDetailsInterface --- **Summary** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_cancellation_details : ?\YooKassa\Model\CancellationDetailsInterface --- **Summary** Комментарий к статусу canceled: кто отменил платеж и по какой причине **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_captured_at : ?\DateTime --- **Type:** DateTime Время подтверждения платежа магазином **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_confirmation : ?\YooKassa\Model\Payment\Confirmation\AbstractConfirmation --- **Type:** AbstractConfirmation Способ подтверждения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_created_at : ?\DateTime --- **Type:** DateTime Время создания заказа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_deal : ?\YooKassa\Model\Deal\PaymentDealInfo --- **Type:** PaymentDealInfo Данные о сделке, в составе которой проходит платеж. Необходимо передавать, если вы проводите Безопасную сделку **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_description : ?string --- **Type:** ?string Описание платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_expires_at : ?\DateTime --- **Summary** Время, до которого можно бесплатно отменить или подтвердить платеж. В указанное время платеж в статусе `waiting_for_capture` будет автоматически отменен. **Type:** DateTime Время, до которого можно бесплатно отменить или подтвердить платеж **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_id : ?string --- **Type:** ?string Идентификатор платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_income_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_merchant_customer_id : ?string --- **Type:** ?string Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов. Присутствует, если вы хотите запомнить банковскую карту и отобразить ее при повторном платеже в виджете ЮKassa **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Type:** Metadata Метаданные платежа указанные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_paid : bool --- **Type:** bool Признак оплаты заказа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_payment_method : ?\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- **Type:** AbstractPaymentMethod Способ проведения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_receipt_registration : ?string --- **Type:** ?string Состояние регистрации фискального чека **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_recipient : ?\YooKassa\Model\Payment\RecipientInterface --- **Type:** RecipientInterface Получатель платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_refundable : bool --- **Type:** bool Возможность провести возврат по API **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_refunded_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface Сумма возвращенных средств платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_status : ?string --- **Type:** ?string Текущее состояние платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_test : bool --- **Summary** Признак тестовой операции. **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_transfers : ?\YooKassa\Common\ListObject --- **Type:** ListObject Данные о распределении платежа между магазинами **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма платежа #### public getAuthorizationDetails() : null|\YooKassa\Model\Payment\AuthorizationDetailsInterface ```php public getAuthorizationDetails() : null|\YooKassa\Model\Payment\AuthorizationDetailsInterface ``` **Summary** Возвращает данные об авторизации платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\Payment\AuthorizationDetailsInterface - Данные об авторизации платежа #### public getCancellationDetails() : null|\YooKassa\Model\CancellationDetailsInterface ```php public getCancellationDetails() : null|\YooKassa\Model\CancellationDetailsInterface ``` **Summary** Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\CancellationDetailsInterface - Комментарий к статусу canceled #### public getCapturedAt() : null|\DateTime ```php public getCapturedAt() : null|\DateTime ``` **Summary** Возвращает время подтверждения платежа магазином или null, если время не задано. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\DateTime - Время подтверждения платежа магазином #### public getConfirmation() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null ```php public getConfirmation() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null ``` **Summary** Возвращает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null - Способ подтверждения платежа #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \DateTime|null - Время создания заказа #### public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ``` **Summary** Возвращает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Deal\PaymentDealInfo|null - Данные о сделке, в составе которой проходит платеж #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - #### public getExpiresAt() : null|\DateTime ```php public getExpiresAt() : null|\DateTime ``` **Summary** Возвращает время до которого можно бесплатно отменить или подтвердить платеж, или null, если оно не задано. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\DateTime - Время, до которого можно бесплатно отменить или подтвердить платеж #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Идентификатор платежа #### public getIncomeAmount() : \YooKassa\Model\AmountInterface|null ```php public getIncomeAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма платежа, которую получит магазин #### public getMerchantCustomerId() : string|null ```php public getMerchantCustomerId() : string|null ``` **Summary** Возвращает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Идентификатор покупателя в вашей системе #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает метаданные платежа установленные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные платежа указанные мерчантом #### public getPaid() : bool ```php public getPaid() : bool ``` **Summary** Проверяет, был ли уже оплачен заказ. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Признак оплаты заказа, true если заказ оплачен, false если нет #### public getPaymentMethod() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null ```php public getPaymentMethod() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null ``` **Summary** Возвращает используемый способ проведения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null - Способ проведения платежа #### public getReceiptRegistration() : string|null ```php public getReceiptRegistration() : string|null ``` **Summary** Возвращает состояние регистрации фискального чека. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Состояние регистрации фискального чека #### public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ```php public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ``` **Summary** Возвращает получателя платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\Payment\RecipientInterface - Получатель платежа или null, если получатель не задан #### public getRefundable() : bool ```php public getRefundable() : bool ``` **Summary** Проверяет возможность провести возврат по API. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Возможность провести возврат по API, true если есть, false если нет #### public getRefundedAmount() : \YooKassa\Model\AmountInterface|null ```php public getRefundedAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму возвращенных средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма возвращенных средств платежа #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает состояние платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Текущее состояние платежа #### public getTest() : bool ```php public getTest() : bool ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Признак тестовой операции #### public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface ```php public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает массив распределения денег между магазинами. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface - Массив распределения денег #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма платежа | **Returns:** self - #### public setAuthorizationDetails() : self ```php public setAuthorizationDetails(\YooKassa\Model\Payment\AuthorizationDetailsInterface|array|null $authorization_details = null) : self ``` **Summary** Устанавливает данные об авторизации платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\AuthorizationDetailsInterface OR array OR null | authorization_details | Данные об авторизации платежа | **Returns:** self - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\CancellationDetailsInterface|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\CancellationDetailsInterface OR array OR null | cancellation_details | Комментарий к статусу canceled | **Returns:** self - #### public setCapturedAt() : self ```php public setCapturedAt(\DateTime|string|null $captured_at = null) : self ``` **Summary** Устанавливает время подтверждения платежа магазином **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | captured_at | Время подтверждения платежа магазином | **Returns:** self - #### public setConfirmation() : self ```php public setConfirmation(\YooKassa\Model\Payment\Confirmation\AbstractConfirmation|array|null $confirmation = null) : self ``` **Summary** Устанавливает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\Confirmation\AbstractConfirmation OR array OR null | confirmation | Способ подтверждения платежа | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания заказа | **Returns:** self - #### public setDeal() : self ```php public setDeal(null|array|\YooKassa\Model\Deal\PaymentDealInfo $deal = null) : self ``` **Summary** Устанавливает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\PaymentDealInfo | deal | Данные о сделке, в составе которой проходит платеж | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | | **Returns:** self - #### public setExpiresAt() : self ```php public setExpiresAt(\DateTime|string|null $expires_at = null) : self ``` **Summary** Устанавливает время до которого можно бесплатно отменить или подтвердить платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at | Время, до которого можно бесплатно отменить или подтвердить платеж | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор платежа | **Returns:** self - #### public setIncomeAmount() : self ```php public setIncomeAmount(\YooKassa\Model\AmountInterface|array|null $income_amount = null) : self ``` **Summary** Устанавливает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | income_amount | | **Returns:** self - #### public setMerchantCustomerId() : self ```php public setMerchantCustomerId(string|null $merchant_customer_id = null) : self ``` **Summary** Устанавливает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | merchant_customer_id | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает метаданные платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Метаданные платежа указанные мерчантом | **Returns:** self - #### public setPaid() : self ```php public setPaid(bool $paid) : self ``` **Summary** Устанавливает флаг оплаты заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | paid | Признак оплаты заказа | **Returns:** self - #### public setPaymentMethod() : self ```php public setPaymentMethod(\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|array|null $payment_method) : self ``` **Summary** Устанавливает используемый способ проведения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod OR array OR null | payment_method | Способ проведения платежа | **Returns:** self - #### public setReceiptRegistration() : self ```php public setReceiptRegistration(string|null $receipt_registration = null) : self ``` **Summary** Устанавливает состояние регистрации фискального чека **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | receipt_registration | Состояние регистрации фискального чека | **Returns:** self - #### public setRecipient() : self ```php public setRecipient(\YooKassa\Model\Payment\RecipientInterface|array|null $recipient = null) : self ``` **Summary** Устанавливает получателя платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\RecipientInterface OR array OR null | recipient | Объект с информацией о получателе платежа | **Returns:** self - #### public setRefundable() : self ```php public setRefundable(bool $refundable) : self ``` **Summary** Устанавливает возможность провести возврат по API. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | refundable | Возможность провести возврат по API | **Returns:** self - #### public setRefundedAmount() : self ```php public setRefundedAmount(\YooKassa\Model\AmountInterface|array|null $refunded_amount = null) : self ``` **Summary** Устанавливает сумму возвращенных средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | refunded_amount | Сумма возвращенных средств платежа | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус платежа | **Returns:** self - #### public setTest() : self ```php public setTest(bool $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | test | Признак тестовой операции | **Returns:** self - #### public setTransfers() : self ```php public setTransfers(\YooKassa\Common\ListObjectInterface|array|null $transfers = null) : self ``` **Summary** Устанавливает массив распределения денег между магазинами. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | transfers | Массив распределения денег | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataSbp.md000064400000034356150364342670024731 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataSbp ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentMethodDataSbp. **Description:** Данные для оплаты через СБП --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataSbp.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataSbp.php](../../lib/Request/Payments/PaymentData/PaymentDataSbp.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataSbp * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) #### protected $_type : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataSbp](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataSbp.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethodType.md000064400000024433150364342670022510 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethodType ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Класс, представляющий модель PaymentMethodType. **Description:** Тип источника средств для проведения платежа. Возможные значения: - `yoo_money` - Платеж из кошелька ЮMoney - `bank_card` - Платеж с произвольной банковской карты - `sberbank` - Платеж СбербанкОнлайн - `cash` - Платеж наличными - `mobile_balance` - Платеж с баланса мобильного телефона - `apple_pay` - Платеж ApplePay - `google_pay` - Платеж Google Pay - `qiwi` - Платеж из кошелька Qiwi - `webmoney` - Платеж из кошелька Webmoney - `alfabank` - Платеж через Альфа-Клик - `b2b_sberbank` - Сбербанк Бизнес Онлайн - `tinkoff_bank` - Интернет-банк Тинькофф - `psb` - ПромсвязьБанк - `installments` - Заплатить по частям - `wechat` - Платеж через WeChat - `sbp` - Платеж через через сервис быстрых платежей --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [YOO_MONEY](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_YOO_MONEY) | | Платеж из кошелька ЮMoney | | public | [BANK_CARD](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_BANK_CARD) | | Платеж с произвольной банковской карты | | public | [SBERBANK](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_SBERBANK) | | Платеж СбербанкОнлайн | | public | [CASH](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_CASH) | | Платеж наличными | | public | [MOBILE_BALANCE](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_MOBILE_BALANCE) | | Платеж с баланса мобильного телефона | | public | [APPLE_PAY](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_APPLE_PAY) | | латеж ApplePay | | public | [GOOGLE_PAY](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_GOOGLE_PAY) | | Платеж Google Pay | | public | [QIWI](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_QIWI) | | Платеж из кошелька Qiwi | | public | [WEBMONEY](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_WEBMONEY) | *deprecated* | Платеж из кошелька Webmoney | | public | [ALFABANK](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_ALFABANK) | *deprecated* | Платеж через Альфа-Клик | | public | [B2B_SBERBANK](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_B2B_SBERBANK) | | Сбербанк Бизнес Онлайн | | public | [TINKOFF_BANK](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_TINKOFF_BANK) | | Интернет-банк Тинькофф | | public | [PSB](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_PSB) | *deprecated* | ПромсвязьБанк | | public | [INSTALLMENTS](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_INSTALLMENTS) | | Заплатить по частям | | public | [WECHAT](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_WECHAT) | *deprecated* | Оплата через WeChat. | | public | [SBP](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_SBP) | | Оплата через сервис быстрых платежей | | public | [SBER_LOAN](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_SBER_LOAN) | | Прием оплаты с использованием Кредита от СберБанка | | public | [UNKNOWN](../classes/YooKassa-Model-Payment-PaymentMethodType.md#constant_UNKNOWN) | *deprecated* | Для неизвестных методов оплаты | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payment-PaymentMethodType.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payment/PaymentMethodType.php](../../lib/Model/Payment/PaymentMethodType.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payment\PaymentMethodType * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### YOO_MONEY Платеж из кошелька ЮMoney ```php YOO_MONEY = 'yoo_money' ``` ###### BANK_CARD Платеж с произвольной банковской карты ```php BANK_CARD = 'bank_card' ``` ###### SBERBANK Платеж СбербанкОнлайн ```php SBERBANK = 'sberbank' ``` ###### CASH Платеж наличными ```php CASH = 'cash' ``` ###### MOBILE_BALANCE Платеж с баланса мобильного телефона ```php MOBILE_BALANCE = 'mobile_balance' ``` ###### APPLE_PAY латеж ApplePay ```php APPLE_PAY = 'apple_pay' ``` ###### GOOGLE_PAY Платеж Google Pay ```php GOOGLE_PAY = 'google_pay' ``` ###### QIWI Платеж из кошелька Qiwi ```php QIWI = 'qiwi' ``` ###### ~~WEBMONEY~~ Платеж из кошелька Webmoney ```php WEBMONEY = 'webmoney' ``` **deprecated** Больше недоступен ###### ~~ALFABANK~~ Платеж через Альфа-Клик ```php ALFABANK = 'alfabank' ``` **deprecated** Больше недоступен ###### B2B_SBERBANK Сбербанк Бизнес Онлайн ```php B2B_SBERBANK = 'b2b_sberbank' ``` ###### TINKOFF_BANK Интернет-банк Тинькофф ```php TINKOFF_BANK = 'tinkoff_bank' ``` ###### ~~PSB~~ ПромсвязьБанк ```php PSB = 'psb' ``` **deprecated** Больше недоступен ###### INSTALLMENTS Заплатить по частям ```php INSTALLMENTS = 'installments' ``` ###### ~~WECHAT~~ Оплата через WeChat. ```php WECHAT = 'wechat' ``` **deprecated** Больше недоступен ###### SBP Оплата через сервис быстрых платежей ```php SBP = 'sbp' ``` ###### SBER_LOAN Прием оплаты с использованием Кредита от СберБанка ```php SBER_LOAN = 'sber_loan' ``` ###### ~~UNKNOWN~~ Для неизвестных методов оплаты ```php UNKNOWN = 'unknown' ``` **deprecated** Не используется для реальных платежей --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataMobileBalance.md000064400000040771150364342670026660 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataMobileBalance ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentMethodDataMobileBalance. **Description:** Данные для оплаты с баланса мобильного телефона. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$phone](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataMobileBalance.md#property_phone) | | Телефон, с баланса которого осуществляется платеж. Указывается в формате [ITU-T E.164](https://ru.wikipedia.org/wiki/E.164), например ~`79000000000`. | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataMobileBalance.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getPhone()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataMobileBalance.md#method_getPhone) | | Возвращает номер телефона в формате ITU-T E.164 | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setPhone()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataMobileBalance.md#method_setPhone) | | Устанавливает номер телефона в формате ITU-T E.164 | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataMobileBalance.php](../../lib/Request/Payments/PaymentData/PaymentDataMobileBalance.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataMobileBalance * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $phone : string --- ***Description*** Телефон, с баланса которого осуществляется платеж. Указывается в формате [ITU-T E.164](https://ru.wikipedia.org/wiki/E.164), например ~`79000000000`. **Type:** string **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) #### protected $_type : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataMobileBalance](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataMobileBalance.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getPhone() : string|null ```php public getPhone() : string|null ``` **Summary** Возвращает номер телефона в формате ITU-T E.164 **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataMobileBalance](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataMobileBalance.md) **Returns:** string|null - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setPhone() : self ```php public setPhone(string|null $phone = null) : self ``` **Summary** Устанавливает номер телефона в формате ITU-T E.164 **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataMobileBalance](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataMobileBalance.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | phone | Номер телефона в формате ITU-T E.164 | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodUnknown.md000064400000055000150364342670025774 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodUnknown ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodUnknown. **Description:** Неизвестный платежный метод. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodUnknown.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodUnknown.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodUnknown.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodUnknown * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | deprecated | | Не используется в реальных платежах | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodUnknown](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodUnknown.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-ReceiptItem.md000064400000167547150364342670021276 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\ReceiptItem ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Информация о товарной позиции в заказе, позиция фискального чека. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [DESCRIPTION_MAX_LENGTH](../classes/YooKassa-Model-Receipt-ReceiptItem.md#constant_DESCRIPTION_MAX_LENGTH) | | | | public | [ADD_PROPS_MAX_LENGTH](../classes/YooKassa-Model-Receipt-ReceiptItem.md#constant_ADD_PROPS_MAX_LENGTH) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$additional_payment_subject_props](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_additional_payment_subject_props) | | Дополнительный реквизит предмета расчета (тег в 54 ФЗ — 1191) | | public | [$additionalPaymentSubjectProps](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_additionalPaymentSubjectProps) | | Дополнительный реквизит предмета расчета (тег в 54 ФЗ — 1191) | | public | [$agent_type](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_agent_type) | | Тип посредника, реализующего товар или услугу | | public | [$agentType](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_agentType) | | Тип посредника, реализующего товар или услугу | | public | [$amount](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_amount) | | Суммарная стоимость покупаемого товара в копейках/центах | | public | [$country_of_origin_code](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_country_of_origin_code) | | Код страны происхождения товара (тег в 54 ФЗ — 1230) | | public | [$countryOfOriginCode](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_countryOfOriginCode) | | Код страны происхождения товара (тег в 54 ФЗ — 1230) | | public | [$customs_declaration_number](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_customs_declaration_number) | | Номер таможенной декларации (от 1 до 32 символов). Тег в 54 ФЗ — 1231 | | public | [$customsDeclarationNumber](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_customsDeclarationNumber) | | Номер таможенной декларации (от 1 до 32 символов). Тег в 54 ФЗ — 1231 | | public | [$description](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_description) | | Наименование товара (тег в 54 ФЗ — 1030) | | public | [$excise](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_excise) | | Сумма акциза товара с учетом копеек (тег в 54 ФЗ — 1229) | | public | [$isShipping](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_isShipping) | | Флаг доставки | | public | [$mark_code_info](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_mark_code_info) | | Код товара (тег в 54 ФЗ — 1163) | | public | [$mark_mode](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_mark_mode) | | Режим обработки кода маркировки (тег в 54 ФЗ — 2102) | | public | [$mark_quantity](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_mark_quantity) | | Дробное количество маркированного товара (тег в 54 ФЗ — 1291) | | public | [$markCodeInfo](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_markCodeInfo) | | Код товара (тег в 54 ФЗ — 1163) | | public | [$markMode](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_markMode) | | Режим обработки кода маркировки (тег в 54 ФЗ — 2102) | | public | [$markQuantity](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_markQuantity) | | Дробное количество маркированного товара (тег в 54 ФЗ — 1291) | | public | [$measure](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_measure) | | Мера количества предмета расчета (тег в 54 ФЗ — 2108) | | public | [$payment_mode](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_payment_mode) | | Признак способа расчета (тег в 54 ФЗ — 1214) | | public | [$payment_subject](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_payment_subject) | | Признак предмета расчета (тег в 54 ФЗ — 1212) | | public | [$payment_subject_industry_details](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_payment_subject_industry_details) | | Отраслевой реквизит предмета расчета (тег в 54 ФЗ — 1260) | | public | [$paymentMode](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_paymentMode) | | Признак способа расчета (тег в 54 ФЗ — 1214) | | public | [$paymentSubject](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_paymentSubject) | | Признак предмета расчета (тег в 54 ФЗ — 1212) | | public | [$paymentSubjectIndustryDetails](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_paymentSubjectIndustryDetails) | | Отраслевой реквизит предмета расчета (тег в 54 ФЗ — 1260) | | public | [$price](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_price) | | Цена товара (тег в 54 ФЗ — 1079) | | public | [$product_code](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_product_code) | | Код товара (тег в 54 ФЗ — 1162) | | public | [$productCode](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_productCode) | | Код товара (тег в 54 ФЗ — 1162) | | public | [$quantity](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_quantity) | | Количество (тег в 54 ФЗ — 1023) | | public | [$supplier](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_supplier) | | Информация о поставщике товара или услуги (тег в 54 ФЗ — 1224) | | public | [$vat_code](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_vat_code) | | Ставка НДС (тег в 54 ФЗ — 1199), число 1-6 | | public | [$vatCode](../classes/YooKassa-Model-Receipt-ReceiptItem.md#property_vatCode) | | Ставка НДС (тег в 54 ФЗ — 1199), число 1-6 | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [applyDiscountCoefficient()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_applyDiscountCoefficient) | | Применяет для товара скидку. | | public | [fetchItem()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_fetchItem) | | Уменьшает количество покупаемого товара на указанное, возвращает объект позиции в чеке с уменьшаемым количеством | | public | [fromArray()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAdditionalPaymentSubjectProps()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getAdditionalPaymentSubjectProps) | | Возвращает дополнительный реквизит предмета расчета. | | public | [getAgentType()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getAgentType) | | Возвращает тип посредника, реализующего товар или услугу. | | public | [getAmount()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getAmount) | | Возвращает общую стоимость покупаемого товара в копейках/центах. | | public | [getCountryOfOriginCode()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getCountryOfOriginCode) | | Возвращает код страны происхождения товара по общероссийскому классификатору стран мира. | | public | [getCustomsDeclarationNumber()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getCustomsDeclarationNumber) | | Возвращает номер таможенной декларации. | | public | [getDescription()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getDescription) | | Возвращает наименование товара. | | public | [getExcise()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getExcise) | | Возвращает сумму акциза товара с учетом копеек. | | public | [getMarkCodeInfo()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getMarkCodeInfo) | | Возвращает код товара. | | public | [getMarkMode()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getMarkMode) | | Возвращает режим обработки кода маркировки. | | public | [getMarkQuantity()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getMarkQuantity) | | Возвращает дробное количество маркированного товара. | | public | [getMeasure()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getMeasure) | | Возвращает меру количества предмета расчета. | | public | [getPaymentMode()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getPaymentMode) | | Возвращает признак способа расчета. | | public | [getPaymentSubject()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getPaymentSubject) | | Возвращает признак предмета расчета. | | public | [getPaymentSubjectIndustryDetails()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getPaymentSubjectIndustryDetails) | | Возвращает отраслевой реквизит чека. | | public | [getPrice()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getPrice) | | Возвращает цену товара. | | public | [getProductCode()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getProductCode) | | Возвращает код товара — уникальный номер, который присваивается экземпляру товара при маркировке. | | public | [getQuantity()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getQuantity) | | Возвращает количество товара. | | public | [getSupplier()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getSupplier) | | Возвращает информацию о поставщике товара или услуги. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [getVatCode()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_getVatCode) | | Возвращает ставку НДС | | public | [increasePrice()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_increasePrice) | | Увеличивает цену товара на указанную величину. | | public | [isShipping()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_isShipping) | | Проверяет, является ли текущий элемент чека доставкой. | | public | [jsonSerialize()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAdditionalPaymentSubjectProps()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setAdditionalPaymentSubjectProps) | | Устанавливает дополнительный реквизит предмета расчета. | | public | [setAgentType()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setAgentType) | | Устанавливает тип посредника, реализующего товар или услугу. | | public | [setCountryOfOriginCode()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setCountryOfOriginCode) | | Устанавливает код страны происхождения товара по общероссийскому классификатору стран мира. | | public | [setCustomsDeclarationNumber()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setCustomsDeclarationNumber) | | Устанавливает номер таможенной декларации (от 1 до 32 символов). | | public | [setDescription()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setDescription) | | Устанавливает наименование товара. | | public | [setExcise()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setExcise) | | Устанавливает сумму акциза товара с учетом копеек. | | public | [setIsShipping()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setIsShipping) | | Устанавливает флаг доставки для текущего объекта айтема в чеке. | | public | [setMarkCodeInfo()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setMarkCodeInfo) | | Устанавливает код товара. | | public | [setMarkMode()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setMarkMode) | | Устанавливает режим обработки кода маркировки. | | public | [setMarkQuantity()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setMarkQuantity) | | Устанавливает дробное количество маркированного товара. | | public | [setMeasure()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setMeasure) | | Устанавливает меру количества предмета расчета. | | public | [setPaymentMode()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setPaymentMode) | | Устанавливает признак способа расчета. | | public | [setPaymentSubject()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setPaymentSubject) | | Устанавливает признак предмета расчета. | | public | [setPaymentSubjectIndustryDetails()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setPaymentSubjectIndustryDetails) | | Устанавливает отраслевой реквизит чека. | | public | [setPrice()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setPrice) | | Устанавливает цену товара. | | public | [setProductCode()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setProductCode) | | Устанавливает код товара — уникальный номер, который присваивается экземпляру товара при маркировке. | | public | [setQuantity()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setQuantity) | | Устанавливает количество покупаемого товара. | | public | [setSupplier()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setSupplier) | | Устанавливает информацию о поставщике товара или услуги. | | public | [setVatCode()](../classes/YooKassa-Model-Receipt-ReceiptItem.md#method_setVatCode) | | Устанавливает ставку НДС | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Receipt/ReceiptItem.php](../../lib/Model/Receipt/ReceiptItem.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Receipt\ReceiptItem * Implements: * [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### DESCRIPTION_MAX_LENGTH ```php DESCRIPTION_MAX_LENGTH = 128 : int ``` ###### ADD_PROPS_MAX_LENGTH ```php ADD_PROPS_MAX_LENGTH = 64 : int ``` --- ## Properties #### public $additional_payment_subject_props : string --- ***Description*** Дополнительный реквизит предмета расчета (тег в 54 ФЗ — 1191) **Type:** string **Details:** #### public $additionalPaymentSubjectProps : string --- ***Description*** Дополнительный реквизит предмета расчета (тег в 54 ФЗ — 1191) **Type:** string **Details:** #### public $agent_type : string --- ***Description*** Тип посредника, реализующего товар или услугу **Type:** string **Details:** #### public $agentType : string --- ***Description*** Тип посредника, реализующего товар или услугу **Type:** string **Details:** #### public $amount : float --- ***Description*** Суммарная стоимость покупаемого товара в копейках/центах **Type:** float **Details:** #### public $country_of_origin_code : string --- ***Description*** Код страны происхождения товара (тег в 54 ФЗ — 1230) **Type:** string **Details:** #### public $countryOfOriginCode : string --- ***Description*** Код страны происхождения товара (тег в 54 ФЗ — 1230) **Type:** string **Details:** #### public $customs_declaration_number : string --- ***Description*** Номер таможенной декларации (от 1 до 32 символов). Тег в 54 ФЗ — 1231 **Type:** string **Details:** #### public $customsDeclarationNumber : string --- ***Description*** Номер таможенной декларации (от 1 до 32 символов). Тег в 54 ФЗ — 1231 **Type:** string **Details:** #### public $description : string --- ***Description*** Наименование товара (тег в 54 ФЗ — 1030) **Type:** string **Details:** #### public $excise : float --- ***Description*** Сумма акциза товара с учетом копеек (тег в 54 ФЗ — 1229) **Type:** float **Details:** #### public $isShipping : bool --- ***Description*** Флаг доставки **Type:** bool **Details:** #### public $mark_code_info : \YooKassa\Model\Receipt\MarkCodeInfo --- ***Description*** Код товара (тег в 54 ФЗ — 1163) **Type:** MarkCodeInfo **Details:** #### public $mark_mode : string --- ***Description*** Режим обработки кода маркировки (тег в 54 ФЗ — 2102) **Type:** string **Details:** #### public $mark_quantity : \YooKassa\Model\Receipt\MarkQuantity --- ***Description*** Дробное количество маркированного товара (тег в 54 ФЗ — 1291) **Type:** MarkQuantity **Details:** #### public $markCodeInfo : \YooKassa\Model\Receipt\MarkCodeInfo --- ***Description*** Код товара (тег в 54 ФЗ — 1163) **Type:** MarkCodeInfo **Details:** #### public $markMode : string --- ***Description*** Режим обработки кода маркировки (тег в 54 ФЗ — 2102) **Type:** string **Details:** #### public $markQuantity : \YooKassa\Model\Receipt\MarkQuantity --- ***Description*** Дробное количество маркированного товара (тег в 54 ФЗ — 1291) **Type:** MarkQuantity **Details:** #### public $measure : string --- ***Description*** Мера количества предмета расчета (тег в 54 ФЗ — 2108) **Type:** string **Details:** #### public $payment_mode : string --- ***Description*** Признак способа расчета (тег в 54 ФЗ — 1214) **Type:** string **Details:** #### public $payment_subject : string --- ***Description*** Признак предмета расчета (тег в 54 ФЗ — 1212) **Type:** string **Details:** #### public $payment_subject_industry_details : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\IndustryDetails[] --- ***Description*** Отраслевой реквизит предмета расчета (тег в 54 ФЗ — 1260) **Type:** IndustryDetails[] **Details:** #### public $paymentMode : string --- ***Description*** Признак способа расчета (тег в 54 ФЗ — 1214) **Type:** string **Details:** #### public $paymentSubject : string --- ***Description*** Признак предмета расчета (тег в 54 ФЗ — 1212) **Type:** string **Details:** #### public $paymentSubjectIndustryDetails : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\IndustryDetails[] --- ***Description*** Отраслевой реквизит предмета расчета (тег в 54 ФЗ — 1260) **Type:** IndustryDetails[] **Details:** #### public $price : \YooKassa\Model\AmountInterface --- ***Description*** Цена товара (тег в 54 ФЗ — 1079) **Type:** AmountInterface **Details:** #### public $product_code : string --- ***Description*** Код товара (тег в 54 ФЗ — 1162) **Type:** string **Details:** #### public $productCode : string --- ***Description*** Код товара (тег в 54 ФЗ — 1162) **Type:** string **Details:** #### public $quantity : float --- ***Description*** Количество (тег в 54 ФЗ — 1023) **Type:** float **Details:** #### public $supplier : \YooKassa\Model\Receipt\Supplier --- ***Description*** Информация о поставщике товара или услуги (тег в 54 ФЗ — 1224) **Type:** Supplier **Details:** #### public $vat_code : int --- ***Description*** Ставка НДС (тег в 54 ФЗ — 1199), число 1-6 **Type:** int **Details:** #### public $vatCode : int --- ***Description*** Ставка НДС (тег в 54 ФЗ — 1199), число 1-6 **Type:** int **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public applyDiscountCoefficient() : void ```php public applyDiscountCoefficient(float|null $coefficient) : void ``` **Summary** Применяет для товара скидку. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | float OR null | coefficient | Множитель скидки | **Returns:** void - #### public fetchItem() : \YooKassa\Model\Receipt\ReceiptItem ```php public fetchItem(float|null $count) : \YooKassa\Model\Receipt\ReceiptItem ``` **Summary** Уменьшает количество покупаемого товара на указанное, возвращает объект позиции в чеке с уменьшаемым количеством **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | float OR null | count | Количество на которое уменьшаем позицию в чеке | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Validator\Exceptions\EmptyPropertyValueException | Выбрасывается если было передано пустое значение | | \YooKassa\Validator\Exceptions\InvalidPropertyValueException | Выбрасывается если в качестве аргумента был передан ноль или отрицательное число, или число больше текущего количества покупаемого товара | | \YooKassa\Validator\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в качестве аргумента было передано не число | **Returns:** \YooKassa\Model\Receipt\ReceiptItem - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAdditionalPaymentSubjectProps() : string|null ```php public getAdditionalPaymentSubjectProps() : string|null ``` **Summary** Возвращает дополнительный реквизит предмета расчета. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** string|null - Дополнительный реквизит предмета расчета #### public getAgentType() : string|null ```php public getAgentType() : string|null ``` **Summary** Возвращает тип посредника, реализующего товар или услугу. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** string|null - Тип посредника #### public getAmount() : int ```php public getAmount() : int ``` **Summary** Возвращает общую стоимость покупаемого товара в копейках/центах. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** int - Сумма стоимости покупаемого товара #### public getCountryOfOriginCode() : null|string ```php public getCountryOfOriginCode() : null|string ``` **Summary** Возвращает код страны происхождения товара по общероссийскому классификатору стран мира. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** null|string - Код страны происхождения товара #### public getCustomsDeclarationNumber() : null|string ```php public getCustomsDeclarationNumber() : null|string ``` **Summary** Возвращает номер таможенной декларации. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** null|string - Номер таможенной декларации (от 1 до 32 символов) #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает наименование товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** string|null - Наименование товара #### public getExcise() : null|float ```php public getExcise() : null|float ``` **Summary** Возвращает сумму акциза товара с учетом копеек. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** null|float - Сумма акциза товара с учетом копеек #### public getMarkCodeInfo() : \YooKassa\Model\Receipt\MarkCodeInfo|null ```php public getMarkCodeInfo() : \YooKassa\Model\Receipt\MarkCodeInfo|null ``` **Summary** Возвращает код товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** \YooKassa\Model\Receipt\MarkCodeInfo|null - Код товара #### public getMarkMode() : string|null ```php public getMarkMode() : string|null ``` **Summary** Возвращает режим обработки кода маркировки. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** string|null - Режим обработки кода маркировки #### public getMarkQuantity() : \YooKassa\Model\Receipt\MarkQuantity|null ```php public getMarkQuantity() : \YooKassa\Model\Receipt\MarkQuantity|null ``` **Summary** Возвращает дробное количество маркированного товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** \YooKassa\Model\Receipt\MarkQuantity|null - Дробное количество маркированного товара #### public getMeasure() : string|null ```php public getMeasure() : string|null ``` **Summary** Возвращает меру количества предмета расчета. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** string|null - Мера количества предмета расчета #### public getPaymentMode() : null|string ```php public getPaymentMode() : null|string ``` **Summary** Возвращает признак способа расчета. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** null|string - Признак способа расчета #### public getPaymentSubject() : null|string ```php public getPaymentSubject() : null|string ``` **Summary** Возвращает признак предмета расчета. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** null|string - Признак предмета расчета #### public getPaymentSubjectIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ```php public getPaymentSubjectIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface - Отраслевой реквизит чека #### public getPrice() : \YooKassa\Model\AmountInterface ```php public getPrice() : \YooKassa\Model\AmountInterface ``` **Summary** Возвращает цену товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** \YooKassa\Model\AmountInterface - Цена товара #### public getProductCode() : null|string ```php public getProductCode() : null|string ``` **Summary** Возвращает код товара — уникальный номер, который присваивается экземпляру товара при маркировке. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** null|string - Код товара #### public getQuantity() : float|null ```php public getQuantity() : float|null ``` **Summary** Возвращает количество товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** float|null - Количество купленного товара #### public getSupplier() : \YooKassa\Model\Receipt\Supplier|null ```php public getSupplier() : \YooKassa\Model\Receipt\Supplier|null ``` **Summary** Возвращает информацию о поставщике товара или услуги. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** \YooKassa\Model\Receipt\Supplier|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public getVatCode() : null|int ```php public getVatCode() : null|int ``` **Summary** Возвращает ставку НДС **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** null|int - Ставка НДС, число 1-6, или null, если ставка не задана #### public increasePrice() : void ```php public increasePrice(float|null $value) : void ``` **Summary** Увеличивает цену товара на указанную величину. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | float OR null | value | Сумма на которую цену товара увеличиваем | **Returns:** void - #### public isShipping() : bool ```php public isShipping() : bool ``` **Summary** Проверяет, является ли текущий элемент чека доставкой. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** bool - True если доставка, false если обычный товар #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAdditionalPaymentSubjectProps() : void ```php public setAdditionalPaymentSubjectProps(string|null $additional_payment_subject_props) : void ``` **Summary** Устанавливает дополнительный реквизит предмета расчета. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | additional_payment_subject_props | Дополнительный реквизит предмета расчета | **Returns:** void - #### public setAgentType() : self ```php public setAgentType(string|null $agent_type = null) : self ``` **Summary** Устанавливает тип посредника, реализующего товар или услугу. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | agent_type | Тип посредника | **Returns:** self - #### public setCountryOfOriginCode() : self ```php public setCountryOfOriginCode(string|null $country_of_origin_code = null) : self ``` **Summary** Устанавливает код страны происхождения товара по общероссийскому классификатору стран мира. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | country_of_origin_code | Код страны происхождения товара | **Returns:** self - #### public setCustomsDeclarationNumber() : self ```php public setCustomsDeclarationNumber(string|null $customs_declaration_number = null) : self ``` **Summary** Устанавливает номер таможенной декларации (от 1 до 32 символов). **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | customs_declaration_number | Номер таможенной декларации | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает наименование товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Наименование товара | **Returns:** self - #### public setExcise() : self ```php public setExcise(float|null $excise = null) : self ``` **Summary** Устанавливает сумму акциза товара с учетом копеек. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | float OR null | excise | Сумма акциза товара с учетом копеек | **Returns:** self - #### public setIsShipping() : self ```php public setIsShipping(bool $value) : self ``` **Summary** Устанавливает флаг доставки для текущего объекта айтема в чеке. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | value | True если айтем является доставкой, false если нет | **Returns:** self - #### public setMarkCodeInfo() : self ```php public setMarkCodeInfo(array|\YooKassa\Model\Receipt\MarkCodeInfo|null $mark_code_info = null) : self ``` **Summary** Устанавливает код товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\MarkCodeInfo OR null | mark_code_info | Код товара | **Returns:** self - #### public setMarkMode() : self ```php public setMarkMode(string|null $mark_mode = null) : self ``` **Summary** Устанавливает режим обработки кода маркировки. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | mark_mode | Режим обработки кода маркировки | **Returns:** self - #### public setMarkQuantity() : self ```php public setMarkQuantity(array|\YooKassa\Model\Receipt\MarkQuantity|null $mark_quantity = null) : self ``` **Summary** Устанавливает дробное количество маркированного товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\MarkQuantity OR null | mark_quantity | Дробное количество маркированного товара | **Returns:** self - #### public setMeasure() : self ```php public setMeasure(string|null $measure) : self ``` **Summary** Устанавливает меру количества предмета расчета. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | measure | Мера количества предмета расчета | **Returns:** self - #### public setPaymentMode() : self ```php public setPaymentMode(string|null $payment_mode = null) : self ``` **Summary** Устанавливает признак способа расчета. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_mode | Признак способа расчета | **Returns:** self - #### public setPaymentSubject() : self ```php public setPaymentSubject(null|string $payment_subject = null) : self ``` **Summary** Устанавливает признак предмета расчета. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | payment_subject | Признак предмета расчета | **Returns:** self - #### public setPaymentSubjectIndustryDetails() : self ```php public setPaymentSubjectIndustryDetails(array|\YooKassa\Common\ListObjectInterface|null $payment_subject_industry_details = null) : self ``` **Summary** Устанавливает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Common\ListObjectInterface OR null | payment_subject_industry_details | Отраслевой реквизит чека | **Returns:** self - #### public setPrice() : self ```php public setPrice(\YooKassa\Model\AmountInterface|array $amount) : self ``` **Summary** Устанавливает цену товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array | amount | Цена товара | **Returns:** self - #### public setProductCode() : self ```php public setProductCode(\YooKassa\Helpers\ProductCode|string $product_code) : self ``` **Summary** Устанавливает код товара — уникальный номер, который присваивается экземпляру товара при маркировке. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Helpers\ProductCode OR string | product_code | Код товара | **Returns:** self - #### public setQuantity() : self ```php public setQuantity(float|null $quantity) : self ``` **Summary** Устанавливает количество покупаемого товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | float OR null | quantity | Количество | **Returns:** self - #### public setSupplier() : self ```php public setSupplier(array|\YooKassa\Model\Receipt\SupplierInterface|null $supplier = null) : self ``` **Summary** Устанавливает информацию о поставщике товара или услуги. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\SupplierInterface OR null | supplier | Информация о поставщике товара или услуги | **Returns:** self - #### public setVatCode() : self ```php public setVatCode(?int $vat_code = null) : self ``` **Summary** Устанавливает ставку НДС **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItem](../classes/YooKassa-Model-Receipt-ReceiptItem.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?int | vat_code | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-Airline.md000064400000055535150364342670021235 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\Airline ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель Airline. **Description:** Объект с данными для [продажи авиабилетов](/developers/payment-acceptance/scenario-extensions/airline-tickets). Используется только для платежей банковской картой. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$booking_reference](../classes/YooKassa-Request-Payments-Airline.md#property_booking_reference) | | Номер бронирования. Обязателен на этапе создания платежа | | public | [$bookingReference](../classes/YooKassa-Request-Payments-Airline.md#property_bookingReference) | | Номер бронирования. Обязателен на этапе создания платежа | | public | [$legs](../classes/YooKassa-Request-Payments-Airline.md#property_legs) | | Список маршрутов | | public | [$passengers](../classes/YooKassa-Request-Payments-Airline.md#property_passengers) | | Список пассажиров | | public | [$ticket_number](../classes/YooKassa-Request-Payments-Airline.md#property_ticket_number) | | Уникальный номер билета. Обязателен на этапе подтверждения платежа | | public | [$ticketNumber](../classes/YooKassa-Request-Payments-Airline.md#property_ticketNumber) | | Уникальный номер билета. Обязателен на этапе подтверждения платежа | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [addLeg()](../classes/YooKassa-Request-Payments-Airline.md#method_addLeg) | | Добавляет объект-контейнер с данными о маршруте. | | public | [addPassenger()](../classes/YooKassa-Request-Payments-Airline.md#method_addPassenger) | | Добавляет пассажира. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getBookingReference()](../classes/YooKassa-Request-Payments-Airline.md#method_getBookingReference) | | Возвращает booking_reference. | | public | [getLegs()](../classes/YooKassa-Request-Payments-Airline.md#method_getLegs) | | Возвращает legs. | | public | [getPassengers()](../classes/YooKassa-Request-Payments-Airline.md#method_getPassengers) | | Возвращает список пассажиров. | | public | [getTicketNumber()](../classes/YooKassa-Request-Payments-Airline.md#method_getTicketNumber) | | Возвращает ticket_number. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [notEmpty()](../classes/YooKassa-Request-Payments-Airline.md#method_notEmpty) | | Проверка на наличие данных. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setBookingReference()](../classes/YooKassa-Request-Payments-Airline.md#method_setBookingReference) | | Устанавливает booking_reference. | | public | [setLegs()](../classes/YooKassa-Request-Payments-Airline.md#method_setLegs) | | Устанавливает legs. | | public | [setPassengers()](../classes/YooKassa-Request-Payments-Airline.md#method_setPassengers) | | Устанавливает список пассажиров. | | public | [setTicketNumber()](../classes/YooKassa-Request-Payments-Airline.md#method_setTicketNumber) | | Устанавливает ticket_number. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/Airline.php](../../lib/Request/Payments/Airline.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\Payments\Airline * Implements: * [\YooKassa\Request\Payments\AirlineInterface](../classes/YooKassa-Request-Payments-AirlineInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $booking_reference : string --- ***Description*** Номер бронирования. Обязателен на этапе создания платежа **Type:** string **Details:** #### public $bookingReference : string --- ***Description*** Номер бронирования. Обязателен на этапе создания платежа **Type:** string **Details:** #### public $legs : \YooKassa\Common\ListObjectInterface|\YooKassa\Request\Payments\LegInterface[] --- ***Description*** Список маршрутов **Type:** LegInterface[] **Details:** #### public $passengers : \YooKassa\Common\ListObjectInterface|\YooKassa\Request\Payments\PassengerInterface[] --- ***Description*** Список пассажиров **Type:** PassengerInterface[] **Details:** #### public $ticket_number : string --- ***Description*** Уникальный номер билета. Обязателен на этапе подтверждения платежа **Type:** string **Details:** #### public $ticketNumber : string --- ***Description*** Уникальный номер билета. Обязателен на этапе подтверждения платежа **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public addLeg() : self ```php public addLeg(array|\YooKassa\Request\Payments\LegInterface $value) : self ``` **Summary** Добавляет объект-контейнер с данными о маршруте. **Details:** * Inherited From: [\YooKassa\Request\Payments\Airline](../classes/YooKassa-Request-Payments-Airline.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Payments\LegInterface | value | Объект-контейнер с данными о маршруте | **Returns:** self - #### public addPassenger() : self ```php public addPassenger(array|\YooKassa\Request\Payments\PassengerInterface $value) : self ``` **Summary** Добавляет пассажира. **Details:** * Inherited From: [\YooKassa\Request\Payments\Airline](../classes/YooKassa-Request-Payments-Airline.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Payments\PassengerInterface | value | Пассажир | **Returns:** self - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getBookingReference() : string|null ```php public getBookingReference() : string|null ``` **Summary** Возвращает booking_reference. **Details:** * Inherited From: [\YooKassa\Request\Payments\Airline](../classes/YooKassa-Request-Payments-Airline.md) **Returns:** string|null - #### public getLegs() : \YooKassa\Request\Payments\LegInterface[]|\YooKassa\Common\ListObjectInterface ```php public getLegs() : \YooKassa\Request\Payments\LegInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает legs. **Details:** * Inherited From: [\YooKassa\Request\Payments\Airline](../classes/YooKassa-Request-Payments-Airline.md) **Returns:** \YooKassa\Request\Payments\LegInterface[]|\YooKassa\Common\ListObjectInterface - #### public getPassengers() : \YooKassa\Request\Payments\PassengerInterface[]|\YooKassa\Common\ListObjectInterface ```php public getPassengers() : \YooKassa\Request\Payments\PassengerInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список пассажиров. **Details:** * Inherited From: [\YooKassa\Request\Payments\Airline](../classes/YooKassa-Request-Payments-Airline.md) **Returns:** \YooKassa\Request\Payments\PassengerInterface[]|\YooKassa\Common\ListObjectInterface - Список пассажиров. #### public getTicketNumber() : string|null ```php public getTicketNumber() : string|null ``` **Summary** Возвращает ticket_number. **Details:** * Inherited From: [\YooKassa\Request\Payments\Airline](../classes/YooKassa-Request-Payments-Airline.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public notEmpty() : bool ```php public notEmpty() : bool ``` **Summary** Проверка на наличие данных. **Details:** * Inherited From: [\YooKassa\Request\Payments\Airline](../classes/YooKassa-Request-Payments-Airline.md) **Returns:** bool - #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setBookingReference() : self ```php public setBookingReference(string|null $booking_reference = null) : self ``` **Summary** Устанавливает booking_reference. **Details:** * Inherited From: [\YooKassa\Request\Payments\Airline](../classes/YooKassa-Request-Payments-Airline.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | booking_reference | Номер бронирования. Обязателен, если не передан `ticket_number`. | **Returns:** self - #### public setLegs() : self ```php public setLegs(\YooKassa\Common\ListObjectInterface|array|null $legs = null) : self ``` **Summary** Устанавливает legs. **Details:** * Inherited From: [\YooKassa\Request\Payments\Airline](../classes/YooKassa-Request-Payments-Airline.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | legs | Список перелетов. | **Returns:** self - #### public setPassengers() : self ```php public setPassengers(\YooKassa\Common\ListObjectInterface|array|null $passengers = null) : self ``` **Summary** Устанавливает список пассажиров. **Details:** * Inherited From: [\YooKassa\Request\Payments\Airline](../classes/YooKassa-Request-Payments-Airline.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | passengers | Список пассажиров. | **Returns:** self - #### public setTicketNumber() : self ```php public setTicketNumber(string|null $ticket_number = null) : self ``` **Summary** Устанавливает ticket_number. **Details:** * Inherited From: [\YooKassa\Request\Payments\Airline](../classes/YooKassa-Request-Payments-Airline.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | ticket_number | Уникальный номер билета. Если при создании платежа вы уже знаете номер билета, тогда `ticket_number` — обязательный параметр. Если не знаете, тогда вместо `ticket_number` необходимо передать `booking_reference` с номером бронирования. | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-CaptureDealData.md000064400000034220150364342670021276 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Deal\CaptureDealData ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Класс, представляющий модель CaptureDealData. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$settlements](../classes/YooKassa-Model-Deal-CaptureDealData.md#property_settlements) | | Данные о распределении денег. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getSettlements()](../classes/YooKassa-Model-Deal-CaptureDealData.md#method_getSettlements) | | Возвращает массив оплат, обеспечивающих выдачу товара. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setSettlements()](../classes/YooKassa-Model-Deal-CaptureDealData.md#method_setSettlements) | | Устанавливает массив оплат, обеспечивающих выдачу товара. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Deal/CaptureDealData.php](../../lib/Model/Deal/CaptureDealData.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Deal\CaptureDealData * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $settlements : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\SettlementInterface[] --- ***Description*** Данные о распределении денег. **Type:** SettlementInterface[] **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Model\Deal\CaptureDealData](../classes/YooKassa-Model-Deal-CaptureDealData.md) **Returns:** \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface - Массив оплат, обеспечивающих выдачу товара #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setSettlements() : self ```php public setSettlements(\YooKassa\Common\ListObjectInterface|array|null $settlements = null) : self ``` **Summary** Устанавливает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Model\Deal\CaptureDealData](../classes/YooKassa-Model-Deal-CaptureDealData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | settlements | Данные о распределении денег. | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-UntaxedVatData.md000064400000034774150364342670026662 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\UntaxedVatData ### Namespace: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank](../namespaces/yookassa-model-payment-paymentmethod-b2b-sberbank.md) --- **Summary:** Класс, представляющий модель UntaxedVatData. **Description:** Данные об НДС, если товар или услуга не облагается налогом (в параметре `type` передано значение ~`untaxed`). --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#property_type) | | Способ расчёта НДС | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-UntaxedVatData.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#method_getType) | | Возвращает способ расчёта НДС | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md#method_setType) | | Устанавливает способ расчёта НДС | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/B2b/Sberbank/UntaxedVatData.php](../../lib/Model/Payment/PaymentMethod/B2b/Sberbank/UntaxedVatData.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) * \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\UntaxedVatData * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Способ расчёта НДС **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) #### protected $_type : ?string --- **Type:** ?string Способ расчёта НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\UntaxedVatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-UntaxedVatData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает способ расчёта НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) **Returns:** string|null - Способ расчёта НДС #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setType() : self ```php public setType(string|null $type) : self ``` **Summary** Устанавливает способ расчёта НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Способ расчёта НДС | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Refunds-AbstractRefundResponse.md000064400000114315150364342670024076 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Request\Refunds\AbstractRefundResponse ### Namespace: [\YooKassa\Request\Refunds](../namespaces/yookassa-request-refunds.md) --- **Summary:** Класс, представляющий модель AbstractRefundResponse. **Description:** Абстрактный класс ответа от API с информацией о возврате. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Refund-Refund.md#constant_MAX_LENGTH_DESCRIPTION) | | Максимальная длина строки описания возврата | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Refund-Refund.md#property_amount) | | Сумма возврата | | public | [$cancellation_details](../classes/YooKassa-Model-Refund-Refund.md#property_cancellation_details) | | Комментарий к статусу `canceled` | | public | [$cancellationDetails](../classes/YooKassa-Model-Refund-Refund.md#property_cancellationDetails) | | Комментарий к статусу `canceled` | | public | [$created_at](../classes/YooKassa-Model-Refund-Refund.md#property_created_at) | | Время создания возврата | | public | [$createdAt](../classes/YooKassa-Model-Refund-Refund.md#property_createdAt) | | Время создания возврата | | public | [$deal](../classes/YooKassa-Model-Refund-Refund.md#property_deal) | | Данные о сделке, в составе которой проходит возврат | | public | [$description](../classes/YooKassa-Model-Refund-Refund.md#property_description) | | Комментарий, основание для возврата средств покупателю | | public | [$id](../classes/YooKassa-Model-Refund-Refund.md#property_id) | | Идентификатор возврата платежа | | public | [$payment_id](../classes/YooKassa-Model-Refund-Refund.md#property_payment_id) | | Идентификатор платежа | | public | [$paymentId](../classes/YooKassa-Model-Refund-Refund.md#property_paymentId) | | Идентификатор платежа | | public | [$receipt_registration](../classes/YooKassa-Model-Refund-Refund.md#property_receipt_registration) | | Статус регистрации чека | | public | [$receiptRegistration](../classes/YooKassa-Model-Refund-Refund.md#property_receiptRegistration) | | Статус регистрации чека | | public | [$sources](../classes/YooKassa-Model-Refund-Refund.md#property_sources) | | Данные о том, с какого магазина и какую сумму нужно удержать для проведения возврата | | public | [$status](../classes/YooKassa-Model-Refund-Refund.md#property_status) | | Статус возврата | | protected | [$_amount](../classes/YooKassa-Model-Refund-Refund.md#property__amount) | | | | protected | [$_cancellation_details](../classes/YooKassa-Model-Refund-Refund.md#property__cancellation_details) | | | | protected | [$_created_at](../classes/YooKassa-Model-Refund-Refund.md#property__created_at) | | | | protected | [$_deal](../classes/YooKassa-Model-Refund-Refund.md#property__deal) | | | | protected | [$_description](../classes/YooKassa-Model-Refund-Refund.md#property__description) | | | | protected | [$_id](../classes/YooKassa-Model-Refund-Refund.md#property__id) | | | | protected | [$_payment_id](../classes/YooKassa-Model-Refund-Refund.md#property__payment_id) | | | | protected | [$_receipt_registration](../classes/YooKassa-Model-Refund-Refund.md#property__receipt_registration) | | | | protected | [$_sources](../classes/YooKassa-Model-Refund-Refund.md#property__sources) | | | | protected | [$_status](../classes/YooKassa-Model-Refund-Refund.md#property__status) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Refund-Refund.md#method_getAmount) | | Возвращает сумму возврата. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Refund-Refund.md#method_getCancellationDetails) | | Возвращает cancellation_details. | | public | [getCreatedAt()](../classes/YooKassa-Model-Refund-Refund.md#method_getCreatedAt) | | Возвращает дату создания возврата. | | public | [getDeal()](../classes/YooKassa-Model-Refund-Refund.md#method_getDeal) | | Возвращает данные о сделке, в составе которой проходит возврат | | public | [getDescription()](../classes/YooKassa-Model-Refund-Refund.md#method_getDescription) | | Возвращает комментарий к возврату. | | public | [getId()](../classes/YooKassa-Model-Refund-Refund.md#method_getId) | | Возвращает идентификатор возврата платежа. | | public | [getPaymentId()](../classes/YooKassa-Model-Refund-Refund.md#method_getPaymentId) | | Возвращает идентификатор платежа. | | public | [getReceiptRegistration()](../classes/YooKassa-Model-Refund-Refund.md#method_getReceiptRegistration) | | Возвращает статус регистрации чека. | | public | [getSources()](../classes/YooKassa-Model-Refund-Refund.md#method_getSources) | | Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. | | public | [getStatus()](../classes/YooKassa-Model-Refund-Refund.md#method_getStatus) | | Возвращает статус текущего возврата. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Refund-Refund.md#method_setAmount) | | Устанавливает сумму возврата. | | public | [setCancellationDetails()](../classes/YooKassa-Model-Refund-Refund.md#method_setCancellationDetails) | | Устанавливает cancellation_details. | | public | [setCreatedAt()](../classes/YooKassa-Model-Refund-Refund.md#method_setCreatedAt) | | Устанавливает время создания возврата. | | public | [setDeal()](../classes/YooKassa-Model-Refund-Refund.md#method_setDeal) | | Устанавливает данные о сделке, в составе которой проходит возврат. | | public | [setDescription()](../classes/YooKassa-Model-Refund-Refund.md#method_setDescription) | | Устанавливает комментарий к возврату. | | public | [setId()](../classes/YooKassa-Model-Refund-Refund.md#method_setId) | | Устанавливает идентификатор возврата. | | public | [setPaymentId()](../classes/YooKassa-Model-Refund-Refund.md#method_setPaymentId) | | Устанавливает идентификатор платежа. | | public | [setReceiptRegistration()](../classes/YooKassa-Model-Refund-Refund.md#method_setReceiptRegistration) | | Устанавливает статус регистрации чека. | | public | [setSources()](../classes/YooKassa-Model-Refund-Refund.md#method_setSources) | | Устанавливает sources (массив распределения денег между магазинами). | | public | [setStatus()](../classes/YooKassa-Model-Refund-Refund.md#method_setStatus) | | Устанавливает статус возврата платежа. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Refunds/AbstractRefundResponse.php](../../lib/Request/Refunds/AbstractRefundResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) * \YooKassa\Request\Refunds\AbstractRefundResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Inherited from [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) Максимальная длина строки описания возврата ```php MAX_LENGTH_DESCRIPTION = 250 ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возврата **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $cancellation_details : \YooKassa\Model\Refund\RefundCancellationDetails --- ***Description*** Комментарий к статусу `canceled` **Type:** RefundCancellationDetails **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $cancellationDetails : \YooKassa\Model\Refund\RefundCancellationDetails --- ***Description*** Комментарий к статусу `canceled` **Type:** RefundCancellationDetails **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $created_at : \DateTime --- ***Description*** Время создания возврата **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $createdAt : \DateTime --- ***Description*** Время создания возврата **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $deal : \YooKassa\Model\Deal\RefundDealInfo --- ***Description*** Данные о сделке, в составе которой проходит возврат **Type:** RefundDealInfo **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $description : string --- ***Description*** Комментарий, основание для возврата средств покупателю **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $id : string --- ***Description*** Идентификатор возврата платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $payment_id : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $paymentId : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $receipt_registration : string --- ***Description*** Статус регистрации чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $receiptRegistration : string --- ***Description*** Статус регистрации чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $sources : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Refund\SourceInterface[] --- ***Description*** Данные о том, с какого магазина и какую сумму нужно удержать для проведения возврата **Type:** SourceInterface[] **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $status : string --- ***Description*** Статус возврата **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface Сумма возврата **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_cancellation_details : ?\YooKassa\Model\CancellationDetailsInterface --- **Type:** CancellationDetailsInterface Комментарий к статусу `canceled` **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_created_at : ?\DateTime --- **Type:** DateTime Время создания возврата **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_deal : ?\YooKassa\Model\Deal\RefundDealInfo --- **Type:** RefundDealInfo Данные о сделке, в составе которой проходит возврат **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_description : ?string --- **Type:** ?string Комментарий, основание для возврата средств покупателю **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_id : ?string --- **Type:** ?string Идентификатор возврата платежа **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_payment_id : ?string --- **Type:** ?string Идентификатор платежа **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_receipt_registration : ?string --- **Type:** ?string Статус регистрации чека **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_sources : ?\YooKassa\Common\ListObject --- **Type:** ListObject Данные о распределении денег — сколько и в какой магазин нужно перевести **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_status : ?string --- **Type:** ?string Статус возврата **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма возврата #### public getCancellationDetails() : \YooKassa\Model\CancellationDetailsInterface|null ```php public getCancellationDetails() : \YooKassa\Model\CancellationDetailsInterface|null ``` **Summary** Возвращает cancellation_details. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \YooKassa\Model\CancellationDetailsInterface|null - #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает дату создания возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \DateTime|null - Время создания возврата #### public getDeal() : null|\YooKassa\Model\Deal\RefundDealInfo ```php public getDeal() : null|\YooKassa\Model\Deal\RefundDealInfo ``` **Summary** Возвращает данные о сделке, в составе которой проходит возврат **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** null|\YooKassa\Model\Deal\RefundDealInfo - Данные о сделке, в составе которой проходит возврат #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает комментарий к возврату. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Комментарий, основание для возврата средств покупателю #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор возврата платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Идентификатор возврата #### public getPaymentId() : string|null ```php public getPaymentId() : string|null ``` **Summary** Возвращает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Идентификатор платежа #### public getReceiptRegistration() : string|null ```php public getReceiptRegistration() : string|null ``` **Summary** Возвращает статус регистрации чека. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Статус регистрации чека #### public getSources() : \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSources() : \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface - #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус текущего возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Статус возврата #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма возврата | **Returns:** self - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\CancellationDetailsInterface|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает cancellation_details. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\CancellationDetailsInterface OR array OR null | cancellation_details | | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания возврата | **Returns:** self - #### public setDeal() : self ```php public setDeal(\YooKassa\Model\Deal\RefundDealInfo|array|null $deal = null) : self ``` **Summary** Устанавливает данные о сделке, в составе которой проходит возврат. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Deal\RefundDealInfo OR array OR null | deal | Данные о сделке, в составе которой проходит возврат | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает комментарий к возврату. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Комментарий, основание для возврата средств покупателю | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор возврата | **Returns:** self - #### public setPaymentId() : self ```php public setPaymentId(string|null $payment_id = null) : self ``` **Summary** Устанавливает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_id | Идентификатор платежа | **Returns:** self - #### public setReceiptRegistration() : self ```php public setReceiptRegistration(string|null $receipt_registration = null) : self ``` **Summary** Устанавливает статус регистрации чека. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | receipt_registration | Статус регистрации чека | **Returns:** self - #### public setSources() : self ```php public setSources(\YooKassa\Common\ListObjectInterface|array|null $sources = null) : self ``` **Summary** Устанавливает sources (массив распределения денег между магазинами). **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | sources | | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус возврата платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус возврата платежа | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md000064400000046544150364342670026264 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataB2bSberbank ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentMethodDataB2bSberbank. **Description:** Данные для оплаты через СберБанк Бизнес Онлайн. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$payment_purpose](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md#property_payment_purpose) | | Назначение платежа (не больше 210 символов). | | public | [$paymentPurpose](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md#property_paymentPurpose) | | Назначение платежа (не больше 210 символов). | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | public | [$vat_data](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md#property_vat_data) | | Данные об НДС. | | public | [$vatData](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md#property_vatData) | | Данные об НДС. | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getPaymentPurpose()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md#method_getPaymentPurpose) | | Возвращает назначение платежа. | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [getVatData()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md#method_getVatData) | | Возвращает назначение платежа. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setPaymentPurpose()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md#method_setPaymentPurpose) | | Устанавливает назначение платежа. | | public | [setVatData()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md#method_setVatData) | | Устанавливает назначение платежа. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataB2bSberbank.php](../../lib/Request/Payments/PaymentData/PaymentDataB2bSberbank.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataB2bSberbank * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $payment_purpose : string --- ***Description*** Назначение платежа (не больше 210 символов). **Type:** string **Details:** #### public $paymentPurpose : string --- ***Description*** Назначение платежа (не больше 210 символов). **Type:** string **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) #### public $vat_data : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData --- ***Description*** Данные об НДС. **Type:** VatData **Details:** #### public $vatData : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData --- ***Description*** Данные об НДС. **Type:** VatData **Details:** #### protected $_type : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataB2bSberbank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getPaymentPurpose() : string|null ```php public getPaymentPurpose() : string|null ``` **Summary** Возвращает назначение платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataB2bSberbank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md) **Returns:** string|null - Назначение платежа #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public getVatData() : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData|null ```php public getVatData() : \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData|null ``` **Summary** Возвращает назначение платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataB2bSberbank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md) **Returns:** \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData|null - Данные об НДС #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setPaymentPurpose() : self ```php public setPaymentPurpose(string|null $payment_purpose) : self ``` **Summary** Устанавливает назначение платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataB2bSberbank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_purpose | Назначение платежа | **Returns:** self - #### public setVatData() : self ```php public setVatData(\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData|array|null $vat_data) : self ``` **Summary** Устанавливает назначение платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataB2bSberbank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataB2bSberbank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatData OR array OR null | vat_data | Данные об НДС | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-SettlementPayoutPayment.md000064400000036436150364342670023212 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Deal\SettlementPayoutPayment ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Класс, представляющий модель SettlementPayoutPayment. **Description:** Данные о распределении денег. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Deal-SettlementPayoutPayment.md#property_amount) | | Размер оплаты | | public | [$type](../classes/YooKassa-Model-Deal-SettlementPayoutPayment.md#property_type) | | Вид оплаты в чеке | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Deal-SettlementPayoutPayment.md#method_getAmount) | | Возвращает размер оплаты. | | public | [getType()](../classes/YooKassa-Model-Deal-SettlementPayoutPayment.md#method_getType) | | Возвращает тип операции (payout - выплата продавцу). | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Deal-SettlementPayoutPayment.md#method_setAmount) | | Устанавливает сумму платежа. | | public | [setType()](../classes/YooKassa-Model-Deal-SettlementPayoutPayment.md#method_setType) | | Устанавливает вид оплаты в чеке. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Deal/SettlementPayoutPayment.php](../../lib/Model/Deal/SettlementPayoutPayment.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Deal\SettlementPayoutPayment * Implements: * [\YooKassa\Model\Receipt\SettlementInterface](../classes/YooKassa-Model-Receipt-SettlementInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Размер оплаты **Type:** AmountInterface **Details:** #### public $type : string --- ***Description*** Вид оплаты в чеке **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает размер оплаты. **Details:** * Inherited From: [\YooKassa\Model\Deal\SettlementPayoutPayment](../classes/YooKassa-Model-Deal-SettlementPayoutPayment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Размер оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип операции (payout - выплата продавцу). **Details:** * Inherited From: [\YooKassa\Model\Deal\SettlementPayoutPayment](../classes/YooKassa-Model-Deal-SettlementPayoutPayment.md) **Returns:** string|null - Тип операции #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму платежа. **Details:** * Inherited From: [\YooKassa\Model\Deal\SettlementPayoutPayment](../classes/YooKassa-Model-Deal-SettlementPayoutPayment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма платежа | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает вид оплаты в чеке. **Details:** * Inherited From: [\YooKassa\Model\Deal\SettlementPayoutPayment](../classes/YooKassa-Model-Deal-SettlementPayoutPayment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataInterface.md000064400000006256150364342670027144 0ustar00# [YooKassa API SDK](../home.md) # Interface: VatDataInterface ### Namespace: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank](../namespaces/yookassa-model-payment-paymentmethod-b2b-sberbank.md) --- **Summary:** Interface VatDataInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAmount()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataInterface.md#method_getAmount) | | Возвращает сумму НДС | | public | [getRate()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataInterface.md#method_getRate) | | Возвращает данные об НДС | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataInterface.md#method_getType) | | Возвращает способ расчёта НДС | --- ### Details * File: [lib/Model/Payment/PaymentMethod/B2b/Sberbank/VatDataInterface.php](../../lib/Model/Payment/PaymentMethod/B2b/Sberbank/VatDataInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Способ расчёта НДС | | property | | Данные об НДС в случае, если сумма НДС включена в сумму платежа | | property | | Сумма НДС | --- ## Methods #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает способ расчёта НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataInterface.md) **Returns:** string|null - Способ расчёта НДС #### public getRate() : string|null ```php public getRate() : string|null ``` **Summary** Возвращает данные об НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataInterface.md) **Returns:** string|null - Данные об НДС #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму НДС **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма НДС --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentStatus.md000064400000012725150364342670021712 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentStatus ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Класс, представляющий модель PaymentStatus. **Description:** Статус платежа. Возможные значения: - `pending` - Ожидает оплаты покупателем - `waiting_for_capture` - Успешно оплачен покупателем, ожидает подтверждения магазином (capture или aviso) - `succeeded` - Успешно оплачен и подтвержден магазином - `canceled` - Неуспех оплаты или отменен магазином (cancel) --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [PENDING](../classes/YooKassa-Model-Payment-PaymentStatus.md#constant_PENDING) | | Ожидает оплаты покупателем | | public | [WAITING_FOR_CAPTURE](../classes/YooKassa-Model-Payment-PaymentStatus.md#constant_WAITING_FOR_CAPTURE) | | Ожидает подтверждения магазином | | public | [SUCCEEDED](../classes/YooKassa-Model-Payment-PaymentStatus.md#constant_SUCCEEDED) | | Успешно оплачен и подтвержден магазином | | public | [CANCELED](../classes/YooKassa-Model-Payment-PaymentStatus.md#constant_CANCELED) | | Неуспех оплаты или отменен магазином | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payment-PaymentStatus.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payment/PaymentStatus.php](../../lib/Model/Payment/PaymentStatus.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payment\PaymentStatus * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### PENDING Ожидает оплаты покупателем ```php PENDING = 'pending' ``` ###### WAITING_FOR_CAPTURE Ожидает подтверждения магазином ```php WAITING_FOR_CAPTURE = 'waiting_for_capture' ``` ###### SUCCEEDED Успешно оплачен и подтвержден магазином ```php SUCCEEDED = 'succeeded' ``` ###### CANCELED Неуспех оплаты или отменен магазином ```php CANCELED = 'canceled' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-Confirmation-ConfirmationExternal.md000064400000041040150364342670025642 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\Confirmation\ConfirmationExternal ### Namespace: [\YooKassa\Model\Payment\Confirmation](../namespaces/yookassa-model-payment-confirmation.md) --- **Summary:** Класс, представляющий модель ConfirmationExternal. **Description:** Сценарий при котором необходимо ожидать пока пользователь самостоятельно подтвердит платеж. Например, пользователь подтверждает платеж ответом на SMS или в приложении партнера. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#property_type) | | Тип подтверждения платежа | | public | [$type](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationExternal.md#property_type) | | Код сценария подтверждения. | | protected | [$_type](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#property__type) | | Тип подтверждения платежа. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationExternal.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getConfirmationData()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationData) | | | | public | [getConfirmationToken()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationToken) | | | | public | [getConfirmationUrl()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationUrl) | | | | public | [getType()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getType) | | Возвращает тип подтверждения платежа. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setType()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_setType) | | Устанавливает тип подтверждения платежа | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/Confirmation/ConfirmationExternal.php](../../lib/Model/Payment/Confirmation/ConfirmationExternal.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) * \YooKassa\Model\Payment\Confirmation\ConfirmationExternal * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип подтверждения платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) #### public $type : string --- ***Description*** Код сценария подтверждения. **Type:** string **Details:** #### protected $_type : ?string --- **Summary** Тип подтверждения платежа. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationExternal](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationExternal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getConfirmationData() ```php public getConfirmationData() ``` **Description** Для ConfirmationQr **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationToken() ```php public getConfirmationToken() ``` **Description** Для ConfirmationEmbedded **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationUrl() ```php public getConfirmationUrl() ``` **Description** Для ConfirmationRedirect **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getType() : ?string ```php public getType() : ?string ``` **Summary** Возвращает тип подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** ?string - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип подтверждения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип подтверждения платежа | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-PayoutInterface.md000064400000021114150364342670022027 0ustar00# [YooKassa API SDK](../home.md) # Interface: PayoutInterface ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Interface DealInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAmount()](../classes/YooKassa-Model-Payout-PayoutInterface.md#method_getAmount) | | Возвращает баланс сделки. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Payout-PayoutInterface.md#method_getCancellationDetails) | | Возвращает комментарий к статусу canceled: кто отменил выплату и по какой причине. | | public | [getCreatedAt()](../classes/YooKassa-Model-Payout-PayoutInterface.md#method_getCreatedAt) | | Возвращает время создания сделки. | | public | [getDeal()](../classes/YooKassa-Model-Payout-PayoutInterface.md#method_getDeal) | | Возвращает сделку, в рамках которой нужно провести выплату. | | public | [getDescription()](../classes/YooKassa-Model-Payout-PayoutInterface.md#method_getDescription) | | Возвращает описание транзакции (не более 128 символов). | | public | [getId()](../classes/YooKassa-Model-Payout-PayoutInterface.md#method_getId) | | Возвращает Id сделки. | | public | [getMetadata()](../classes/YooKassa-Model-Payout-PayoutInterface.md#method_getMetadata) | | Возвращает дополнительные данные сделки. | | public | [getPayoutDestination()](../classes/YooKassa-Model-Payout-PayoutInterface.md#method_getPayoutDestination) | | Возвращает платежное средство продавца, на которое ЮKassa переводит оплату. | | public | [getStatus()](../classes/YooKassa-Model-Payout-PayoutInterface.md#method_getStatus) | | Возвращает статус сделки. | | public | [getTest()](../classes/YooKassa-Model-Payout-PayoutInterface.md#method_getTest) | | Возвращает признак тестовой операции. | --- ### Details * File: [lib/Model/Payout/PayoutInterface.php](../../lib/Model/Payout/PayoutInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Идентификатор выплаты | | property | | Сумма выплаты | | property | | Текущее состояние выплаты | | property | | Способ проведения выплаты | | property | | Способ проведения выплаты | | property | | Описание транзакции | | property | | Время создания заказа | | property | | Время создания заказа | | property | | Сделка, в рамках которой нужно провести выплату | | property | | Комментарий к отмене выплаты | | property | | Комментарий к отмене выплаты | | property | | Метаданные платежа указанные мерчантом | | property | | Признак тестовой операции | --- ## Methods #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutInterface](../classes/YooKassa-Model-Payout-PayoutInterface.md) **Returns:** string|null - Id сделки #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает баланс сделки. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutInterface](../classes/YooKassa-Model-Payout-PayoutInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Баланс сделки #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус сделки. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutInterface](../classes/YooKassa-Model-Payout-PayoutInterface.md) **Returns:** string|null - Статус сделки #### public getPayoutDestination() : \YooKassa\Model\Payout\AbstractPayoutDestination|null ```php public getPayoutDestination() : \YooKassa\Model\Payout\AbstractPayoutDestination|null ``` **Summary** Возвращает платежное средство продавца, на которое ЮKassa переводит оплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutInterface](../classes/YooKassa-Model-Payout-PayoutInterface.md) **Returns:** \YooKassa\Model\Payout\AbstractPayoutDestination|null - Платежное средство продавца, на которое ЮKassa переводит оплату #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции (не более 128 символов). **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutInterface](../classes/YooKassa-Model-Payout-PayoutInterface.md) **Returns:** string|null - Описание транзакции #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания сделки. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutInterface](../classes/YooKassa-Model-Payout-PayoutInterface.md) **Returns:** \DateTime|null - Время создания сделки #### public getDeal() : \YooKassa\Model\Deal\PayoutDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PayoutDealInfo|null ``` **Summary** Возвращает сделку, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutInterface](../classes/YooKassa-Model-Payout-PayoutInterface.md) **Returns:** \YooKassa\Model\Deal\PayoutDealInfo|null - Сделка, в рамках которой нужно провести выплату #### public getCancellationDetails() : null|\YooKassa\Model\Payout\PayoutCancellationDetails ```php public getCancellationDetails() : null|\YooKassa\Model\Payout\PayoutCancellationDetails ``` **Summary** Возвращает комментарий к статусу canceled: кто отменил выплату и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutInterface](../classes/YooKassa-Model-Payout-PayoutInterface.md) **Returns:** null|\YooKassa\Model\Payout\PayoutCancellationDetails - Комментарий к статусу canceled: кто отменил выплату и по какой причине #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает дополнительные данные сделки. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutInterface](../classes/YooKassa-Model-Payout-PayoutInterface.md) **Returns:** \YooKassa\Model\Metadata|null - Дополнительные данные сделки #### public getTest() : bool|null ```php public getTest() : bool|null ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutInterface](../classes/YooKassa-Model-Payout-PayoutInterface.md) **Returns:** bool|null - Признак тестовой операции --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedStatus.md000064400000013552150364342670023637 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\SelfEmployed\SelfEmployedStatus ### Namespace: [\YooKassa\Model\SelfEmployed](../namespaces/yookassa-model-selfemployed.md) --- **Summary:** Класс, представляющий модель SelfEmployedStatus. **Description:** Статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков. Возможные значения: - `pending` — ЮMoney запросили права на регистрацию чеков, но самозанятый еще не ответил на заявку; - `confirmed` — самозанятый выдал права ЮMoney; вы можете делать выплаты; - `canceled` — самозанятый отклонил заявку или отозвал ранее выданные права. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [PENDING](../classes/YooKassa-Model-SelfEmployed-SelfEmployedStatus.md#constant_PENDING) | | ЮMoney запросили права на регистрацию чеков, но самозанятый еще не ответил на заявку | | public | [CONFIRMED](../classes/YooKassa-Model-SelfEmployed-SelfEmployedStatus.md#constant_CONFIRMED) | | Самозанятый выдал права ЮMoney, вы можете делать выплаты | | public | [CANCELED](../classes/YooKassa-Model-SelfEmployed-SelfEmployedStatus.md#constant_CANCELED) | | Самозанятый отклонил заявку или отозвал ранее выданные права | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-SelfEmployed-SelfEmployedStatus.md#property_validValues) | | Возвращает список доступных значений | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/SelfEmployed/SelfEmployedStatus.php](../../lib/Model/SelfEmployed/SelfEmployedStatus.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\SelfEmployed\SelfEmployedStatus * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### PENDING ЮMoney запросили права на регистрацию чеков, но самозанятый еще не ответил на заявку ```php PENDING = 'pending' ``` ###### CONFIRMED Самозанятый выдал права ЮMoney, вы можете делать выплаты ```php CONFIRMED = 'confirmed' ``` ###### CANCELED Самозанятый отклонил заявку или отозвал ранее выданные права ```php CANCELED = 'canceled' ``` --- ## Properties #### protected $validValues : array --- **Summary** Возвращает список доступных значений **Type:** array Массив принимаемых enum'ом значений **Details:** ##### Tags | Tag | Version | Description | | --- | ------- | ----------- | | return | | | --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payouts-IncomeReceiptData.md000064400000042423150364342670023026 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payouts\IncomeReceiptData ### Namespace: [\YooKassa\Request\Payouts](../namespaces/yookassa-request-payouts.md) --- **Summary:** Класс, представляющий модель IncomeReceiptData. **Description:** Данные для формирования чека в сервисе Мой налог. Необходимо передавать, если вы делаете выплату [самозанятому](/developers/payouts/scenario-extensions/self-employed). Только для обычных выплат. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_SERVICE_NAME](../classes/YooKassa-Request-Payouts-IncomeReceiptData.md#constant_MAX_LENGTH_SERVICE_NAME) | | | | public | [MIN_LENGTH_SERVICE_NAME](../classes/YooKassa-Request-Payouts-IncomeReceiptData.md#constant_MIN_LENGTH_SERVICE_NAME) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Request-Payouts-IncomeReceiptData.md#property_amount) | | Сумма для печати в чеке | | public | [$service_name](../classes/YooKassa-Request-Payouts-IncomeReceiptData.md#property_service_name) | | Описание услуги, оказанной получателем выплаты. Не более 50 символов | | public | [$serviceName](../classes/YooKassa-Request-Payouts-IncomeReceiptData.md#property_serviceName) | | Описание услуги, оказанной получателем выплаты. Не более 50 символов | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Request-Payouts-IncomeReceiptData.md#method_getAmount) | | Возвращает сумму для печати в чеке. | | public | [getServiceName()](../classes/YooKassa-Request-Payouts-IncomeReceiptData.md#method_getServiceName) | | Возвращает описание услуги, оказанной получателем выплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Request-Payouts-IncomeReceiptData.md#method_setAmount) | | Устанавливает сумму для печати в чеке. | | public | [setServiceName()](../classes/YooKassa-Request-Payouts-IncomeReceiptData.md#method_setServiceName) | | Устанавливает описание услуги, оказанной получателем выплаты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payouts/IncomeReceiptData.php](../../lib/Request/Payouts/IncomeReceiptData.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\Payouts\IncomeReceiptData * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_SERVICE_NAME ```php MAX_LENGTH_SERVICE_NAME = 50 : int ``` ###### MIN_LENGTH_SERVICE_NAME ```php MIN_LENGTH_SERVICE_NAME = 1 : int ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма для печати в чеке **Type:** AmountInterface **Details:** #### public $service_name : string --- ***Description*** Описание услуги, оказанной получателем выплаты. Не более 50 символов **Type:** string **Details:** #### public $serviceName : string --- ***Description*** Описание услуги, оказанной получателем выплаты. Не более 50 символов **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму для печати в чеке. **Details:** * Inherited From: [\YooKassa\Request\Payouts\IncomeReceiptData](../classes/YooKassa-Request-Payouts-IncomeReceiptData.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма для печати в чеке #### public getServiceName() : string|null ```php public getServiceName() : string|null ``` **Summary** Возвращает описание услуги, оказанной получателем выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\IncomeReceiptData](../classes/YooKassa-Request-Payouts-IncomeReceiptData.md) **Returns:** string|null - Описание услуги, оказанной получателем выплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму для печати в чеке. **Details:** * Inherited From: [\YooKassa\Request\Payouts\IncomeReceiptData](../classes/YooKassa-Request-Payouts-IncomeReceiptData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма для печати в чеке | **Returns:** self - #### public setServiceName() : self ```php public setServiceName(string|null $service_name = null) : self ``` **Summary** Устанавливает описание услуги, оказанной получателем выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\IncomeReceiptData](../classes/YooKassa-Request-Payouts-IncomeReceiptData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | service_name | Описание услуги, оказанной получателем выплаты | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md000064400000032720150364342670027311 0ustar00# [YooKassa API SDK](../home.md) # Interface: CreatePersonalDataRequestInterface ### Namespace: [\YooKassa\Request\PersonalData](../namespaces/yookassa-request-personaldata.md) --- **Summary:** Interface CreatePersonalDataRequestInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getFirstName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_getFirstName) | | Возвращает имя пользователя. | | public | [getLastName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_getLastName) | | Возвращает фамилию пользователя. | | public | [getMetadata()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_getMetadata) | | Возвращает метаданные. | | public | [getMiddleName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_getMiddleName) | | Возвращает отчество пользователя. | | public | [getType()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_getType) | | Возвращает тип персональных данных. | | public | [hasFirstName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_hasFirstName) | | Проверяет наличие имени пользователя в запросе. | | public | [hasLastName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_hasLastName) | | Проверяет наличие фамилии пользователя в запросе. | | public | [hasMetadata()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_hasMetadata) | | Проверяет, были ли установлены метаданные. | | public | [hasMiddleName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_hasMiddleName) | | Проверяет наличие отчества пользователя в запросе. | | public | [hasType()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_hasType) | | Проверяет наличие типа персональных данных в запросе. | | public | [setFirstName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_setFirstName) | | Устанавливает имя пользователя. | | public | [setLastName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_setLastName) | | Устанавливает фамилию пользователя. | | public | [setMetadata()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_setMetadata) | | Устанавливает метаданные. | | public | [setMiddleName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_setMiddleName) | | Устанавливает отчество пользователя. | | public | [setType()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_setType) | | Устанавливает тип персональных данных. | | public | [toArray()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [validate()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md#method_validate) | | Проверяет на валидность текущий объект | --- ### Details * File: [lib/Request/PersonalData/CreatePersonalDataRequestInterface.php](../../lib/Request/PersonalData/CreatePersonalDataRequestInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | --- ## Methods #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип персональных данных. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) **Returns:** string|null - Тип персональных данных #### public setType() : $this ```php public setType(string|null $type) : $this ``` **Summary** Устанавливает тип персональных данных. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип персональных данных | **Returns:** $this - #### public hasType() : bool ```php public hasType() : bool ``` **Summary** Проверяет наличие типа персональных данных в запросе. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) **Returns:** bool - True если тип персональных данных задан, false если нет #### public getLastName() : string|null ```php public getLastName() : string|null ``` **Summary** Возвращает фамилию пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) **Returns:** string|null - Фамилия пользователя #### public setLastName() : $this ```php public setLastName(string|null $last_name) : $this ``` **Summary** Устанавливает фамилию пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | last_name | Фамилия пользователя | **Returns:** $this - #### public hasLastName() : bool ```php public hasLastName() : bool ``` **Summary** Проверяет наличие фамилии пользователя в запросе. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) **Returns:** bool - True если фамилия пользователя задана, false если нет #### public getFirstName() : string|null ```php public getFirstName() : string|null ``` **Summary** Возвращает имя пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) **Returns:** string|null - Имя пользователя #### public setFirstName() : $this ```php public setFirstName(string|null $first_name) : $this ``` **Summary** Устанавливает имя пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | first_name | Имя пользователя | **Returns:** $this - #### public hasFirstName() : bool ```php public hasFirstName() : bool ``` **Summary** Проверяет наличие имени пользователя в запросе. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) **Returns:** bool - True если имя пользователя задано, false если нет #### public getMiddleName() : null|string ```php public getMiddleName() : null|string ``` **Summary** Возвращает отчество пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) **Returns:** null|string - Отчество пользователя #### public setMiddleName() : $this ```php public setMiddleName(null|string $middle_name = null) : $this ``` **Summary** Устанавливает отчество пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | middle_name | Отчество пользователя | **Returns:** $this - #### public hasMiddleName() : bool ```php public hasMiddleName() : bool ``` **Summary** Проверяет наличие отчества пользователя в запросе. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) **Returns:** bool - True если отчество пользователя задано, false если нет #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает метаданные. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные #### public setMetadata() : $this ```php public setMetadata(null|array|\YooKassa\Model\Metadata $metadata) : $this ``` **Summary** Устанавливает метаданные. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Metadata | metadata | Метаданные | **Returns:** $this - #### public hasMetadata() : bool ```php public hasMetadata() : bool ``` **Summary** Проверяет, были ли установлены метаданные. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) **Returns:** bool - True если метаданные были установлены, false если нет #### public validate() : bool ```php public validate() : bool ``` **Summary** Проверяет на валидность текущий объект **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) **Returns:** bool - True если объект запроса валиден, false если нет #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestInterface.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsPartyCode.md000064400000010315150364342670027756 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\PersonalData\PersonalDataCancellationDetailsPartyCode ### Namespace: [\YooKassa\Model\PersonalData](../namespaces/yookassa-model-personaldata.md) --- **Summary:** Класс, представляющий модель PersonalDataCancellationDetailsPartyCode. **Description:** Возможные участники процесса, которые приняли решение о прекращении хранения персональных данных. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [YOO_MONEY](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsPartyCode.md#constant_YOO_MONEY) | | ЮKassa | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetailsPartyCode.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/PersonalData/PersonalDataCancellationDetailsPartyCode.php](../../lib/Model/PersonalData/PersonalDataCancellationDetailsPartyCode.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\PersonalData\PersonalDataCancellationDetailsPartyCode * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### YOO_MONEY ЮKassa ```php YOO_MONEY = 'yoo_money' ``` --- ## Properties #### protected $validValues : array --- **Type:** array **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Notification-NotificationSucceeded.md000064400000055715150364342670024343 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Notification\NotificationSucceeded ### Namespace: [\YooKassa\Model\Notification](../namespaces/yookassa-model-notification.md) --- **Summary:** Класс объекта, присылаемого API при изменении статуса платежа на "succeeded". --- ### Examples Пример скрипта обработки уведомления ```php require_once '../vendor/autoload.php'; try { $source = file_get_contents('php://input'); $data = json_decode($source, true); $factory = new \YooKassa\Model\Notification\NotificationFactory(); $notificationObject = $factory->factory($data); $responseObject = $notificationObject->getObject(); $client = new \YooKassa\Client(); if (!$client->isNotificationIPTrusted($_SERVER['REMOTE_ADDR'])) { header('HTTP/1.1 400 Something went wrong'); exit; } if (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_CANCELED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::REFUND_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'refundId' => $responseObject->getId(), 'refundStatus' => $responseObject->getStatus(), 'paymentId' => $responseObject->getPaymentId(), ]; // ... // Специфичная логика } else { header('HTTP/1.1 400 Something went wrong'); exit; } // Специфичная логика // ... $client->setAuth('xxxxxx', 'test_XXXXXXX'); // Получим актуальную информацию о платеже if ($paymentInfo = $client->getPaymentInfo($someData['paymentId'])) { $paymentStatus = $paymentInfo->getStatus(); // Специфичная логика // ... } else { header('HTTP/1.1 400 Something went wrong'); exit; } } catch (Exception $e) { header('HTTP/1.1 400 Something went wrong'); exit; } ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_event) | | Тип события | | public | [$object](../classes/YooKassa-Model-Notification-NotificationSucceeded.md#property_object) | | Объект с информацией о платеже | | public | [$type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_type) | | Тип уведомления в виде строки | | protected | [$_event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__event) | | | | protected | [$_type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Model-Notification-NotificationSucceeded.md#method_fromArray) | | Конструктор объекта нотификации о возможности подтверждения платежа. | | public | [getEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getEvent) | | Возвращает тип события. | | public | [getObject()](../classes/YooKassa-Model-Notification-NotificationSucceeded.md#method_getObject) | | Возвращает объект с информацией о платеже, уведомление о котором хранится в текущем объекте. | | public | [getType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getType) | | Возвращает тип уведомления. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setObject()](../classes/YooKassa-Model-Notification-NotificationSucceeded.md#method_setObject) | | Устанавливает объект с информацией о платеже, уведомление о которой хранится в текущем объекте. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setEvent) | | Устанавливает тип события. | | protected | [setType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setType) | | Устанавливает тип уведомления. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Notification/NotificationSucceeded.php](../../lib/Model/Notification/NotificationSucceeded.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) * \YooKassa\Model\Notification\NotificationSucceeded * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $event : string --- ***Description*** Тип события **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### public $object : \YooKassa\Model\Payment\PaymentInterface --- ***Description*** Объект с информацией о платеже **Type:** PaymentInterface **Details:** #### public $type : string --- ***Description*** Тип уведомления в виде строки **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### protected $_event : ?string --- **Type:** ?string Тип произошедшего события **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### protected $_type : ?string --- **Type:** ?string Тип уведомления **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array $sourceArray) : void ``` **Summary** Конструктор объекта нотификации о возможности подтверждения платежа. **Description** Инициализирует текущий объект из ассоциативного массива, который просто путём JSON десериализации получен из тела пришедшего запроса. При конструировании проверяется валидность типа передаваемого уведомления, если передать уведомление не того типа, будет сгенерировано исключение типа {@link} **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationSucceeded](../classes/YooKassa-Model-Notification-NotificationSucceeded.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | sourceArray | Ассоциативный массив с информацией об уведомлении | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если значение типа нотификации или события не равны "notification" и "payment.succeeded" соответственно, что может говорить о том, что переданные в конструктор данные не являются уведомлением нужного типа. | **Returns:** void - #### public getEvent() : string|null ```php public getEvent() : string|null ``` **Summary** Возвращает тип события. **Description** Тип события - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип события #### public getObject() : \YooKassa\Model\Payment\PaymentInterface ```php public getObject() : \YooKassa\Model\Payment\PaymentInterface ``` **Summary** Возвращает объект с информацией о платеже, уведомление о котором хранится в текущем объекте. **Description** Так как нотификация может быть сгенерирована и поставлена в очередь на отправку гораздо раньше, чем она будет получена на сайте, то опираться на статус пришедшего платежа не стоит, лучше запросить текущую информацию о платеже у API. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationSucceeded](../classes/YooKassa-Model-Notification-NotificationSucceeded.md) **Returns:** \YooKassa\Model\Payment\PaymentInterface - Объект с информацией о платеже #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип уведомления. **Description** Тип уведомления - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип уведомления в виде строки #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setObject() : self ```php public setObject(\YooKassa\Model\Payment\PaymentInterface|array $object) : self ``` **Summary** Устанавливает объект с информацией о платеже, уведомление о которой хранится в текущем объекте. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationSucceeded](../classes/YooKassa-Model-Notification-NotificationSucceeded.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\PaymentInterface OR array | object | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setEvent() : self ```php protected setEvent(string|null $event) : self ``` **Summary** Устанавливает тип события. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | event | Тип события | **Returns:** self - #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип уведомления. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип уведомления | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataAlfabank.md000064400000040777150364342670025710 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataAlfabank ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentMethodDataAlfabank. **Description:** Данные для оплаты через Альфа-Клик (или Альфа-Молнию). --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$login](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataAlfabank.md#property_login) | | Логин пользователя в Альфа-Клике. Обязателен для сценария [External](/developers/payment-acceptance/getting-started/payment-process#external). | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataAlfabank.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getLogin()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataAlfabank.md#method_getLogin) | | Возвращает имя пользователя в Альфа-Клике. | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setLogin()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataAlfabank.md#method_setLogin) | | Устанавливает имя пользователя в Альфа-Клике. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataAlfabank.php](../../lib/Request/Payments/PaymentData/PaymentDataAlfabank.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataAlfabank * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | deprecated | | Будет удален в следующих версиях | --- ## Properties #### public $login : string --- ***Description*** Логин пользователя в Альфа-Клике. Обязателен для сценария [External](/developers/payment-acceptance/getting-started/payment-process#external). **Type:** string **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) #### protected $_type : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataAlfabank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataAlfabank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getLogin() : string|null ```php public getLogin() : string|null ``` **Summary** Возвращает имя пользователя в Альфа-Клике. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataAlfabank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataAlfabank.md) **Returns:** string|null - Имя пользователя в Альфа-Клике #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setLogin() : self ```php public setLogin(string|null $login) : self ``` **Summary** Устанавливает имя пользователя в Альфа-Клике. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataAlfabank](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataAlfabank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | login | Имя пользователя в Альфа-Клике | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-OperationalDetails.md000064400000045142150364342670022631 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\OperationalDetails ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Class OperationalDetails. **Description:** Данные операционного реквизита чека --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MIN_VALUE](../classes/YooKassa-Model-Receipt-OperationalDetails.md#constant_MIN_VALUE) | | | | public | [OPERATION_ID_MAX_VALUE](../classes/YooKassa-Model-Receipt-OperationalDetails.md#constant_OPERATION_ID_MAX_VALUE) | | | | public | [VALUE_MAX_LENGTH](../classes/YooKassa-Model-Receipt-OperationalDetails.md#constant_VALUE_MAX_LENGTH) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$created_at](../classes/YooKassa-Model-Receipt-OperationalDetails.md#property_created_at) | | Время создания операции (тег в 54 ФЗ — 1273) | | public | [$createdAt](../classes/YooKassa-Model-Receipt-OperationalDetails.md#property_createdAt) | | Время создания операции (тег в 54 ФЗ — 1273) | | public | [$operation_id](../classes/YooKassa-Model-Receipt-OperationalDetails.md#property_operation_id) | | Идентификатор операции (тег в 54 ФЗ — 1271) | | public | [$operationId](../classes/YooKassa-Model-Receipt-OperationalDetails.md#property_operationId) | | Идентификатор операции (тег в 54 ФЗ — 1271) | | public | [$value](../classes/YooKassa-Model-Receipt-OperationalDetails.md#property_value) | | Данные операции (тег в 54 ФЗ — 1272) | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCreatedAt()](../classes/YooKassa-Model-Receipt-OperationalDetails.md#method_getCreatedAt) | | Возвращает время создания операции. | | public | [getOperationId()](../classes/YooKassa-Model-Receipt-OperationalDetails.md#method_getOperationId) | | Возвращает идентификатор операции. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [getValue()](../classes/YooKassa-Model-Receipt-OperationalDetails.md#method_getValue) | | Возвращает данные операции. | | public | [jsonSerialize()](../classes/YooKassa-Model-Receipt-OperationalDetails.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCreatedAt()](../classes/YooKassa-Model-Receipt-OperationalDetails.md#method_setCreatedAt) | | Устанавливает время создания операции. | | public | [setOperationId()](../classes/YooKassa-Model-Receipt-OperationalDetails.md#method_setOperationId) | | Устанавливает идентификатор операции. | | public | [setValue()](../classes/YooKassa-Model-Receipt-OperationalDetails.md#method_setValue) | | Устанавливает данные операции. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Receipt/OperationalDetails.php](../../lib/Model/Receipt/OperationalDetails.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Receipt\OperationalDetails * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MIN_VALUE ```php MIN_VALUE = 0 : int ``` ###### OPERATION_ID_MAX_VALUE ```php OPERATION_ID_MAX_VALUE = 255 : int ``` ###### VALUE_MAX_LENGTH ```php VALUE_MAX_LENGTH = 64 : int ``` --- ## Properties #### public $created_at : \DateTime --- ***Description*** Время создания операции (тег в 54 ФЗ — 1273) **Type:** \DateTime **Details:** #### public $createdAt : \DateTime --- ***Description*** Время создания операции (тег в 54 ФЗ — 1273) **Type:** \DateTime **Details:** #### public $operation_id : string --- ***Description*** Идентификатор операции (тег в 54 ФЗ — 1271) **Type:** string **Details:** #### public $operationId : string --- ***Description*** Идентификатор операции (тег в 54 ФЗ — 1271) **Type:** string **Details:** #### public $value : string --- ***Description*** Данные операции (тег в 54 ФЗ — 1272) **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания операции. **Details:** * Inherited From: [\YooKassa\Model\Receipt\OperationalDetails](../classes/YooKassa-Model-Receipt-OperationalDetails.md) **Returns:** \DateTime|null - Время создания операции #### public getOperationId() : int|null ```php public getOperationId() : int|null ``` **Summary** Возвращает идентификатор операции. **Details:** * Inherited From: [\YooKassa\Model\Receipt\OperationalDetails](../classes/YooKassa-Model-Receipt-OperationalDetails.md) **Returns:** int|null - Идентификатор операции #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public getValue() : string|null ```php public getValue() : string|null ``` **Summary** Возвращает данные операции. **Details:** * Inherited From: [\YooKassa\Model\Receipt\OperationalDetails](../classes/YooKassa-Model-Receipt-OperationalDetails.md) **Returns:** string|null - Данные операции #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Model\Receipt\OperationalDetails](../classes/YooKassa-Model-Receipt-OperationalDetails.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания операции. **Details:** * Inherited From: [\YooKassa\Model\Receipt\OperationalDetails](../classes/YooKassa-Model-Receipt-OperationalDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания операции | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setOperationId() : self ```php public setOperationId(int|null $operation_id = null) : self ``` **Summary** Устанавливает идентификатор операции. **Details:** * Inherited From: [\YooKassa\Model\Receipt\OperationalDetails](../classes/YooKassa-Model-Receipt-OperationalDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | operation_id | Идентификатор операции | **Returns:** self - #### public setValue() : self ```php public setValue(string|null $value = null) : self ``` **Summary** Устанавливает данные операции. **Details:** * Inherited From: [\YooKassa\Model\Receipt\OperationalDetails](../classes/YooKassa-Model-Receipt-OperationalDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Данные операции | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Refund-RefundInterface.md000064400000017640150364342670021744 0ustar00# [YooKassa API SDK](../home.md) # Interface: RefundInterface ### Namespace: [\YooKassa\Model\Refund](../namespaces/yookassa-model-refund.md) --- **Summary:** Interface RefundInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAmount()](../classes/YooKassa-Model-Refund-RefundInterface.md#method_getAmount) | | Возвращает сумму возврата. | | public | [getCreatedAt()](../classes/YooKassa-Model-Refund-RefundInterface.md#method_getCreatedAt) | | Возвращает дату создания возврата. | | public | [getDeal()](../classes/YooKassa-Model-Refund-RefundInterface.md#method_getDeal) | | Возвращает сделку, в рамках которой нужно провести возврат. | | public | [getDescription()](../classes/YooKassa-Model-Refund-RefundInterface.md#method_getDescription) | | Возвращает комментарий к возврату. | | public | [getId()](../classes/YooKassa-Model-Refund-RefundInterface.md#method_getId) | | Возвращает идентификатор возврата платежа. | | public | [getPaymentId()](../classes/YooKassa-Model-Refund-RefundInterface.md#method_getPaymentId) | | Возвращает идентификатор платежа. | | public | [getReceiptRegistration()](../classes/YooKassa-Model-Refund-RefundInterface.md#method_getReceiptRegistration) | | Возвращает статус регистрации чека. | | public | [getSources()](../classes/YooKassa-Model-Refund-RefundInterface.md#method_getSources) | | Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. | | public | [getStatus()](../classes/YooKassa-Model-Refund-RefundInterface.md#method_getStatus) | | Возвращает статус текущего возврата. | --- ### Details * File: [lib/Model/Refund/RefundInterface.php](../../lib/Model/Refund/RefundInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Идентификатор возврата платежа | | property | | Идентификатор платежа | | property | | Идентификатор платежа | | property | | Статус возврата | | property | | Комментарий к статусу `canceled` | | property | | Комментарий к статусу `canceled` | | property | | Время создания возврата | | property | | Время создания возврата | | property | | Сумма возврата | | property | | Статус регистрации чека | | property | | Статус регистрации чека | | property | | Комментарий, основание для возврата средств покупателю | | property | | Данные о том, с какого магазина и какую сумму нужно удержать для проведения возврата | | property | | Данные о сделке, в составе которой проходит возврат | --- ## Methods #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор возврата платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\RefundInterface](../classes/YooKassa-Model-Refund-RefundInterface.md) **Returns:** string|null - Идентификатор возврата #### public getPaymentId() : string|null ```php public getPaymentId() : string|null ``` **Summary** Возвращает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\RefundInterface](../classes/YooKassa-Model-Refund-RefundInterface.md) **Returns:** string|null - Идентификатор платежа #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус текущего возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\RefundInterface](../classes/YooKassa-Model-Refund-RefundInterface.md) **Returns:** string|null - Статус возврата #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает дату создания возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\RefundInterface](../classes/YooKassa-Model-Refund-RefundInterface.md) **Returns:** \DateTime|null - Время создания возврата #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\RefundInterface](../classes/YooKassa-Model-Refund-RefundInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма возврата #### public getReceiptRegistration() : string|null ```php public getReceiptRegistration() : string|null ``` **Summary** Возвращает статус регистрации чека. **Details:** * Inherited From: [\YooKassa\Model\Refund\RefundInterface](../classes/YooKassa-Model-Refund-RefundInterface.md) **Returns:** string|null - Статус регистрации чека #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает комментарий к возврату. **Details:** * Inherited From: [\YooKassa\Model\Refund\RefundInterface](../classes/YooKassa-Model-Refund-RefundInterface.md) **Returns:** string|null - Комментарий, основание для возврата средств покупателю #### public getSources() : \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSources() : \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. **Details:** * Inherited From: [\YooKassa\Model\Refund\RefundInterface](../classes/YooKassa-Model-Refund-RefundInterface.md) **Returns:** \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface - #### public getDeal() : null|\YooKassa\Model\Deal\RefundDealInfo ```php public getDeal() : null|\YooKassa\Model\Deal\RefundDealInfo ``` **Summary** Возвращает сделку, в рамках которой нужно провести возврат. **Details:** * Inherited From: [\YooKassa\Model\Refund\RefundInterface](../classes/YooKassa-Model-Refund-RefundInterface.md) **Returns:** null|\YooKassa\Model\Deal\RefundDealInfo - Сделка, в рамках которой нужно провести возврат --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-CancelResponse.md000064400000230401150364342670022541 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\CancelResponse ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель CancelResponse. **Description:** Объект ответа от API на запрос отмены платежа. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Payment-Payment.md#constant_MAX_LENGTH_DESCRIPTION) | | Максимальная длина строки описания платежа | | public | [MAX_LENGTH_MERCHANT_CUSTOMER_ID](../classes/YooKassa-Model-Payment-Payment.md#constant_MAX_LENGTH_MERCHANT_CUSTOMER_ID) | | Максимальная длина строки идентификатора покупателя в вашей системе | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Payment-Payment.md#property_amount) | | Сумма заказа | | public | [$authorization_details](../classes/YooKassa-Model-Payment-Payment.md#property_authorization_details) | | Данные об авторизации платежа | | public | [$authorizationDetails](../classes/YooKassa-Model-Payment-Payment.md#property_authorizationDetails) | | Данные об авторизации платежа | | public | [$cancellation_details](../classes/YooKassa-Model-Payment-Payment.md#property_cancellation_details) | | Комментарий к отмене платежа | | public | [$cancellationDetails](../classes/YooKassa-Model-Payment-Payment.md#property_cancellationDetails) | | Комментарий к отмене платежа | | public | [$captured_at](../classes/YooKassa-Model-Payment-Payment.md#property_captured_at) | | Время подтверждения платежа магазином | | public | [$capturedAt](../classes/YooKassa-Model-Payment-Payment.md#property_capturedAt) | | Время подтверждения платежа магазином | | public | [$confirmation](../classes/YooKassa-Model-Payment-Payment.md#property_confirmation) | | Способ подтверждения платежа | | public | [$created_at](../classes/YooKassa-Model-Payment-Payment.md#property_created_at) | | Время создания заказа | | public | [$createdAt](../classes/YooKassa-Model-Payment-Payment.md#property_createdAt) | | Время создания заказа | | public | [$deal](../classes/YooKassa-Model-Payment-Payment.md#property_deal) | | Данные о сделке, в составе которой проходит платеж | | public | [$description](../classes/YooKassa-Model-Payment-Payment.md#property_description) | | Описание транзакции | | public | [$expires_at](../classes/YooKassa-Model-Payment-Payment.md#property_expires_at) | | Время, до которого можно бесплатно отменить или подтвердить платеж | | public | [$expiresAt](../classes/YooKassa-Model-Payment-Payment.md#property_expiresAt) | | Время, до которого можно бесплатно отменить или подтвердить платеж | | public | [$id](../classes/YooKassa-Model-Payment-Payment.md#property_id) | | Идентификатор платежа | | public | [$income_amount](../classes/YooKassa-Model-Payment-Payment.md#property_income_amount) | | Сумма платежа, которую получит магазин | | public | [$incomeAmount](../classes/YooKassa-Model-Payment-Payment.md#property_incomeAmount) | | Сумма платежа, которую получит магазин | | public | [$merchant_customer_id](../classes/YooKassa-Model-Payment-Payment.md#property_merchant_customer_id) | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | public | [$merchantCustomerId](../classes/YooKassa-Model-Payment-Payment.md#property_merchantCustomerId) | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | public | [$metadata](../classes/YooKassa-Model-Payment-Payment.md#property_metadata) | | Метаданные платежа указанные мерчантом | | public | [$paid](../classes/YooKassa-Model-Payment-Payment.md#property_paid) | | Признак оплаты заказа | | public | [$payment_method](../classes/YooKassa-Model-Payment-Payment.md#property_payment_method) | | Способ проведения платежа | | public | [$paymentMethod](../classes/YooKassa-Model-Payment-Payment.md#property_paymentMethod) | | Способ проведения платежа | | public | [$receipt_registration](../classes/YooKassa-Model-Payment-Payment.md#property_receipt_registration) | | Состояние регистрации фискального чека | | public | [$receiptRegistration](../classes/YooKassa-Model-Payment-Payment.md#property_receiptRegistration) | | Состояние регистрации фискального чека | | public | [$recipient](../classes/YooKassa-Model-Payment-Payment.md#property_recipient) | | Получатель платежа | | public | [$refundable](../classes/YooKassa-Model-Payment-Payment.md#property_refundable) | | Возможность провести возврат по API | | public | [$refunded_amount](../classes/YooKassa-Model-Payment-Payment.md#property_refunded_amount) | | Сумма возвращенных средств платежа | | public | [$refundedAmount](../classes/YooKassa-Model-Payment-Payment.md#property_refundedAmount) | | Сумма возвращенных средств платежа | | public | [$status](../classes/YooKassa-Model-Payment-Payment.md#property_status) | | Текущее состояние платежа | | public | [$test](../classes/YooKassa-Model-Payment-Payment.md#property_test) | | Признак тестовой операции | | public | [$transfers](../classes/YooKassa-Model-Payment-Payment.md#property_transfers) | | Данные о распределении платежа между магазинами | | protected | [$_amount](../classes/YooKassa-Model-Payment-Payment.md#property__amount) | | | | protected | [$_authorization_details](../classes/YooKassa-Model-Payment-Payment.md#property__authorization_details) | | Данные об авторизации платежа | | protected | [$_cancellation_details](../classes/YooKassa-Model-Payment-Payment.md#property__cancellation_details) | | Комментарий к статусу canceled: кто отменил платеж и по какой причине | | protected | [$_captured_at](../classes/YooKassa-Model-Payment-Payment.md#property__captured_at) | | | | protected | [$_confirmation](../classes/YooKassa-Model-Payment-Payment.md#property__confirmation) | | | | protected | [$_created_at](../classes/YooKassa-Model-Payment-Payment.md#property__created_at) | | | | protected | [$_deal](../classes/YooKassa-Model-Payment-Payment.md#property__deal) | | | | protected | [$_description](../classes/YooKassa-Model-Payment-Payment.md#property__description) | | | | protected | [$_expires_at](../classes/YooKassa-Model-Payment-Payment.md#property__expires_at) | | Время, до которого можно бесплатно отменить или подтвердить платеж. В указанное время платеж в статусе `waiting_for_capture` будет автоматически отменен. | | protected | [$_id](../classes/YooKassa-Model-Payment-Payment.md#property__id) | | | | protected | [$_income_amount](../classes/YooKassa-Model-Payment-Payment.md#property__income_amount) | | | | protected | [$_merchant_customer_id](../classes/YooKassa-Model-Payment-Payment.md#property__merchant_customer_id) | | | | protected | [$_metadata](../classes/YooKassa-Model-Payment-Payment.md#property__metadata) | | | | protected | [$_paid](../classes/YooKassa-Model-Payment-Payment.md#property__paid) | | | | protected | [$_payment_method](../classes/YooKassa-Model-Payment-Payment.md#property__payment_method) | | | | protected | [$_receipt_registration](../classes/YooKassa-Model-Payment-Payment.md#property__receipt_registration) | | | | protected | [$_recipient](../classes/YooKassa-Model-Payment-Payment.md#property__recipient) | | | | protected | [$_refundable](../classes/YooKassa-Model-Payment-Payment.md#property__refundable) | | | | protected | [$_refunded_amount](../classes/YooKassa-Model-Payment-Payment.md#property__refunded_amount) | | | | protected | [$_status](../classes/YooKassa-Model-Payment-Payment.md#property__status) | | | | protected | [$_test](../classes/YooKassa-Model-Payment-Payment.md#property__test) | | Признак тестовой операции. | | protected | [$_transfers](../classes/YooKassa-Model-Payment-Payment.md#property__transfers) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getAmount) | | Возвращает сумму. | | public | [getAuthorizationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_getAuthorizationDetails) | | Возвращает данные об авторизации платежа. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_getCancellationDetails) | | Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [getCapturedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getCapturedAt) | | Возвращает время подтверждения платежа магазином или null, если время не задано. | | public | [getConfirmation()](../classes/YooKassa-Model-Payment-Payment.md#method_getConfirmation) | | Возвращает способ подтверждения платежа. | | public | [getCreatedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getCreatedAt) | | Возвращает время создания заказа. | | public | [getDeal()](../classes/YooKassa-Model-Payment-Payment.md#method_getDeal) | | Возвращает данные о сделке, в составе которой проходит платеж. | | public | [getDescription()](../classes/YooKassa-Model-Payment-Payment.md#method_getDescription) | | Возвращает описание транзакции | | public | [getExpiresAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getExpiresAt) | | Возвращает время до которого можно бесплатно отменить или подтвердить платеж, или null, если оно не задано. | | public | [getId()](../classes/YooKassa-Model-Payment-Payment.md#method_getId) | | Возвращает идентификатор платежа. | | public | [getIncomeAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getIncomeAmount) | | Возвращает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa. | | public | [getMerchantCustomerId()](../classes/YooKassa-Model-Payment-Payment.md#method_getMerchantCustomerId) | | Возвращает идентификатор покупателя в вашей системе. | | public | [getMetadata()](../classes/YooKassa-Model-Payment-Payment.md#method_getMetadata) | | Возвращает метаданные платежа установленные мерчантом | | public | [getPaid()](../classes/YooKassa-Model-Payment-Payment.md#method_getPaid) | | Проверяет, был ли уже оплачен заказ. | | public | [getPaymentMethod()](../classes/YooKassa-Model-Payment-Payment.md#method_getPaymentMethod) | | Возвращает используемый способ проведения платежа. | | public | [getReceiptRegistration()](../classes/YooKassa-Model-Payment-Payment.md#method_getReceiptRegistration) | | Возвращает состояние регистрации фискального чека. | | public | [getRecipient()](../classes/YooKassa-Model-Payment-Payment.md#method_getRecipient) | | Возвращает получателя платежа. | | public | [getRefundable()](../classes/YooKassa-Model-Payment-Payment.md#method_getRefundable) | | Проверяет возможность провести возврат по API. | | public | [getRefundedAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getRefundedAmount) | | Возвращает сумму возвращенных средств. | | public | [getStatus()](../classes/YooKassa-Model-Payment-Payment.md#method_getStatus) | | Возвращает состояние платежа. | | public | [getTest()](../classes/YooKassa-Model-Payment-Payment.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getTransfers()](../classes/YooKassa-Model-Payment-Payment.md#method_getTransfers) | | Возвращает массив распределения денег между магазинами. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setAmount) | | Устанавливает сумму платежа. | | public | [setAuthorizationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_setAuthorizationDetails) | | Устанавливает данные об авторизации платежа. | | public | [setCancellationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_setCancellationDetails) | | Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [setCapturedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setCapturedAt) | | Устанавливает время подтверждения платежа магазином | | public | [setConfirmation()](../classes/YooKassa-Model-Payment-Payment.md#method_setConfirmation) | | Устанавливает способ подтверждения платежа. | | public | [setCreatedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setCreatedAt) | | Устанавливает время создания заказа. | | public | [setDeal()](../classes/YooKassa-Model-Payment-Payment.md#method_setDeal) | | Устанавливает данные о сделке, в составе которой проходит платеж. | | public | [setDescription()](../classes/YooKassa-Model-Payment-Payment.md#method_setDescription) | | Устанавливает описание транзакции | | public | [setExpiresAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setExpiresAt) | | Устанавливает время до которого можно бесплатно отменить или подтвердить платеж. | | public | [setId()](../classes/YooKassa-Model-Payment-Payment.md#method_setId) | | Устанавливает идентификатор платежа. | | public | [setIncomeAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setIncomeAmount) | | Устанавливает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa | | public | [setMerchantCustomerId()](../classes/YooKassa-Model-Payment-Payment.md#method_setMerchantCustomerId) | | Устанавливает идентификатор покупателя в вашей системе. | | public | [setMetadata()](../classes/YooKassa-Model-Payment-Payment.md#method_setMetadata) | | Устанавливает метаданные платежа. | | public | [setPaid()](../classes/YooKassa-Model-Payment-Payment.md#method_setPaid) | | Устанавливает флаг оплаты заказа. | | public | [setPaymentMethod()](../classes/YooKassa-Model-Payment-Payment.md#method_setPaymentMethod) | | Устанавливает используемый способ проведения платежа. | | public | [setReceiptRegistration()](../classes/YooKassa-Model-Payment-Payment.md#method_setReceiptRegistration) | | Устанавливает состояние регистрации фискального чека | | public | [setRecipient()](../classes/YooKassa-Model-Payment-Payment.md#method_setRecipient) | | Устанавливает получателя платежа. | | public | [setRefundable()](../classes/YooKassa-Model-Payment-Payment.md#method_setRefundable) | | Устанавливает возможность провести возврат по API. | | public | [setRefundedAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setRefundedAmount) | | Устанавливает сумму возвращенных средств. | | public | [setStatus()](../classes/YooKassa-Model-Payment-Payment.md#method_setStatus) | | Устанавливает статус платежа | | public | [setTest()](../classes/YooKassa-Model-Payment-Payment.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [setTransfers()](../classes/YooKassa-Model-Payment-Payment.md#method_setTransfers) | | Устанавливает массив распределения денег между магазинами. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/CancelResponse.php](../../lib/Request/Payments/CancelResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) * [\YooKassa\Request\Payments\AbstractPaymentResponse](../classes/YooKassa-Request-Payments-AbstractPaymentResponse.md) * \YooKassa\Request\Payments\CancelResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Inherited from [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) Максимальная длина строки описания платежа ```php MAX_LENGTH_DESCRIPTION = 128 ``` ###### MAX_LENGTH_MERCHANT_CUSTOMER_ID Inherited from [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) Максимальная длина строки идентификатора покупателя в вашей системе ```php MAX_LENGTH_MERCHANT_CUSTOMER_ID = 200 ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма заказа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $authorization_details : \YooKassa\Model\Payment\AuthorizationDetailsInterface --- ***Description*** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $authorizationDetails : \YooKassa\Model\Payment\AuthorizationDetailsInterface --- ***Description*** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $cancellation_details : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене платежа **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $cancellationDetails : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене платежа **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $captured_at : \DateTime --- ***Description*** Время подтверждения платежа магазином **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $capturedAt : \DateTime --- ***Description*** Время подтверждения платежа магазином **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $confirmation : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation --- ***Description*** Способ подтверждения платежа **Type:** AbstractConfirmation **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $created_at : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $createdAt : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $deal : \YooKassa\Model\Deal\PaymentDealInfo --- ***Description*** Данные о сделке, в составе которой проходит платеж **Type:** PaymentDealInfo **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $description : string --- ***Description*** Описание транзакции **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $expires_at : \DateTime --- ***Description*** Время, до которого можно бесплатно отменить или подтвердить платеж **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $expiresAt : \DateTime --- ***Description*** Время, до которого можно бесплатно отменить или подтвердить платеж **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $id : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $income_amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма платежа, которую получит магазин **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $incomeAmount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма платежа, которую получит магазин **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $merchant_customer_id : string --- ***Description*** Идентификатор покупателя в вашей системе, например электронная почта или номер телефона **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $merchantCustomerId : string --- ***Description*** Идентификатор покупателя в вашей системе, например электронная почта или номер телефона **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные платежа указанные мерчантом **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $paid : bool --- ***Description*** Признак оплаты заказа **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $payment_method : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения платежа **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $paymentMethod : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения платежа **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $receipt_registration : string --- ***Description*** Состояние регистрации фискального чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $receiptRegistration : string --- ***Description*** Состояние регистрации фискального чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $recipient : \YooKassa\Model\Payment\RecipientInterface --- ***Description*** Получатель платежа **Type:** RecipientInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refundable : bool --- ***Description*** Возможность провести возврат по API **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refunded_amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возвращенных средств платежа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refundedAmount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возвращенных средств платежа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $status : string --- ***Description*** Текущее состояние платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $test : bool --- ***Description*** Признак тестовой операции **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $transfers : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Payment\TransferInterface[] --- ***Description*** Данные о распределении платежа между магазинами **Type:** TransferInterface[] **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_authorization_details : ?\YooKassa\Model\Payment\AuthorizationDetailsInterface --- **Summary** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_cancellation_details : ?\YooKassa\Model\CancellationDetailsInterface --- **Summary** Комментарий к статусу canceled: кто отменил платеж и по какой причине **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_captured_at : ?\DateTime --- **Type:** DateTime Время подтверждения платежа магазином **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_confirmation : ?\YooKassa\Model\Payment\Confirmation\AbstractConfirmation --- **Type:** AbstractConfirmation Способ подтверждения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_created_at : ?\DateTime --- **Type:** DateTime Время создания заказа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_deal : ?\YooKassa\Model\Deal\PaymentDealInfo --- **Type:** PaymentDealInfo Данные о сделке, в составе которой проходит платеж. Необходимо передавать, если вы проводите Безопасную сделку **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_description : ?string --- **Type:** ?string Описание платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_expires_at : ?\DateTime --- **Summary** Время, до которого можно бесплатно отменить или подтвердить платеж. В указанное время платеж в статусе `waiting_for_capture` будет автоматически отменен. **Type:** DateTime Время, до которого можно бесплатно отменить или подтвердить платеж **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_id : ?string --- **Type:** ?string Идентификатор платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_income_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_merchant_customer_id : ?string --- **Type:** ?string Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов. Присутствует, если вы хотите запомнить банковскую карту и отобразить ее при повторном платеже в виджете ЮKassa **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Type:** Metadata Метаданные платежа указанные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_paid : bool --- **Type:** bool Признак оплаты заказа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_payment_method : ?\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- **Type:** AbstractPaymentMethod Способ проведения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_receipt_registration : ?string --- **Type:** ?string Состояние регистрации фискального чека **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_recipient : ?\YooKassa\Model\Payment\RecipientInterface --- **Type:** RecipientInterface Получатель платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_refundable : bool --- **Type:** bool Возможность провести возврат по API **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_refunded_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface Сумма возвращенных средств платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_status : ?string --- **Type:** ?string Текущее состояние платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_test : bool --- **Summary** Признак тестовой операции. **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_transfers : ?\YooKassa\Common\ListObject --- **Type:** ListObject Данные о распределении платежа между магазинами **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма платежа #### public getAuthorizationDetails() : null|\YooKassa\Model\Payment\AuthorizationDetailsInterface ```php public getAuthorizationDetails() : null|\YooKassa\Model\Payment\AuthorizationDetailsInterface ``` **Summary** Возвращает данные об авторизации платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\Payment\AuthorizationDetailsInterface - Данные об авторизации платежа #### public getCancellationDetails() : null|\YooKassa\Model\CancellationDetailsInterface ```php public getCancellationDetails() : null|\YooKassa\Model\CancellationDetailsInterface ``` **Summary** Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\CancellationDetailsInterface - Комментарий к статусу canceled #### public getCapturedAt() : null|\DateTime ```php public getCapturedAt() : null|\DateTime ``` **Summary** Возвращает время подтверждения платежа магазином или null, если время не задано. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\DateTime - Время подтверждения платежа магазином #### public getConfirmation() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null ```php public getConfirmation() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null ``` **Summary** Возвращает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null - Способ подтверждения платежа #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \DateTime|null - Время создания заказа #### public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ``` **Summary** Возвращает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Deal\PaymentDealInfo|null - Данные о сделке, в составе которой проходит платеж #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - #### public getExpiresAt() : null|\DateTime ```php public getExpiresAt() : null|\DateTime ``` **Summary** Возвращает время до которого можно бесплатно отменить или подтвердить платеж, или null, если оно не задано. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\DateTime - Время, до которого можно бесплатно отменить или подтвердить платеж #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Идентификатор платежа #### public getIncomeAmount() : \YooKassa\Model\AmountInterface|null ```php public getIncomeAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма платежа, которую получит магазин #### public getMerchantCustomerId() : string|null ```php public getMerchantCustomerId() : string|null ``` **Summary** Возвращает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Идентификатор покупателя в вашей системе #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает метаданные платежа установленные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные платежа указанные мерчантом #### public getPaid() : bool ```php public getPaid() : bool ``` **Summary** Проверяет, был ли уже оплачен заказ. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Признак оплаты заказа, true если заказ оплачен, false если нет #### public getPaymentMethod() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null ```php public getPaymentMethod() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null ``` **Summary** Возвращает используемый способ проведения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null - Способ проведения платежа #### public getReceiptRegistration() : string|null ```php public getReceiptRegistration() : string|null ``` **Summary** Возвращает состояние регистрации фискального чека. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Состояние регистрации фискального чека #### public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ```php public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ``` **Summary** Возвращает получателя платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\Payment\RecipientInterface - Получатель платежа или null, если получатель не задан #### public getRefundable() : bool ```php public getRefundable() : bool ``` **Summary** Проверяет возможность провести возврат по API. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Возможность провести возврат по API, true если есть, false если нет #### public getRefundedAmount() : \YooKassa\Model\AmountInterface|null ```php public getRefundedAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму возвращенных средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма возвращенных средств платежа #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает состояние платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Текущее состояние платежа #### public getTest() : bool ```php public getTest() : bool ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Признак тестовой операции #### public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface ```php public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает массив распределения денег между магазинами. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface - Массив распределения денег #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма платежа | **Returns:** self - #### public setAuthorizationDetails() : self ```php public setAuthorizationDetails(\YooKassa\Model\Payment\AuthorizationDetailsInterface|array|null $authorization_details = null) : self ``` **Summary** Устанавливает данные об авторизации платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\AuthorizationDetailsInterface OR array OR null | authorization_details | Данные об авторизации платежа | **Returns:** self - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\CancellationDetailsInterface|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\CancellationDetailsInterface OR array OR null | cancellation_details | Комментарий к статусу canceled | **Returns:** self - #### public setCapturedAt() : self ```php public setCapturedAt(\DateTime|string|null $captured_at = null) : self ``` **Summary** Устанавливает время подтверждения платежа магазином **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | captured_at | Время подтверждения платежа магазином | **Returns:** self - #### public setConfirmation() : self ```php public setConfirmation(\YooKassa\Model\Payment\Confirmation\AbstractConfirmation|array|null $confirmation = null) : self ``` **Summary** Устанавливает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\Confirmation\AbstractConfirmation OR array OR null | confirmation | Способ подтверждения платежа | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания заказа | **Returns:** self - #### public setDeal() : self ```php public setDeal(null|array|\YooKassa\Model\Deal\PaymentDealInfo $deal = null) : self ``` **Summary** Устанавливает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\PaymentDealInfo | deal | Данные о сделке, в составе которой проходит платеж | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | | **Returns:** self - #### public setExpiresAt() : self ```php public setExpiresAt(\DateTime|string|null $expires_at = null) : self ``` **Summary** Устанавливает время до которого можно бесплатно отменить или подтвердить платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at | Время, до которого можно бесплатно отменить или подтвердить платеж | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор платежа | **Returns:** self - #### public setIncomeAmount() : self ```php public setIncomeAmount(\YooKassa\Model\AmountInterface|array|null $income_amount = null) : self ``` **Summary** Устанавливает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | income_amount | | **Returns:** self - #### public setMerchantCustomerId() : self ```php public setMerchantCustomerId(string|null $merchant_customer_id = null) : self ``` **Summary** Устанавливает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | merchant_customer_id | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает метаданные платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Метаданные платежа указанные мерчантом | **Returns:** self - #### public setPaid() : self ```php public setPaid(bool $paid) : self ``` **Summary** Устанавливает флаг оплаты заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | paid | Признак оплаты заказа | **Returns:** self - #### public setPaymentMethod() : self ```php public setPaymentMethod(\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|array|null $payment_method) : self ``` **Summary** Устанавливает используемый способ проведения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod OR array OR null | payment_method | Способ проведения платежа | **Returns:** self - #### public setReceiptRegistration() : self ```php public setReceiptRegistration(string|null $receipt_registration = null) : self ``` **Summary** Устанавливает состояние регистрации фискального чека **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | receipt_registration | Состояние регистрации фискального чека | **Returns:** self - #### public setRecipient() : self ```php public setRecipient(\YooKassa\Model\Payment\RecipientInterface|array|null $recipient = null) : self ``` **Summary** Устанавливает получателя платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\RecipientInterface OR array OR null | recipient | Объект с информацией о получателе платежа | **Returns:** self - #### public setRefundable() : self ```php public setRefundable(bool $refundable) : self ``` **Summary** Устанавливает возможность провести возврат по API. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | refundable | Возможность провести возврат по API | **Returns:** self - #### public setRefundedAmount() : self ```php public setRefundedAmount(\YooKassa\Model\AmountInterface|array|null $refunded_amount = null) : self ``` **Summary** Устанавливает сумму возвращенных средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | refunded_amount | Сумма возвращенных средств платежа | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус платежа | **Returns:** self - #### public setTest() : self ```php public setTest(bool $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | test | Признак тестовой операции | **Returns:** self - #### public setTransfers() : self ```php public setTransfers(\YooKassa\Common\ListObjectInterface|array|null $transfers = null) : self ``` **Summary** Устанавливает массив распределения денег между магазинами. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | transfers | Массив распределения денег | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-TransferDataInterface.md000064400000030023150364342670024032 0ustar00# [YooKassa API SDK](../home.md) # Interface: TransferDataInterface ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Interface TransferDataInterface. **Description:** Данные о распределении денег — сколько и в какой магазин нужно перевести. Присутствует, если вы используете [Сплитование платежей](/developers/solutions-for-platforms/split-payments/basics). --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAccountId()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_getAccountId) | | Возвращает account_id. | | public | [getAmount()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_getAmount) | | Возвращает amount. | | public | [getDescription()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_getDescription) | | Возвращает description. | | public | [getMetadata()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_getMetadata) | | Возвращает metadata. | | public | [getPlatformFeeAmount()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_getPlatformFeeAmount) | | Возвращает platform_fee_amount. | | public | [hasAccountId()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_hasAccountId) | | | | public | [hasAmount()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_hasAmount) | | | | public | [hasDescription()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_hasDescription) | | | | public | [hasMetadata()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_hasMetadata) | | | | public | [hasPlatformFeeAmount()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_hasPlatformFeeAmount) | | | | public | [setAccountId()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_setAccountId) | | Устанавливает account_id. | | public | [setAmount()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_setAmount) | | Устанавливает amount. | | public | [setDescription()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_setDescription) | | Устанавливает description. | | public | [setMetadata()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_setMetadata) | | Устанавливает metadata. | | public | [setPlatformFeeAmount()](../classes/YooKassa-Request-Payments-TransferDataInterface.md#method_setPlatformFeeAmount) | | Устанавливает platform_fee_amount. | --- ### Details * File: [lib/Request/Payments/TransferDataInterface.php](../../lib/Request/Payments/TransferDataInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Идентификатор магазина, в пользу которого вы принимаете оплату | | property | | Идентификатор магазина, в пользу которого вы принимаете оплату | | property | | Сумма, которую необходимо перечислить магазину | | property | | Комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу | | property | | Комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу | | property | | Описание транзакции, которое продавец увидит в личном кабинете ЮKassa. (например: «Заказ маркетплейса №72») | | property | | Любые дополнительные данные, которые нужны вам для работы с платежами (например, ваш внутренний идентификатор заказа) | --- ## Methods #### public getAccountId() : string|null ```php public getAccountId() : string|null ``` **Summary** Возвращает account_id. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) **Returns:** string|null - #### public setAccountId() : \YooKassa\Request\Payments\TransferData ```php public setAccountId(string|null $value = null) : \YooKassa\Request\Payments\TransferData ``` **Summary** Устанавливает account_id. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | | **Returns:** \YooKassa\Request\Payments\TransferData - #### public hasAccountId() : bool ```php public hasAccountId() : bool ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) **Returns:** bool - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает amount. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - #### public setAmount() : \YooKassa\Request\Payments\TransferData ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $value = null) : \YooKassa\Request\Payments\TransferData ``` **Summary** Устанавливает amount. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | value | | **Returns:** \YooKassa\Request\Payments\TransferData - #### public hasAmount() : bool ```php public hasAmount() : bool ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) **Returns:** bool - #### public getPlatformFeeAmount() : \YooKassa\Model\AmountInterface|null ```php public getPlatformFeeAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает platform_fee_amount. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - #### public setPlatformFeeAmount() : \YooKassa\Request\Payments\TransferData ```php public setPlatformFeeAmount(\YooKassa\Model\AmountInterface|array|null $value = null) : \YooKassa\Request\Payments\TransferData ``` **Summary** Устанавливает platform_fee_amount. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | value | | **Returns:** \YooKassa\Request\Payments\TransferData - #### public hasPlatformFeeAmount() : bool ```php public hasPlatformFeeAmount() : bool ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) **Returns:** bool - #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает description. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) **Returns:** string|null - #### public setDescription() : \YooKassa\Request\Payments\TransferData ```php public setDescription(string|null $value = null) : \YooKassa\Request\Payments\TransferData ``` **Summary** Устанавливает description. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Описание транзакции (не более 128 символов), которое продавец увидит в личном кабинете ЮKassa. Например: «Заказ маркетплейса №72». | **Returns:** \YooKassa\Request\Payments\TransferData - #### public hasDescription() : bool ```php public hasDescription() : bool ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) **Returns:** bool - #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает metadata. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) **Returns:** \YooKassa\Model\Metadata|null - #### public setMetadata() : \YooKassa\Request\Payments\TransferData ```php public setMetadata(string|array|null $value = null) : \YooKassa\Request\Payments\TransferData ``` **Summary** Устанавливает metadata. **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR array OR null | value | Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). Передаются в виде набора пар «ключ-значение» и возвращаются в ответе от ЮKassa. Ограничения: максимум 16 ключей, имя ключа не больше 32 символов, значение ключа не больше 512 символов, тип данных — строка в формате UTF-8. | **Returns:** \YooKassa\Request\Payments\TransferData - #### public hasMetadata() : bool ```php public hasMetadata() : bool ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\TransferDataInterface](../classes/YooKassa-Request-Payments-TransferDataInterface.md) **Returns:** bool - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-AbstractRequestBuilder.md000064400000013142150364342670022263 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Common\AbstractRequestBuilder ### Namespace: [\YooKassa\Common](../namespaces/yookassa-common.md) --- **Summary:** Класс, представляющий модель AbstractRequestBuilder. **Description:** Базовый класс билдера запросов. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$currentObject](../classes/YooKassa-Common-AbstractRequestBuilder.md#property_currentObject) | | Инстанс собираемого запроса. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. | | public | [build()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_build) | | Строит запрос, валидирует его и возвращает, если все прошло нормально. | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива. | | protected | [initCurrentObject()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_initCurrentObject) | | Инициализирует пустой запрос | --- ### Details * File: [lib/Common/AbstractRequestBuilder.php](../../lib/Common/AbstractRequestBuilder.php) * Package: YooKassa * Class Hierarchy: * \YooKassa\Common\AbstractRequestBuilder * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### protected $currentObject : ?\YooKassa\Common\AbstractRequestInterface --- **Summary** Инстанс собираемого запроса. **Type:** AbstractRequestInterface **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public build() : \YooKassa\Common\AbstractRequestInterface ```php public build(null|array $options = null) : \YooKassa\Common\AbstractRequestInterface ``` **Summary** Строит запрос, валидирует его и возвращает, если все прошло нормально. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array | options | Массив свойств запроса, если нужно их установить перед сборкой | **Returns:** \YooKassa\Common\AbstractRequestInterface - Инстанс собранного запроса #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(iterable|null $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable OR null | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### protected initCurrentObject() : \YooKassa\Common\AbstractRequestInterface|null ```php Abstract protected initCurrentObject() : \YooKassa\Common\AbstractRequestInterface|null ``` **Summary** Инициализирует пустой запрос **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** \YooKassa\Common\AbstractRequestInterface|null - Инстанс запроса, который будем собирать --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequestSerializer.md000064400000004570150364342670025517 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payouts\CreatePayoutRequestSerializer ### Namespace: [\YooKassa\Request\Payouts](../namespaces/yookassa-request-payouts.md) --- **Summary:** Класс, представляющий модель CreatePayoutRequestSerializer. **Description:** Класс объекта осуществляющего сериализацию объекта запроса к API на проведение выплаты. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [serialize()](../classes/YooKassa-Request-Payouts-CreatePayoutRequestSerializer.md#method_serialize) | | Формирует ассоциативный массив данных из объекта запроса. | --- ### Details * File: [lib/Request/Payouts/CreatePayoutRequestSerializer.php](../../lib/Request/Payouts/CreatePayoutRequestSerializer.php) * Package: YooKassa\Request * Class Hierarchy: * \YooKassa\Request\Payouts\CreatePayoutRequestSerializer * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public serialize() : array ```php public serialize(\YooKassa\Request\Payouts\CreatePayoutRequestInterface $request) : array ``` **Summary** Формирует ассоциативный массив данных из объекта запроса. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequestSerializer](../classes/YooKassa-Request-Payouts-CreatePayoutRequestSerializer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Payouts\CreatePayoutRequestInterface | request | Объект запроса | **Returns:** array - Массив данных для дальнейшего кодирования в JSON --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md000064400000033625150364342670025007 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation ### Namespace: [\YooKassa\Model\SelfEmployed](../namespaces/yookassa-model-selfemployed.md) --- **Summary:** Класс, представляющий модель SelfEmployedConfirmation. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md#property_type) | | Тип сценария подтверждения. | | protected | [$_type](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md#property__type) | | Код сценария подтверждения. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getType()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md#method_getType) | | Возвращает код сценария подтверждения. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setType()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md#method_setType) | | Устанавливает код сценария подтверждения. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/SelfEmployed/SelfEmployedConfirmation.php](../../lib/Model/SelfEmployed/SelfEmployedConfirmation.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип сценария подтверждения. **Type:** string **Details:** #### protected $_type : ?string --- **Summary** Код сценария подтверждения. **Type:** ?string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает код сценария подтверждения. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает код сценария подтверждения. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Код сценария подтверждения | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-Recipient.md000064400000041141150364342670021005 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\Recipient ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Класс, представляющий модель Recipient. **Description:** Получатель платежа. Нужен, если вы разделяете потоки платежей в рамках одного аккаунта или создаете платеж в адрес другого аккаунта. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$account_id](../classes/YooKassa-Model-Payment-Recipient.md#property_account_id) | | Идентификатор магазина | | public | [$accountId](../classes/YooKassa-Model-Payment-Recipient.md#property_accountId) | | Идентификатор магазина | | public | [$gateway_id](../classes/YooKassa-Model-Payment-Recipient.md#property_gateway_id) | | Идентификатор шлюза | | public | [$gatewayId](../classes/YooKassa-Model-Payment-Recipient.md#property_gatewayId) | | Идентификатор шлюза | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAccountId()](../classes/YooKassa-Model-Payment-Recipient.md#method_getAccountId) | | Возвращает идентификатор магазина. | | public | [getGatewayId()](../classes/YooKassa-Model-Payment-Recipient.md#method_getGatewayId) | | Возвращает идентификатор субаккаунта. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAccountId()](../classes/YooKassa-Model-Payment-Recipient.md#method_setAccountId) | | Устанавливает идентификатор магазина. | | public | [setGatewayId()](../classes/YooKassa-Model-Payment-Recipient.md#method_setGatewayId) | | Устанавливает идентификатор субаккаунта. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/Recipient.php](../../lib/Model/Payment/Recipient.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payment\Recipient * Implements: * [\YooKassa\Model\Payment\RecipientInterface](../classes/YooKassa-Model-Payment-RecipientInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $account_id : string --- ***Description*** Идентификатор магазина **Type:** string **Details:** #### public $accountId : string --- ***Description*** Идентификатор магазина **Type:** string **Details:** #### public $gateway_id : string --- ***Description*** Идентификатор шлюза **Type:** string **Details:** #### public $gatewayId : string --- ***Description*** Идентификатор шлюза **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAccountId() : string|null ```php public getAccountId() : string|null ``` **Summary** Возвращает идентификатор магазина. **Details:** * Inherited From: [\YooKassa\Model\Payment\Recipient](../classes/YooKassa-Model-Payment-Recipient.md) **Returns:** string|null - Идентификатор магазина #### public getGatewayId() : string|null ```php public getGatewayId() : string|null ``` **Summary** Возвращает идентификатор субаккаунта. **Details:** * Inherited From: [\YooKassa\Model\Payment\Recipient](../classes/YooKassa-Model-Payment-Recipient.md) **Returns:** string|null - Идентификатор субаккаунта. Используется для разделения потоков платежей в рамках одного аккаунта. #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAccountId() : self ```php public setAccountId(string|null $account_id) : self ``` **Summary** Устанавливает идентификатор магазина. **Details:** * Inherited From: [\YooKassa\Model\Payment\Recipient](../classes/YooKassa-Model-Payment-Recipient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | account_id | Идентификатор магазина | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | Выбрасывается если было передано не строковое значение | **Returns:** self - #### public setGatewayId() : self ```php public setGatewayId(string|null $gateway_id = null) : self ``` **Summary** Устанавливает идентификатор субаккаунта. **Details:** * Inherited From: [\YooKassa\Model\Payment\Recipient](../classes/YooKassa-Model-Payment-Recipient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | gateway_id | Идентификатор субаккаунта. Используется для разделения потоков платежей в рамках одного аккаунта. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-CreateCaptureResponse.md000064400000230462150364342670024112 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\CreateCaptureResponse ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель CreateCaptureResponse. **Description:** Объект ответа от API на запрос подтверждения платежа. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Payment-Payment.md#constant_MAX_LENGTH_DESCRIPTION) | | Максимальная длина строки описания платежа | | public | [MAX_LENGTH_MERCHANT_CUSTOMER_ID](../classes/YooKassa-Model-Payment-Payment.md#constant_MAX_LENGTH_MERCHANT_CUSTOMER_ID) | | Максимальная длина строки идентификатора покупателя в вашей системе | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Payment-Payment.md#property_amount) | | Сумма заказа | | public | [$authorization_details](../classes/YooKassa-Model-Payment-Payment.md#property_authorization_details) | | Данные об авторизации платежа | | public | [$authorizationDetails](../classes/YooKassa-Model-Payment-Payment.md#property_authorizationDetails) | | Данные об авторизации платежа | | public | [$cancellation_details](../classes/YooKassa-Model-Payment-Payment.md#property_cancellation_details) | | Комментарий к отмене платежа | | public | [$cancellationDetails](../classes/YooKassa-Model-Payment-Payment.md#property_cancellationDetails) | | Комментарий к отмене платежа | | public | [$captured_at](../classes/YooKassa-Model-Payment-Payment.md#property_captured_at) | | Время подтверждения платежа магазином | | public | [$capturedAt](../classes/YooKassa-Model-Payment-Payment.md#property_capturedAt) | | Время подтверждения платежа магазином | | public | [$confirmation](../classes/YooKassa-Model-Payment-Payment.md#property_confirmation) | | Способ подтверждения платежа | | public | [$created_at](../classes/YooKassa-Model-Payment-Payment.md#property_created_at) | | Время создания заказа | | public | [$createdAt](../classes/YooKassa-Model-Payment-Payment.md#property_createdAt) | | Время создания заказа | | public | [$deal](../classes/YooKassa-Model-Payment-Payment.md#property_deal) | | Данные о сделке, в составе которой проходит платеж | | public | [$description](../classes/YooKassa-Model-Payment-Payment.md#property_description) | | Описание транзакции | | public | [$expires_at](../classes/YooKassa-Model-Payment-Payment.md#property_expires_at) | | Время, до которого можно бесплатно отменить или подтвердить платеж | | public | [$expiresAt](../classes/YooKassa-Model-Payment-Payment.md#property_expiresAt) | | Время, до которого можно бесплатно отменить или подтвердить платеж | | public | [$id](../classes/YooKassa-Model-Payment-Payment.md#property_id) | | Идентификатор платежа | | public | [$income_amount](../classes/YooKassa-Model-Payment-Payment.md#property_income_amount) | | Сумма платежа, которую получит магазин | | public | [$incomeAmount](../classes/YooKassa-Model-Payment-Payment.md#property_incomeAmount) | | Сумма платежа, которую получит магазин | | public | [$merchant_customer_id](../classes/YooKassa-Model-Payment-Payment.md#property_merchant_customer_id) | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | public | [$merchantCustomerId](../classes/YooKassa-Model-Payment-Payment.md#property_merchantCustomerId) | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | public | [$metadata](../classes/YooKassa-Model-Payment-Payment.md#property_metadata) | | Метаданные платежа указанные мерчантом | | public | [$paid](../classes/YooKassa-Model-Payment-Payment.md#property_paid) | | Признак оплаты заказа | | public | [$payment_method](../classes/YooKassa-Model-Payment-Payment.md#property_payment_method) | | Способ проведения платежа | | public | [$paymentMethod](../classes/YooKassa-Model-Payment-Payment.md#property_paymentMethod) | | Способ проведения платежа | | public | [$receipt_registration](../classes/YooKassa-Model-Payment-Payment.md#property_receipt_registration) | | Состояние регистрации фискального чека | | public | [$receiptRegistration](../classes/YooKassa-Model-Payment-Payment.md#property_receiptRegistration) | | Состояние регистрации фискального чека | | public | [$recipient](../classes/YooKassa-Model-Payment-Payment.md#property_recipient) | | Получатель платежа | | public | [$refundable](../classes/YooKassa-Model-Payment-Payment.md#property_refundable) | | Возможность провести возврат по API | | public | [$refunded_amount](../classes/YooKassa-Model-Payment-Payment.md#property_refunded_amount) | | Сумма возвращенных средств платежа | | public | [$refundedAmount](../classes/YooKassa-Model-Payment-Payment.md#property_refundedAmount) | | Сумма возвращенных средств платежа | | public | [$status](../classes/YooKassa-Model-Payment-Payment.md#property_status) | | Текущее состояние платежа | | public | [$test](../classes/YooKassa-Model-Payment-Payment.md#property_test) | | Признак тестовой операции | | public | [$transfers](../classes/YooKassa-Model-Payment-Payment.md#property_transfers) | | Данные о распределении платежа между магазинами | | protected | [$_amount](../classes/YooKassa-Model-Payment-Payment.md#property__amount) | | | | protected | [$_authorization_details](../classes/YooKassa-Model-Payment-Payment.md#property__authorization_details) | | Данные об авторизации платежа | | protected | [$_cancellation_details](../classes/YooKassa-Model-Payment-Payment.md#property__cancellation_details) | | Комментарий к статусу canceled: кто отменил платеж и по какой причине | | protected | [$_captured_at](../classes/YooKassa-Model-Payment-Payment.md#property__captured_at) | | | | protected | [$_confirmation](../classes/YooKassa-Model-Payment-Payment.md#property__confirmation) | | | | protected | [$_created_at](../classes/YooKassa-Model-Payment-Payment.md#property__created_at) | | | | protected | [$_deal](../classes/YooKassa-Model-Payment-Payment.md#property__deal) | | | | protected | [$_description](../classes/YooKassa-Model-Payment-Payment.md#property__description) | | | | protected | [$_expires_at](../classes/YooKassa-Model-Payment-Payment.md#property__expires_at) | | Время, до которого можно бесплатно отменить или подтвердить платеж. В указанное время платеж в статусе `waiting_for_capture` будет автоматически отменен. | | protected | [$_id](../classes/YooKassa-Model-Payment-Payment.md#property__id) | | | | protected | [$_income_amount](../classes/YooKassa-Model-Payment-Payment.md#property__income_amount) | | | | protected | [$_merchant_customer_id](../classes/YooKassa-Model-Payment-Payment.md#property__merchant_customer_id) | | | | protected | [$_metadata](../classes/YooKassa-Model-Payment-Payment.md#property__metadata) | | | | protected | [$_paid](../classes/YooKassa-Model-Payment-Payment.md#property__paid) | | | | protected | [$_payment_method](../classes/YooKassa-Model-Payment-Payment.md#property__payment_method) | | | | protected | [$_receipt_registration](../classes/YooKassa-Model-Payment-Payment.md#property__receipt_registration) | | | | protected | [$_recipient](../classes/YooKassa-Model-Payment-Payment.md#property__recipient) | | | | protected | [$_refundable](../classes/YooKassa-Model-Payment-Payment.md#property__refundable) | | | | protected | [$_refunded_amount](../classes/YooKassa-Model-Payment-Payment.md#property__refunded_amount) | | | | protected | [$_status](../classes/YooKassa-Model-Payment-Payment.md#property__status) | | | | protected | [$_test](../classes/YooKassa-Model-Payment-Payment.md#property__test) | | Признак тестовой операции. | | protected | [$_transfers](../classes/YooKassa-Model-Payment-Payment.md#property__transfers) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getAmount) | | Возвращает сумму. | | public | [getAuthorizationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_getAuthorizationDetails) | | Возвращает данные об авторизации платежа. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_getCancellationDetails) | | Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [getCapturedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getCapturedAt) | | Возвращает время подтверждения платежа магазином или null, если время не задано. | | public | [getConfirmation()](../classes/YooKassa-Model-Payment-Payment.md#method_getConfirmation) | | Возвращает способ подтверждения платежа. | | public | [getCreatedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getCreatedAt) | | Возвращает время создания заказа. | | public | [getDeal()](../classes/YooKassa-Model-Payment-Payment.md#method_getDeal) | | Возвращает данные о сделке, в составе которой проходит платеж. | | public | [getDescription()](../classes/YooKassa-Model-Payment-Payment.md#method_getDescription) | | Возвращает описание транзакции | | public | [getExpiresAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getExpiresAt) | | Возвращает время до которого можно бесплатно отменить или подтвердить платеж, или null, если оно не задано. | | public | [getId()](../classes/YooKassa-Model-Payment-Payment.md#method_getId) | | Возвращает идентификатор платежа. | | public | [getIncomeAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getIncomeAmount) | | Возвращает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa. | | public | [getMerchantCustomerId()](../classes/YooKassa-Model-Payment-Payment.md#method_getMerchantCustomerId) | | Возвращает идентификатор покупателя в вашей системе. | | public | [getMetadata()](../classes/YooKassa-Model-Payment-Payment.md#method_getMetadata) | | Возвращает метаданные платежа установленные мерчантом | | public | [getPaid()](../classes/YooKassa-Model-Payment-Payment.md#method_getPaid) | | Проверяет, был ли уже оплачен заказ. | | public | [getPaymentMethod()](../classes/YooKassa-Model-Payment-Payment.md#method_getPaymentMethod) | | Возвращает используемый способ проведения платежа. | | public | [getReceiptRegistration()](../classes/YooKassa-Model-Payment-Payment.md#method_getReceiptRegistration) | | Возвращает состояние регистрации фискального чека. | | public | [getRecipient()](../classes/YooKassa-Model-Payment-Payment.md#method_getRecipient) | | Возвращает получателя платежа. | | public | [getRefundable()](../classes/YooKassa-Model-Payment-Payment.md#method_getRefundable) | | Проверяет возможность провести возврат по API. | | public | [getRefundedAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getRefundedAmount) | | Возвращает сумму возвращенных средств. | | public | [getStatus()](../classes/YooKassa-Model-Payment-Payment.md#method_getStatus) | | Возвращает состояние платежа. | | public | [getTest()](../classes/YooKassa-Model-Payment-Payment.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getTransfers()](../classes/YooKassa-Model-Payment-Payment.md#method_getTransfers) | | Возвращает массив распределения денег между магазинами. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setAmount) | | Устанавливает сумму платежа. | | public | [setAuthorizationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_setAuthorizationDetails) | | Устанавливает данные об авторизации платежа. | | public | [setCancellationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_setCancellationDetails) | | Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [setCapturedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setCapturedAt) | | Устанавливает время подтверждения платежа магазином | | public | [setConfirmation()](../classes/YooKassa-Model-Payment-Payment.md#method_setConfirmation) | | Устанавливает способ подтверждения платежа. | | public | [setCreatedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setCreatedAt) | | Устанавливает время создания заказа. | | public | [setDeal()](../classes/YooKassa-Model-Payment-Payment.md#method_setDeal) | | Устанавливает данные о сделке, в составе которой проходит платеж. | | public | [setDescription()](../classes/YooKassa-Model-Payment-Payment.md#method_setDescription) | | Устанавливает описание транзакции | | public | [setExpiresAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setExpiresAt) | | Устанавливает время до которого можно бесплатно отменить или подтвердить платеж. | | public | [setId()](../classes/YooKassa-Model-Payment-Payment.md#method_setId) | | Устанавливает идентификатор платежа. | | public | [setIncomeAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setIncomeAmount) | | Устанавливает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa | | public | [setMerchantCustomerId()](../classes/YooKassa-Model-Payment-Payment.md#method_setMerchantCustomerId) | | Устанавливает идентификатор покупателя в вашей системе. | | public | [setMetadata()](../classes/YooKassa-Model-Payment-Payment.md#method_setMetadata) | | Устанавливает метаданные платежа. | | public | [setPaid()](../classes/YooKassa-Model-Payment-Payment.md#method_setPaid) | | Устанавливает флаг оплаты заказа. | | public | [setPaymentMethod()](../classes/YooKassa-Model-Payment-Payment.md#method_setPaymentMethod) | | Устанавливает используемый способ проведения платежа. | | public | [setReceiptRegistration()](../classes/YooKassa-Model-Payment-Payment.md#method_setReceiptRegistration) | | Устанавливает состояние регистрации фискального чека | | public | [setRecipient()](../classes/YooKassa-Model-Payment-Payment.md#method_setRecipient) | | Устанавливает получателя платежа. | | public | [setRefundable()](../classes/YooKassa-Model-Payment-Payment.md#method_setRefundable) | | Устанавливает возможность провести возврат по API. | | public | [setRefundedAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setRefundedAmount) | | Устанавливает сумму возвращенных средств. | | public | [setStatus()](../classes/YooKassa-Model-Payment-Payment.md#method_setStatus) | | Устанавливает статус платежа | | public | [setTest()](../classes/YooKassa-Model-Payment-Payment.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [setTransfers()](../classes/YooKassa-Model-Payment-Payment.md#method_setTransfers) | | Устанавливает массив распределения денег между магазинами. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/CreateCaptureResponse.php](../../lib/Request/Payments/CreateCaptureResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) * [\YooKassa\Request\Payments\AbstractPaymentResponse](../classes/YooKassa-Request-Payments-AbstractPaymentResponse.md) * \YooKassa\Request\Payments\CreateCaptureResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Inherited from [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) Максимальная длина строки описания платежа ```php MAX_LENGTH_DESCRIPTION = 128 ``` ###### MAX_LENGTH_MERCHANT_CUSTOMER_ID Inherited from [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) Максимальная длина строки идентификатора покупателя в вашей системе ```php MAX_LENGTH_MERCHANT_CUSTOMER_ID = 200 ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма заказа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $authorization_details : \YooKassa\Model\Payment\AuthorizationDetailsInterface --- ***Description*** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $authorizationDetails : \YooKassa\Model\Payment\AuthorizationDetailsInterface --- ***Description*** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $cancellation_details : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене платежа **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $cancellationDetails : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене платежа **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $captured_at : \DateTime --- ***Description*** Время подтверждения платежа магазином **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $capturedAt : \DateTime --- ***Description*** Время подтверждения платежа магазином **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $confirmation : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation --- ***Description*** Способ подтверждения платежа **Type:** AbstractConfirmation **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $created_at : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $createdAt : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $deal : \YooKassa\Model\Deal\PaymentDealInfo --- ***Description*** Данные о сделке, в составе которой проходит платеж **Type:** PaymentDealInfo **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $description : string --- ***Description*** Описание транзакции **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $expires_at : \DateTime --- ***Description*** Время, до которого можно бесплатно отменить или подтвердить платеж **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $expiresAt : \DateTime --- ***Description*** Время, до которого можно бесплатно отменить или подтвердить платеж **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $id : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $income_amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма платежа, которую получит магазин **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $incomeAmount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма платежа, которую получит магазин **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $merchant_customer_id : string --- ***Description*** Идентификатор покупателя в вашей системе, например электронная почта или номер телефона **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $merchantCustomerId : string --- ***Description*** Идентификатор покупателя в вашей системе, например электронная почта или номер телефона **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные платежа указанные мерчантом **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $paid : bool --- ***Description*** Признак оплаты заказа **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $payment_method : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения платежа **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $paymentMethod : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения платежа **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $receipt_registration : string --- ***Description*** Состояние регистрации фискального чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $receiptRegistration : string --- ***Description*** Состояние регистрации фискального чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $recipient : \YooKassa\Model\Payment\RecipientInterface --- ***Description*** Получатель платежа **Type:** RecipientInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refundable : bool --- ***Description*** Возможность провести возврат по API **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refunded_amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возвращенных средств платежа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refundedAmount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возвращенных средств платежа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $status : string --- ***Description*** Текущее состояние платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $test : bool --- ***Description*** Признак тестовой операции **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $transfers : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Payment\TransferInterface[] --- ***Description*** Данные о распределении платежа между магазинами **Type:** TransferInterface[] **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_authorization_details : ?\YooKassa\Model\Payment\AuthorizationDetailsInterface --- **Summary** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_cancellation_details : ?\YooKassa\Model\CancellationDetailsInterface --- **Summary** Комментарий к статусу canceled: кто отменил платеж и по какой причине **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_captured_at : ?\DateTime --- **Type:** DateTime Время подтверждения платежа магазином **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_confirmation : ?\YooKassa\Model\Payment\Confirmation\AbstractConfirmation --- **Type:** AbstractConfirmation Способ подтверждения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_created_at : ?\DateTime --- **Type:** DateTime Время создания заказа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_deal : ?\YooKassa\Model\Deal\PaymentDealInfo --- **Type:** PaymentDealInfo Данные о сделке, в составе которой проходит платеж. Необходимо передавать, если вы проводите Безопасную сделку **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_description : ?string --- **Type:** ?string Описание платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_expires_at : ?\DateTime --- **Summary** Время, до которого можно бесплатно отменить или подтвердить платеж. В указанное время платеж в статусе `waiting_for_capture` будет автоматически отменен. **Type:** DateTime Время, до которого можно бесплатно отменить или подтвердить платеж **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_id : ?string --- **Type:** ?string Идентификатор платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_income_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_merchant_customer_id : ?string --- **Type:** ?string Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов. Присутствует, если вы хотите запомнить банковскую карту и отобразить ее при повторном платеже в виджете ЮKassa **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Type:** Metadata Метаданные платежа указанные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_paid : bool --- **Type:** bool Признак оплаты заказа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_payment_method : ?\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- **Type:** AbstractPaymentMethod Способ проведения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_receipt_registration : ?string --- **Type:** ?string Состояние регистрации фискального чека **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_recipient : ?\YooKassa\Model\Payment\RecipientInterface --- **Type:** RecipientInterface Получатель платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_refundable : bool --- **Type:** bool Возможность провести возврат по API **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_refunded_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface Сумма возвращенных средств платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_status : ?string --- **Type:** ?string Текущее состояние платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_test : bool --- **Summary** Признак тестовой операции. **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_transfers : ?\YooKassa\Common\ListObject --- **Type:** ListObject Данные о распределении платежа между магазинами **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма платежа #### public getAuthorizationDetails() : null|\YooKassa\Model\Payment\AuthorizationDetailsInterface ```php public getAuthorizationDetails() : null|\YooKassa\Model\Payment\AuthorizationDetailsInterface ``` **Summary** Возвращает данные об авторизации платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\Payment\AuthorizationDetailsInterface - Данные об авторизации платежа #### public getCancellationDetails() : null|\YooKassa\Model\CancellationDetailsInterface ```php public getCancellationDetails() : null|\YooKassa\Model\CancellationDetailsInterface ``` **Summary** Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\CancellationDetailsInterface - Комментарий к статусу canceled #### public getCapturedAt() : null|\DateTime ```php public getCapturedAt() : null|\DateTime ``` **Summary** Возвращает время подтверждения платежа магазином или null, если время не задано. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\DateTime - Время подтверждения платежа магазином #### public getConfirmation() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null ```php public getConfirmation() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null ``` **Summary** Возвращает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null - Способ подтверждения платежа #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \DateTime|null - Время создания заказа #### public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ``` **Summary** Возвращает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Deal\PaymentDealInfo|null - Данные о сделке, в составе которой проходит платеж #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - #### public getExpiresAt() : null|\DateTime ```php public getExpiresAt() : null|\DateTime ``` **Summary** Возвращает время до которого можно бесплатно отменить или подтвердить платеж, или null, если оно не задано. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\DateTime - Время, до которого можно бесплатно отменить или подтвердить платеж #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Идентификатор платежа #### public getIncomeAmount() : \YooKassa\Model\AmountInterface|null ```php public getIncomeAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма платежа, которую получит магазин #### public getMerchantCustomerId() : string|null ```php public getMerchantCustomerId() : string|null ``` **Summary** Возвращает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Идентификатор покупателя в вашей системе #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает метаданные платежа установленные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные платежа указанные мерчантом #### public getPaid() : bool ```php public getPaid() : bool ``` **Summary** Проверяет, был ли уже оплачен заказ. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Признак оплаты заказа, true если заказ оплачен, false если нет #### public getPaymentMethod() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null ```php public getPaymentMethod() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null ``` **Summary** Возвращает используемый способ проведения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null - Способ проведения платежа #### public getReceiptRegistration() : string|null ```php public getReceiptRegistration() : string|null ``` **Summary** Возвращает состояние регистрации фискального чека. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Состояние регистрации фискального чека #### public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ```php public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ``` **Summary** Возвращает получателя платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\Payment\RecipientInterface - Получатель платежа или null, если получатель не задан #### public getRefundable() : bool ```php public getRefundable() : bool ``` **Summary** Проверяет возможность провести возврат по API. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Возможность провести возврат по API, true если есть, false если нет #### public getRefundedAmount() : \YooKassa\Model\AmountInterface|null ```php public getRefundedAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму возвращенных средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма возвращенных средств платежа #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает состояние платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Текущее состояние платежа #### public getTest() : bool ```php public getTest() : bool ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Признак тестовой операции #### public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface ```php public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает массив распределения денег между магазинами. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface - Массив распределения денег #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма платежа | **Returns:** self - #### public setAuthorizationDetails() : self ```php public setAuthorizationDetails(\YooKassa\Model\Payment\AuthorizationDetailsInterface|array|null $authorization_details = null) : self ``` **Summary** Устанавливает данные об авторизации платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\AuthorizationDetailsInterface OR array OR null | authorization_details | Данные об авторизации платежа | **Returns:** self - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\CancellationDetailsInterface|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\CancellationDetailsInterface OR array OR null | cancellation_details | Комментарий к статусу canceled | **Returns:** self - #### public setCapturedAt() : self ```php public setCapturedAt(\DateTime|string|null $captured_at = null) : self ``` **Summary** Устанавливает время подтверждения платежа магазином **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | captured_at | Время подтверждения платежа магазином | **Returns:** self - #### public setConfirmation() : self ```php public setConfirmation(\YooKassa\Model\Payment\Confirmation\AbstractConfirmation|array|null $confirmation = null) : self ``` **Summary** Устанавливает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\Confirmation\AbstractConfirmation OR array OR null | confirmation | Способ подтверждения платежа | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания заказа | **Returns:** self - #### public setDeal() : self ```php public setDeal(null|array|\YooKassa\Model\Deal\PaymentDealInfo $deal = null) : self ``` **Summary** Устанавливает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\PaymentDealInfo | deal | Данные о сделке, в составе которой проходит платеж | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | | **Returns:** self - #### public setExpiresAt() : self ```php public setExpiresAt(\DateTime|string|null $expires_at = null) : self ``` **Summary** Устанавливает время до которого можно бесплатно отменить или подтвердить платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at | Время, до которого можно бесплатно отменить или подтвердить платеж | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор платежа | **Returns:** self - #### public setIncomeAmount() : self ```php public setIncomeAmount(\YooKassa\Model\AmountInterface|array|null $income_amount = null) : self ``` **Summary** Устанавливает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | income_amount | | **Returns:** self - #### public setMerchantCustomerId() : self ```php public setMerchantCustomerId(string|null $merchant_customer_id = null) : self ``` **Summary** Устанавливает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | merchant_customer_id | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает метаданные платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Метаданные платежа указанные мерчантом | **Returns:** self - #### public setPaid() : self ```php public setPaid(bool $paid) : self ``` **Summary** Устанавливает флаг оплаты заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | paid | Признак оплаты заказа | **Returns:** self - #### public setPaymentMethod() : self ```php public setPaymentMethod(\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|array|null $payment_method) : self ``` **Summary** Устанавливает используемый способ проведения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod OR array OR null | payment_method | Способ проведения платежа | **Returns:** self - #### public setReceiptRegistration() : self ```php public setReceiptRegistration(string|null $receipt_registration = null) : self ``` **Summary** Устанавливает состояние регистрации фискального чека **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | receipt_registration | Состояние регистрации фискального чека | **Returns:** self - #### public setRecipient() : self ```php public setRecipient(\YooKassa\Model\Payment\RecipientInterface|array|null $recipient = null) : self ``` **Summary** Устанавливает получателя платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\RecipientInterface OR array OR null | recipient | Объект с информацией о получателе платежа | **Returns:** self - #### public setRefundable() : self ```php public setRefundable(bool $refundable) : self ``` **Summary** Устанавливает возможность провести возврат по API. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | refundable | Возможность провести возврат по API | **Returns:** self - #### public setRefundedAmount() : self ```php public setRefundedAmount(\YooKassa\Model\AmountInterface|array|null $refunded_amount = null) : self ``` **Summary** Устанавливает сумму возвращенных средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | refunded_amount | Сумма возвращенных средств платежа | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус платежа | **Returns:** self - #### public setTest() : self ```php public setTest(bool $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | test | Признак тестовой операции | **Returns:** self - #### public setTransfers() : self ```php public setTransfers(\YooKassa\Common\ListObjectInterface|array|null $transfers = null) : self ``` **Summary** Устанавливает массив распределения денег между магазинами. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | transfers | Массив распределения денег | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md000064400000040667150364342670026012 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payout\PayoutCancellationDetailsReasonCode ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель PayoutCancellationDetailsReasonCode. **Description:** Возможные причины отмены выплаты. Возможные значения: - `insufficient_funds` - На балансе выплат не хватает денег для проведения выплаты - `fraud_suspected` - Выплата заблокирована из-за подозрения в мошенничестве - `one_time_limit_exceeded` - Превышен лимит на разовое зачисление - `periodic_limit_exceeded` - Превышен лимит выплат за период времени - `rejected_by_payee` - Эмитент отклонил выплату по неизвестным причинам - `general_decline` - Причина не детализирована - `issuer_unavailable` - Эквайер недоступен - `recipient_not_found` - Для выплат через СБП: получатель не найден - `recipient_check_failed` - Только для выплат с проверкой получателя. Получатель выплаты не прошел проверку - `identification_required` - Кошелек ЮMoney не идентифицирован. Пополнение анонимного кошелька запрещено --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [INSUFFICIENT_FUNDS](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md#constant_INSUFFICIENT_FUNDS) | | На балансе выплат не хватает денег для проведения выплаты. [Пополните баланс](https://yookassa.ru/docs/support/payouts#balance) и повторите запрос с новым ключом идемпотентности. | | public | [FRAUD_SUSPECTED](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md#constant_FRAUD_SUSPECTED) | | Выплата заблокирована из-за подозрения в мошенничестве. Следует обратиться к [инициатору отмены выплаты](https://yookassa.ru/developers/solutions-for-platforms/safe-deal/integration/payouts#declined-payouts-cancellation-details-party) за уточнением подробностей или выбрать другой способ получения выплаты или другое платежное средство (например, другую банковскую карту) | | public | [ONE_TIME_LIMIT_EXCEEDED](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md#constant_ONE_TIME_LIMIT_EXCEEDED) | | Превышен [лимит на разовое зачисление](https://yookassa.ru/developers/solutions-for-platforms/safe-deal/integration/payouts#specifics). Можно уменьшить размер выплаты, разбить сумму и сделать несколько выплат, выбрать другой способ получения выплат или другое платежное средство (например, другую банковскую карту) | | public | [PERIODIC_LIMIT_EXCEEDED](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md#constant_PERIODIC_LIMIT_EXCEEDED) | | Превышен [лимит выплат за период времени](https://yookassa.ru/developers/solutions-for-platforms/safe-deal/integration/payouts#specifics) (сутки, месяц). Следует выбрать другой способ получения выплаты или другое платежное средство (например, другую банковскую карту). | | public | [REJECTED_BY_PAYEE](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md#constant_REJECTED_BY_PAYEE) | | Эмитент отклонил выплату по неизвестным причинам. Пользователю следует обратиться к эмитенту за уточнением подробностей или выбрать другой способ получения выплаты или другое платежное средство (например, другую банковскую карту). | | public | [GENERAL_DECLINE](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md#constant_GENERAL_DECLINE) | | Причина не детализирована. Пользователю следует обратиться к [инициатору отмены выплаты](https://yookassa.ru/developers/solutions-for-platforms/safe-deal/integration/payouts#declined-payouts-cancellation-details-party) за уточнением подробностей | | public | [ISSUER_UNAVAILABLE](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md#constant_ISSUER_UNAVAILABLE) | | Эквайер недоступен. Следует выбрать другой способ получения выплаты или другое платежное средство (например, другую банковскую карту) или повторить запрос позже с новым ключом идемпотентности. | | public | [RECIPIENT_NOT_FOUND](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md#constant_RECIPIENT_NOT_FOUND) | | Для [выплат через СБП](https://yookassa.ru/developers/payouts/making-payouts/sbp): получатель не найден — в выбранном банке или платежном сервисе не найден счет, к которому привязан указанный номер телефона. Следует повторить запрос с новыми данными и новым ключом идемпотентности или выбрать другой способ получения выплаты. | | public | [RECIPIENT_CHECK_FAILED](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md#constant_RECIPIENT_CHECK_FAILED) | | Только для выплат с [проверкой получателя](https://yookassa.ru/developers/payouts/scenario-extensions/recipient-check). Получатель выплаты не прошел проверку: имя получателя не совпало с именем владельца счета, на который необходимо перевести деньги. [Что делать в этом случае](https://yookassa.ru/developers/payouts/scenario-extensions/recipient-check#process-results-canceled-recipient-check-failed) | | public | [IDENTIFICATION_REQUIRED](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md#constant_IDENTIFICATION_REQUIRED) | | Кошелек ЮMoney не идентифицирован. Пополнение анонимного кошелька запрещено. Пользователю необходимо [идентифицировать кошелек](https://yoomoney.ru/page?id=536136) | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsReasonCode.md#property_validValues) | | Возвращает список доступных значений | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payout/PayoutCancellationDetailsReasonCode.php](../../lib/Model/Payout/PayoutCancellationDetailsReasonCode.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payout\PayoutCancellationDetailsReasonCode * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### INSUFFICIENT_FUNDS На балансе выплат не хватает денег для проведения выплаты. [Пополните баланс](https://yookassa.ru/docs/support/payouts#balance) и повторите запрос с новым ключом идемпотентности. ```php INSUFFICIENT_FUNDS = 'insufficient_funds' ``` ###### FRAUD_SUSPECTED Выплата заблокирована из-за подозрения в мошенничестве. Следует обратиться к [инициатору отмены выплаты](https://yookassa.ru/developers/solutions-for-platforms/safe-deal/integration/payouts#declined-payouts-cancellation-details-party) за уточнением подробностей или выбрать другой способ получения выплаты или другое платежное средство (например, другую банковскую карту) ```php FRAUD_SUSPECTED = 'fraud_suspected' ``` ###### ONE_TIME_LIMIT_EXCEEDED Превышен [лимит на разовое зачисление](https://yookassa.ru/developers/solutions-for-platforms/safe-deal/integration/payouts#specifics). Можно уменьшить размер выплаты, разбить сумму и сделать несколько выплат, выбрать другой способ получения выплат или другое платежное средство (например, другую банковскую карту) ```php ONE_TIME_LIMIT_EXCEEDED = 'one_time_limit_exceeded' ``` ###### PERIODIC_LIMIT_EXCEEDED Превышен [лимит выплат за период времени](https://yookassa.ru/developers/solutions-for-platforms/safe-deal/integration/payouts#specifics) (сутки, месяц). Следует выбрать другой способ получения выплаты или другое платежное средство (например, другую банковскую карту). ```php PERIODIC_LIMIT_EXCEEDED = 'periodic_limit_exceeded' ``` ###### REJECTED_BY_PAYEE Эмитент отклонил выплату по неизвестным причинам. Пользователю следует обратиться к эмитенту за уточнением подробностей или выбрать другой способ получения выплаты или другое платежное средство (например, другую банковскую карту). ```php REJECTED_BY_PAYEE = 'rejected_by_payee' ``` ###### GENERAL_DECLINE Причина не детализирована. Пользователю следует обратиться к [инициатору отмены выплаты](https://yookassa.ru/developers/solutions-for-platforms/safe-deal/integration/payouts#declined-payouts-cancellation-details-party) за уточнением подробностей ```php GENERAL_DECLINE = 'general_decline' ``` ###### ISSUER_UNAVAILABLE Эквайер недоступен. Следует выбрать другой способ получения выплаты или другое платежное средство (например, другую банковскую карту) или повторить запрос позже с новым ключом идемпотентности. ```php ISSUER_UNAVAILABLE = 'issuer_unavailable' ``` ###### RECIPIENT_NOT_FOUND Для [выплат через СБП](https://yookassa.ru/developers/payouts/making-payouts/sbp): получатель не найден — в выбранном банке или платежном сервисе не найден счет, к которому привязан указанный номер телефона. Следует повторить запрос с новыми данными и новым ключом идемпотентности или выбрать другой способ получения выплаты. ```php RECIPIENT_NOT_FOUND = 'recipient_not_found' ``` ###### RECIPIENT_CHECK_FAILED Только для выплат с [проверкой получателя](https://yookassa.ru/developers/payouts/scenario-extensions/recipient-check). Получатель выплаты не прошел проверку: имя получателя не совпало с именем владельца счета, на который необходимо перевести деньги. [Что делать в этом случае](https://yookassa.ru/developers/payouts/scenario-extensions/recipient-check#process-results-canceled-recipient-check-failed) ```php RECIPIENT_CHECK_FAILED = 'recipient_check_failed' ``` ###### IDENTIFICATION_REQUIRED Кошелек ЮMoney не идентифицирован. Пополнение анонимного кошелька запрещено. Пользователю необходимо [идентифицировать кошелек](https://yoomoney.ru/page?id=536136) ```php IDENTIFICATION_REQUIRED = 'identification_required' ``` --- ## Properties #### protected $validValues : array --- **Summary** Возвращает список доступных значений **Type:** array Массив принимаемых enum'ом значений **Details:** ##### Tags | Tag | Version | Description | | --- | ------- | ----------- | | return | | | --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodYooMoney.md000064400000062230150364342670026116 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodYooMoney ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodYooMoney. **Description:** Оплата из кошелька ЮMoney. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$account_number](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodYooMoney.md#property_account_number) | | Номер кошелька в ЮMoney, с которого была произведена оплата | | public | [$accountNumber](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodYooMoney.md#property_accountNumber) | | Номер кошелька в ЮMoney, с которого была произведена оплата | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodYooMoney.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAccountNumber()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodYooMoney.md#method_getAccountNumber) | | Возвращает номер кошелька в ЮMoney, с которого была произведена оплата. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAccountNumber()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodYooMoney.md#method_setAccountNumber) | | Устанавливает номер кошелька в ЮMoney, с которого была произведена оплата. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodYooMoney.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodYooMoney.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodYooMoney * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $account_number : string --- ***Description*** Номер кошелька в ЮMoney, с которого была произведена оплата **Type:** string **Details:** #### public $accountNumber : string --- ***Description*** Номер кошелька в ЮMoney, с которого была произведена оплата **Type:** string **Details:** #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodYooMoney](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodYooMoney.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAccountNumber() : string|null ```php public getAccountNumber() : string|null ``` **Summary** Возвращает номер кошелька в ЮMoney, с которого была произведена оплата. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodYooMoney](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodYooMoney.md) **Returns:** string|null - Номер кошелька в ЮMoney #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAccountNumber() : self ```php public setAccountNumber(string|null $account_number) : self ``` **Summary** Устанавливает номер кошелька в ЮMoney, с которого была произведена оплата. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodYooMoney](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodYooMoney.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | account_number | Номер кошелька в ЮMoney | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md000064400000046206150364342670031661 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataYooMoney ### Namespace: [\YooKassa\Request\Payouts\PayoutDestinationData](../namespaces/yookassa-request-payouts-payoutdestinationdata.md) --- **Summary:** Класс, представляющий модель PayoutDestinationDataYooMoney. **Description:** Метод оплаты, при оплате через ЮMoney --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_ACCOUNT_NUMBER](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md#constant_MAX_LENGTH_ACCOUNT_NUMBER) | | | | public | [MIN_LENGTH_ACCOUNT_NUMBER](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md#constant_MIN_LENGTH_ACCOUNT_NUMBER) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$account_number](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md#property_account_number) | | Номер кошелька в ЮMoney, с которого была произведена оплата | | public | [$accountNumber](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md#property_accountNumber) | | Номер кошелька в ЮMoney, с которого была произведена оплата | | public | [$type](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md#property_type) | | Тип объекта | | public | [$type](../classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md#property_type) | | Тип метода оплаты | | public | [$type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property__type) | | Тип метода оплаты | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md#method___construct) | | Конструктор PayoutDestinationDataYooMoney. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAccountNumber()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md#method_getAccountNumber) | | Возвращает номер кошелька в ЮMoney, с которого была произведена оплата. | | public | [getType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAccountNumber()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md#method_setAccountNumber) | | Устанавливает номер кошелька в ЮMoney, с которого была произведена оплата. | | public | [setType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_setType) | | Устанавливает тип метода оплаты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payouts/PayoutDestinationData/PayoutDestinationDataYooMoney.php](../../lib/Request/Payouts/PayoutDestinationData/PayoutDestinationDataYooMoney.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) * [\YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData](../classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md) * \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataYooMoney * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_ACCOUNT_NUMBER ```php MAX_LENGTH_ACCOUNT_NUMBER = 33 : int ``` ###### MIN_LENGTH_ACCOUNT_NUMBER ```php MIN_LENGTH_ACCOUNT_NUMBER = 11 : int ``` --- ## Properties #### public $account_number : string --- ***Description*** Номер кошелька в ЮMoney, с которого была произведена оплата **Type:** string **Details:** #### public $accountNumber : string --- ***Description*** Номер кошелька в ЮMoney, с которого была произведена оплата **Type:** string **Details:** #### public $type : string --- ***Description*** Тип объекта **Type:** string **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData](../classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md) #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) #### protected $_type : ?string --- **Summary** Тип метода оплаты **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** Конструктор PayoutDestinationDataYooMoney. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataYooMoney](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAccountNumber() : string|null ```php public getAccountNumber() : string|null ``` **Summary** Возвращает номер кошелька в ЮMoney, с которого была произведена оплата. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataYooMoney](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md) **Returns:** string|null - Номер кошелька в ЮMoney #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAccountNumber() : self ```php public setAccountNumber(string|null $account_number = null) : self ``` **Summary** Устанавливает номер кошелька в ЮMoney, с которого была произведена оплата. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataYooMoney](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataYooMoney.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | account_number | Номер кошелька ЮMoney | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-ThreeDSecure.md000064400000033766150364342670021423 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\ThreeDSecure ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Класс, представляющий модель ThreeDSecure. **Description:** Данные о прохождении пользователем аутентификации по 3‑D Secure для подтверждения платежа. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$applied](../classes/YooKassa-Model-Payment-ThreeDSecure.md#property_applied) | | Отображение пользователю формы для прохождения аутентификации по 3‑D Secure. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getApplied()](../classes/YooKassa-Model-Payment-ThreeDSecure.md#method_getApplied) | | Возвращает applied. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setApplied()](../classes/YooKassa-Model-Payment-ThreeDSecure.md#method_setApplied) | | Устанавливает applied. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/ThreeDSecure.php](../../lib/Model/Payment/ThreeDSecure.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payment\ThreeDSecure * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $applied : bool --- ***Description*** Отображение пользователю формы для прохождения аутентификации по 3‑D Secure. **Type:** bool **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getApplied() : bool|null ```php public getApplied() : bool|null ``` **Summary** Возвращает applied. **Details:** * Inherited From: [\YooKassa\Model\Payment\ThreeDSecure](../classes/YooKassa-Model-Payment-ThreeDSecure.md) **Returns:** bool|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setApplied() : self ```php public setApplied(bool|array|null $applied = null) : self ``` **Summary** Устанавливает applied. **Details:** * Inherited From: [\YooKassa\Model\Payment\ThreeDSecure](../classes/YooKassa-Model-Payment-ThreeDSecure.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | applied | Отображение пользователю формы для прохождения аутентификации по 3‑D Secure. Возможные значения: * ~`true` — ЮKassa отобразила пользователю форму, чтобы он мог пройти аутентификацию по 3‑D Secure; * ~`false` — платеж проходил без аутентификации по 3‑D Secure. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-ReceiptsRequestSerializer.md000064400000004065150364342670025001 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Receipts\ReceiptsRequestSerializer ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Класс сериализатора объектов запросов к API для получения списка возвратов. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [serialize()](../classes/YooKassa-Request-Receipts-ReceiptsRequestSerializer.md#method_serialize) | | Сериализует объект запроса к API для дальнейшей его отправки. | --- ### Details * File: [lib/Request/Receipts/ReceiptsRequestSerializer.php](../../lib/Request/Receipts/ReceiptsRequestSerializer.php) * Package: Default * Class Hierarchy: * \YooKassa\Request\Receipts\ReceiptsRequestSerializer --- ## Methods #### public serialize() : array ```php public serialize(\YooKassa\Request\Receipts\ReceiptsRequestInterface $request) : array ``` **Summary** Сериализует объект запроса к API для дальнейшей его отправки. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequestSerializer](../classes/YooKassa-Request-Receipts-ReceiptsRequestSerializer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Receipts\ReceiptsRequestInterface | request | Сериализуемый объект | **Returns:** array - Массив с информацией, отправляемый в дальнейшем в API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payouts-SbpBanksResponse.md000064400000045272150364342670022735 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payouts\SbpBanksResponse ### Namespace: [\YooKassa\Request\Payouts](../namespaces/yookassa-request-payouts.md) --- **Summary:** Класс, представляющий модель SbpBanksResponse. **Description:** Список участников СБП, отсортированный по идентификатору участника в порядке убывания (desc). --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$items](../classes/YooKassa-Request-Payouts-SbpBanksResponse.md#property_items) | | Массив всех участников СБП. | | public | [$nextCursor](../classes/YooKassa-Request-AbstractListResponse.md#property_nextCursor) | | Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. | | public | [$type](../classes/YooKassa-Request-AbstractListResponse.md#property_type) | | Формат выдачи результатов запроса. Возможное значение: `list` (список). | | protected | [$_items](../classes/YooKassa-Request-Payouts-SbpBanksResponse.md#property__items) | | | | protected | [$_next_cursor](../classes/YooKassa-Request-AbstractListResponse.md#property__next_cursor) | | Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. | | protected | [$_type](../classes/YooKassa-Request-AbstractListResponse.md#property__type) | | Формат выдачи результатов запроса. Возможное значение: `list` (список). | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getItems()](../classes/YooKassa-Request-Payouts-SbpBanksResponse.md#method_getItems) | | Возвращает всех участников СБП. | | public | [getNextCursor()](../classes/YooKassa-Request-AbstractListResponse.md#method_getNextCursor) | | Возвращает токен следующей страницы, если он задан, или null. | | public | [getType()](../classes/YooKassa-Request-AbstractListResponse.md#method_getType) | | Возвращает формат выдачи результатов запроса. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasNextCursor()](../classes/YooKassa-Request-AbstractListResponse.md#method_hasNextCursor) | | Проверяет, имеется ли в ответе токен следующей страницы. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payouts/SbpBanksResponse.php](../../lib/Request/Payouts/SbpBanksResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) * \YooKassa\Request\Payouts\SbpBanksResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $items : \YooKassa\Model\Payout\SbpParticipantBank[]|\YooKassa\Common\ListObjectInterface|null --- ***Description*** Массив всех участников СБП. **Type:** ListObjectInterface|null **Details:** #### public $nextCursor : string --- ***Description*** Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### public $type : string --- ***Description*** Формат выдачи результатов запроса. Возможное значение: `list` (список). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### protected $_items : ?\YooKassa\Common\ListObject --- **Type:** ListObject Массив всех участников СБП **Details:** #### protected $_next_cursor : ?string --- **Summary** Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### protected $_type : string --- **Summary** Формат выдачи результатов запроса. Возможное значение: `list` (список). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getItems() : \YooKassa\Model\Payout\SbpParticipantBank[]|\YooKassa\Common\ListObjectInterface ```php public getItems() : \YooKassa\Model\Payout\SbpParticipantBank[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает всех участников СБП. **Details:** * Inherited From: [\YooKassa\Request\Payouts\SbpBanksResponse](../classes/YooKassa-Request-Payouts-SbpBanksResponse.md) **Returns:** \YooKassa\Model\Payout\SbpParticipantBank[]|\YooKassa\Common\ListObjectInterface - Список всех участников СБП #### public getNextCursor() : null|string ```php public getNextCursor() : null|string ``` **Summary** Возвращает токен следующей страницы, если он задан, или null. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** null|string - Токен следующей страницы #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает формат выдачи результатов запроса. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasNextCursor() : bool ```php public hasNextCursor() : bool ``` **Summary** Проверяет, имеется ли в ответе токен следующей страницы. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** bool - True если токен следующей страницы есть, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-UnauthorizedException.md000064400000011247150364342670024323 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\UnauthorizedException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- **Summary:** [Basic Auth] Неверный идентификатор вашего аккаунта в ЮKassa или секретный ключ (имя пользователя и пароль при аутентификации). **Description:** [OAuth 2.0] Невалидный OAuth-токен: он некорректный, устарел или его отозвали. Запросите токен заново. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [HTTP_CODE](../classes/YooKassa-Common-Exceptions-UnauthorizedException.md#constant_HTTP_CODE) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$retryAfter](../classes/YooKassa-Common-Exceptions-UnauthorizedException.md#property_retryAfter) | | | | public | [$type](../classes/YooKassa-Common-Exceptions-UnauthorizedException.md#property_type) | | | | protected | [$responseBody](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseBody) | | | | protected | [$responseHeaders](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseHeaders) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-UnauthorizedException.md#method___construct) | | Constructor. | | public | [getResponseBody()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseBody) | | | | public | [getResponseHeaders()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseHeaders) | | | --- ### Details * File: [lib/Common/Exceptions/UnauthorizedException.php](../../lib/Common/Exceptions/UnauthorizedException.php) * Package: Default * Class Hierarchy: * [\Exception](\Exception) * [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) * \YooKassa\Common\Exceptions\UnauthorizedException --- ## Constants ###### HTTP_CODE ```php HTTP_CODE = 401 ``` --- ## Properties #### public $retryAfter : mixed --- **Type:** mixed **Details:** #### public $type : mixed --- **Type:** mixed **Details:** #### protected $responseBody : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) #### protected $responseHeaders : array --- **Type:** array **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array $responseHeaders = [], ?string $responseBody = '') : mixed ``` **Summary** Constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\UnauthorizedException](../classes/YooKassa-Common-Exceptions-UnauthorizedException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | responseHeaders | HTTP header | | ?string | responseBody | HTTP body | **Returns:** mixed - #### public getResponseBody() : ?string ```php public getResponseBody() : ?string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** ?string - #### public getResponseHeaders() : string[] ```php public getResponseHeaders() : string[] ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** string[] - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataType.md000064400000012216150364342670026156 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataType ### Namespace: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank](../namespaces/yookassa-model-payment-paymentmethod-b2b-sberbank.md) --- **Summary:** Класс, представляющий модель CalculatedVatData. **Description:** Способ расчёта НДС. Возможные значения: - calculated - Сумма НДС включена в сумму платежа - mixed - Разные ставки НДС для разных товаров - untaxed - Сумма платежа НДС не облагается --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [CALCULATED](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataType.md#constant_CALCULATED) | | Сумма НДС включена в сумму платежа | | public | [MIXED](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataType.md#constant_MIXED) | | Разные ставки НДС для разных товаров | | public | [UNTAXED](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataType.md#constant_UNTAXED) | | Сумма платежа НДС не облагается | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataType.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payment/PaymentMethod/B2b/Sberbank/VatDataType.php](../../lib/Model/Payment/PaymentMethod/B2b/Sberbank/VatDataType.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataType * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### CALCULATED Сумма НДС включена в сумму платежа ```php CALCULATED = 'calculated' ``` ###### MIXED Разные ставки НДС для разных товаров ```php MIXED = 'mixed' ``` ###### UNTAXED Сумма платежа НДС не облагается ```php UNTAXED = 'untaxed' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-ReceiptsResponse.md000064400000045246150364342670023123 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Receipts\ReceiptsResponse ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Класс для работы со списком чеков. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$items](../classes/YooKassa-Request-Receipts-ReceiptsResponse.md#property_items) | | Список чеков. Чеки отсортированы по времени создания в порядке убывания (desc) | | public | [$nextCursor](../classes/YooKassa-Request-AbstractListResponse.md#property_nextCursor) | | Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. | | public | [$type](../classes/YooKassa-Request-AbstractListResponse.md#property_type) | | Формат выдачи результатов запроса. Возможное значение: `list` (список). | | protected | [$_items](../classes/YooKassa-Request-Receipts-ReceiptsResponse.md#property__items) | | Список чеков. | | protected | [$_next_cursor](../classes/YooKassa-Request-AbstractListResponse.md#property__next_cursor) | | Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. | | protected | [$_type](../classes/YooKassa-Request-AbstractListResponse.md#property__type) | | Формат выдачи результатов запроса. Возможное значение: `list` (список). | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Request-Receipts-ReceiptsResponse.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getItems()](../classes/YooKassa-Request-Receipts-ReceiptsResponse.md#method_getItems) | | Возвращает список чеков. | | public | [getNextCursor()](../classes/YooKassa-Request-AbstractListResponse.md#method_getNextCursor) | | Возвращает токен следующей страницы, если он задан, или null. | | public | [getType()](../classes/YooKassa-Request-AbstractListResponse.md#method_getType) | | Возвращает формат выдачи результатов запроса. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasNextCursor()](../classes/YooKassa-Request-AbstractListResponse.md#method_hasNextCursor) | | Проверяет, имеется ли в ответе токен следующей страницы. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Receipts/ReceiptsResponse.php](../../lib/Request/Receipts/ReceiptsResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) * \YooKassa\Request\Receipts\ReceiptsResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $items : \YooKassa\Request\Receipts\AbstractReceiptResponse[]|\YooKassa\Common\ListObjectInterface|null --- ***Description*** Список чеков. Чеки отсортированы по времени создания в порядке убывания (desc) **Type:** ListObjectInterface|null **Details:** #### public $nextCursor : string --- ***Description*** Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### public $type : string --- ***Description*** Формат выдачи результатов запроса. Возможное значение: `list` (список). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### protected $_items : ?\YooKassa\Common\ListObject --- **Summary** Список чеков. **Type:** ListObject Список чеков **Details:** #### protected $_next_cursor : ?string --- **Summary** Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### protected $_type : string --- **Summary** Формат выдачи результатов запроса. Возможное значение: `list` (список). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(iterable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsResponse](../classes/YooKassa-Request-Receipts-ReceiptsResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable | sourceArray | | **Returns:** void - #### public getItems() : \YooKassa\Request\Receipts\AbstractReceiptResponse[]|\YooKassa\Common\ListObjectInterface ```php public getItems() : \YooKassa\Request\Receipts\AbstractReceiptResponse[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список чеков. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsResponse](../classes/YooKassa-Request-Receipts-ReceiptsResponse.md) **Returns:** \YooKassa\Request\Receipts\AbstractReceiptResponse[]|\YooKassa\Common\ListObjectInterface - Список чеков #### public getNextCursor() : null|string ```php public getNextCursor() : null|string ``` **Summary** Возвращает токен следующей страницы, если он задан, или null. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** null|string - Токен следующей страницы #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает формат выдачи результатов запроса. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasNextCursor() : bool ```php public hasNextCursor() : bool ``` **Summary** Проверяет, имеется ли в ответе токен следующей страницы. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** bool - True если токен следующей страницы есть, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-CreateCaptureRequestBuilder.md000064400000051553150364342670025255 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\CreateCaptureRequestBuilder ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель CreateCaptureRequestBuilder. **Description:** Класс билдера объекта запроса подтверждения платежа, передаваемого в методы клиента API. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$amount](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#property_amount) | | Сумма | | protected | [$currentObject](../classes/YooKassa-Request-Payments-CreateCaptureRequestBuilder.md#property_currentObject) | | Собираемый объект запроса. | | protected | [$receipt](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#property_receipt) | | Объект с информацией о чеке | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. | | public | [addReceiptItem()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_addReceiptItem) | | Добавляет в чек товар | | public | [addReceiptShipping()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_addReceiptShipping) | | Добавляет в чек доставку товара. | | public | [addTransfer()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_addTransfer) | | Добавляет трансфер. | | public | [build()](../classes/YooKassa-Request-Payments-CreateCaptureRequestBuilder.md#method_build) | | Осуществляет сборку объекта запроса к API. | | public | [setAirline()](../classes/YooKassa-Request-Payments-CreateCaptureRequestBuilder.md#method_setAirline) | | Устанавливает информацию об авиабилетах | | public | [setAmount()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setAmount) | | Устанавливает сумму. | | public | [setCurrency()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setCurrency) | | Устанавливает валюту в которой будет происходить подтверждение оплаты заказа. | | public | [setDeal()](../classes/YooKassa-Request-Payments-CreateCaptureRequestBuilder.md#method_setDeal) | | Устанавливает сделку. | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива. | | public | [setReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceipt) | | Устанавливает чек. | | public | [setReceiptEmail()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceiptEmail) | | Устанавливает адрес электронной почты получателя чека. | | public | [setReceiptItems()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceiptItems) | | Устанавливает список товаров для создания чека. | | public | [setReceiptPhone()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceiptPhone) | | Устанавливает телефон получателя чека. | | public | [setTaxSystemCode()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setTaxSystemCode) | | Устанавливает код системы налогообложения. | | public | [setTransfers()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setTransfers) | | Устанавливает трансферы. | | protected | [initCurrentObject()](../classes/YooKassa-Request-Payments-CreateCaptureRequestBuilder.md#method_initCurrentObject) | | Инициализирует пустой запрос | --- ### Details * File: [lib/Request/Payments/CreateCaptureRequestBuilder.php](../../lib/Request/Payments/CreateCaptureRequestBuilder.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) * [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) * \YooKassa\Request\Payments\CreateCaptureRequestBuilder * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### protected $amount : ?\YooKassa\Model\MonetaryAmount --- **Summary** Сумма **Type:** MonetaryAmount **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) #### protected $currentObject : ?\YooKassa\Common\AbstractRequestInterface --- **Summary** Собираемый объект запроса. **Type:** AbstractRequestInterface **Details:** #### protected $receipt : ?\YooKassa\Model\Receipt\Receipt --- **Summary** Объект с информацией о чеке **Type:** Receipt **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public addReceiptItem() : self ```php public addReceiptItem(string $title, string $price, float $quantity, int $vatCode, null|string $paymentMode = null, null|string $paymentSubject = null, null|mixed $productCode = null, null|mixed $countryOfOriginCode = null, null|mixed $customsDeclarationNumber = null, null|mixed $excise = null) : self ``` **Summary** Добавляет в чек товар **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) * See Also: * [](\YooKassa\Request\Payments\PaymentSubject) * [](\YooKassa\Request\Payments\PaymentMode) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | title | Название или описание товара | | string | price | Цена товара в валюте, заданной в заказе | | float | quantity | Количество товара | | int | vatCode | Ставка НДС | | null OR string | paymentMode | значение перечисления PaymentMode | | null OR string | paymentSubject | значение перечисления PaymentSubject | | null OR mixed | productCode | | | null OR mixed | countryOfOriginCode | | | null OR mixed | customsDeclarationNumber | | | null OR mixed | excise | | **Returns:** self - Инстанс билдера запросов #### public addReceiptShipping() : self ```php public addReceiptShipping(string $title, string $price, int $vatCode, null|string $paymentMode = null, null|string $paymentSubject = null) : self ``` **Summary** Добавляет в чек доставку товара. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) * See Also: * [](\YooKassa\Request\Payments\PaymentSubject) * [](\YooKassa\Request\Payments\PaymentMode) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | title | Название доставки в чеке | | string | price | Стоимость доставки | | int | vatCode | Ставка НДС | | null OR string | paymentMode | значение перечисления PaymentMode | | null OR string | paymentSubject | значение перечисления PaymentSubject | **Returns:** self - Инстанс билдера запросов #### public addTransfer() : self ```php public addTransfer(array|\YooKassa\Request\Payments\TransferDataInterface $value) : self ``` **Summary** Добавляет трансфер. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Payments\TransferDataInterface | value | Трансфер | **Returns:** self - Инстанс билдера запросов #### public build() : \YooKassa\Request\Payments\CreateCaptureRequest|\YooKassa\Common\AbstractRequestInterface ```php public build(null|array $options = null) : \YooKassa\Request\Payments\CreateCaptureRequest|\YooKassa\Common\AbstractRequestInterface ``` **Summary** Осуществляет сборку объекта запроса к API. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestBuilder](../classes/YooKassa-Request-Payments-CreateCaptureRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array | options | Массив дополнительных настроек объекта | **Returns:** \YooKassa\Request\Payments\CreateCaptureRequest|\YooKassa\Common\AbstractRequestInterface - Инстанс объекта запроса к API #### public setAirline() : \YooKassa\Request\Payments\CreateCaptureRequestBuilder ```php public setAirline(\YooKassa\Request\Payments\AirlineInterface|array|null $value) : \YooKassa\Request\Payments\CreateCaptureRequestBuilder ``` **Summary** Устанавливает информацию об авиабилетах **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestBuilder](../classes/YooKassa-Request-Payments-CreateCaptureRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Payments\AirlineInterface OR array OR null | value | Объект данных длинной записи или ассоциативный массив с данными | **Returns:** \YooKassa\Request\Payments\CreateCaptureRequestBuilder - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|\YooKassa\Request\Payments\numeric $value, string|null $currency = null) : self ``` **Summary** Устанавливает сумму. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR \YooKassa\Request\Payments\numeric | value | Сумма оплаты | | string OR null | currency | Валюта | **Returns:** self - Инстанс билдера запросов #### public setCurrency() : self ```php public setCurrency(string $value) : self ``` **Summary** Устанавливает валюту в которой будет происходить подтверждение оплаты заказа. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Валюта в которой подтверждается оплата | **Returns:** self - Инстанс билдера запросов #### public setDeal() : \YooKassa\Request\Payments\CreateCaptureRequestBuilder ```php public setDeal(null|array|\YooKassa\Model\Deal\CaptureDealData $value) : \YooKassa\Request\Payments\CreateCaptureRequestBuilder ``` **Summary** Устанавливает сделку. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestBuilder](../classes/YooKassa-Request-Payments-CreateCaptureRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\CaptureDealData | value | Данные о сделке, в составе подтверждения оплаты | **Returns:** \YooKassa\Request\Payments\CreateCaptureRequestBuilder - Инстанс билдера запросов #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(iterable|null $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable OR null | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### public setReceipt() : self ```php public setReceipt(array|\YooKassa\Model\Receipt\ReceiptInterface $value) : self ``` **Summary** Устанавливает чек. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\ReceiptInterface | value | Инстанс чека или ассоциативный массив с данными чека | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если было передано значение невалидного типа | **Returns:** self - Инстанс билдера запросов #### public setReceiptEmail() : self ```php public setReceiptEmail(string|null $value) : self ``` **Summary** Устанавливает адрес электронной почты получателя чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Email получателя чека | **Returns:** self - Инстанс билдера запросов #### public setReceiptItems() : self ```php public setReceiptItems(array $value = []) : self ``` **Summary** Устанавливает список товаров для создания чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | value | Массив товаров в заказе | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если хотя бы один из товаров имеет неверную структуру | **Returns:** self - Инстанс билдера запросов #### public setReceiptPhone() : self ```php public setReceiptPhone(string|null $value) : self ``` **Summary** Устанавливает телефон получателя чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Телефон получателя чека | **Returns:** self - Инстанс билдера запросов #### public setTaxSystemCode() : self ```php public setTaxSystemCode(int|null $value) : self ``` **Summary** Устанавливает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | value | Код системы налогообложения. Число 1-6. | **Returns:** self - Инстанс билдера запросов #### public setTransfers() : self ```php public setTransfers(array|\YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface $value) : self ``` **Summary** Устанавливает трансферы. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Payments\TransferDataInterface[] OR \YooKassa\Common\ListObjectInterface | value | Массив трансферов | **Returns:** self - Инстанс билдера запросов #### protected initCurrentObject() : \YooKassa\Common\AbstractRequestInterface|null ```php protected initCurrentObject() : \YooKassa\Common\AbstractRequestInterface|null ``` **Summary** Инициализирует пустой запрос **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestBuilder](../classes/YooKassa-Request-Payments-CreateCaptureRequestBuilder.md) **Returns:** \YooKassa\Common\AbstractRequestInterface|null - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentsRequestInterface.md000064400000077307150364342670024645 0ustar00# [YooKassa API SDK](../home.md) # Interface: PaymentsRequestInterface ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Interface PaymentsRequestInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getCapturedAtGt()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_getCapturedAtGt) | | Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCapturedAtGte()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_getCapturedAtGte) | | Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCapturedAtLt()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_getCapturedAtLt) | | Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCapturedAtLte()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_getCapturedAtLte) | | Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCreatedAtGt()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_getCreatedAtGt) | | Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCreatedAtGte()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_getCreatedAtGte) | | Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCreatedAtLt()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_getCreatedAtLt) | | Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCreatedAtLte()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_getCreatedAtLte) | | Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. | | public | [getCursor()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_getCursor) | | Возвращает страницу выдачи результатов или null, если она до этого не была установлена. | | public | [getLimit()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_getLimit) | | Возвращает ограничение количества объектов платежа или null, если оно до этого не было установлено. | | public | [getPaymentMethod()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_getPaymentMethod) | | Возвращает код способа оплаты выбираемых платежей или null, если он до этого не был установлен. | | public | [getStatus()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_getStatus) | | Возвращает статус выбираемых платежей или null, если он до этого не был установлен. | | public | [hasCapturedAtGt()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_hasCapturedAtGt) | | Проверяет, была ли установлена дата создания от которой выбираются платежи. | | public | [hasCapturedAtGte()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_hasCapturedAtGte) | | Проверяет, была ли установлена дата создания от которой выбираются платежи. | | public | [hasCapturedAtLt()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_hasCapturedAtLt) | | Проверяет, была ли установлена дата создания до которой выбираются платежи. | | public | [hasCapturedAtLte()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_hasCapturedAtLte) | | Проверяет, была ли установлена дата создания до которой выбираются платежи. | | public | [hasCreatedAtGt()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_hasCreatedAtGt) | | Проверяет, была ли установлена дата создания от которой выбираются платежи. | | public | [hasCreatedAtGte()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_hasCreatedAtGte) | | Проверяет, была ли установлена дата создания от которой выбираются платежи. | | public | [hasCreatedAtLt()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_hasCreatedAtLt) | | Проверяет, была ли установлена дата создания до которой выбираются платежи. | | public | [hasCreatedAtLte()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_hasCreatedAtLte) | | Проверяет, была ли установлена дата создания до которой выбираются платежи. | | public | [hasCursor()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_hasCursor) | | Проверяет, была ли установлена страница выдачи результатов. | | public | [hasLimit()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_hasLimit) | | Проверяет, было ли установлено ограничение количества объектов платежа. | | public | [hasPaymentMethod()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_hasPaymentMethod) | | Проверяет, был ли установлен код способа оплаты выбираемых платежей. | | public | [hasStatus()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_hasStatus) | | Проверяет, был ли установлен статус выбираемых платежей. | | public | [setCapturedAtGt()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_setCapturedAtGt) | | Устанавливает дату создания от которой выбираются платежи. | | public | [setCapturedAtGte()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_setCapturedAtGte) | | Устанавливает дату создания от которой выбираются платежи. | | public | [setCapturedAtLt()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_setCapturedAtLt) | | Устанавливает дату создания до которой выбираются платежи. | | public | [setCapturedAtLte()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_setCapturedAtLte) | | Устанавливает дату создания до которой выбираются платежи. | | public | [setCreatedAtGt()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_setCreatedAtGt) | | Устанавливает дату создания от которой выбираются платежи. | | public | [setCreatedAtGte()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_setCreatedAtGte) | | Устанавливает дату создания от которой выбираются платежи. | | public | [setCreatedAtLt()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_setCreatedAtLt) | | Устанавливает дату создания до которой выбираются платежи. | | public | [setCreatedAtLte()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_setCreatedAtLte) | | Устанавливает дату создания до которой выбираются платежи. | | public | [setCursor()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_setCursor) | | Устанавливает страницу выдачи результатов. | | public | [setLimit()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_setLimit) | | Устанавливает ограничение количества объектов платежа. | | public | [setPaymentMethod()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_setPaymentMethod) | | Устанавливает код способа оплаты выбираемых платежей. | | public | [setStatus()](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md#method_setStatus) | | Устанавливает статус выбираемых платежей. | --- ### Details * File: [lib/Request/Payments/PaymentsRequestInterface.php](../../lib/Request/Payments/PaymentsRequestInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Страница выдачи результатов, которую необходимо отобразить | | property | | Время создания, от (включительно) | | property | | Время создания, от (не включая) | | property | | Время создания, до (включительно) | | property | | Время создания, до (не включая) | | property | | Время подтверждения, от (включительно) | | property | | Время подтверждения, от (не включая) | | property | | Время подтверждения, до (включительно) | | property | | Время подтверждения, до (не включая) | | property | | Ограничение количества объектов платежа, отображаемых на одной странице выдачи | | property | | Идентификатор шлюза. | | property | | Статус платежа | --- ## Methods #### public getCursor() : null|string ```php public getCursor() : null|string ``` **Summary** Возвращает страницу выдачи результатов или null, если она до этого не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** null|string - Страница выдачи результатов #### public hasCursor() : bool ```php public hasCursor() : bool ``` **Summary** Проверяет, была ли установлена страница выдачи результатов. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** bool - True если страница выдачи результатов была установлена, false если нет #### public setCursor() : self ```php public setCursor(string $cursor) : self ``` **Summary** Устанавливает страницу выдачи результатов. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | cursor | Страница | **Returns:** self - #### public getLimit() : null|int ```php public getLimit() : null|int ``` **Summary** Возвращает ограничение количества объектов платежа или null, если оно до этого не было установлено. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** null|int - Ограничение количества объектов платежа #### public hasLimit() : bool ```php public hasLimit() : bool ``` **Summary** Проверяет, было ли установлено ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** bool - True если ограничение количества объектов платежа было установлено, false если нет #### public setLimit() : self ```php public setLimit(int $limit) : self ``` **Summary** Устанавливает ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | limit | Количества объектов платежа на странице | **Returns:** self - #### public getCreatedAtGte() : null|\DateTime ```php public getCreatedAtGte() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** null|\DateTime - Время создания, от (включительно) #### public hasCreatedAtGte() : bool ```php public hasCreatedAtGte() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setCreatedAtGte() : self ```php public setCreatedAtGte(\DateTime|string|null $_created_at_gte) : self ``` **Summary** Устанавливает дату создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | _created_at_gte | Дата | **Returns:** self - #### public getCreatedAtGt() : null|\DateTime ```php public getCreatedAtGt() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** null|\DateTime - Время создания, от (не включая) #### public hasCreatedAtGt() : bool ```php public hasCreatedAtGt() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setCreatedAtGt() : self ```php public setCreatedAtGt(\DateTime|string|null $created_at_gt) : self ``` **Summary** Устанавливает дату создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at_gt | Дата создания | **Returns:** self - #### public getCreatedAtLte() : null|\DateTime ```php public getCreatedAtLte() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** null|\DateTime - Время создания, до (включительно) #### public hasCreatedAtLte() : bool ```php public hasCreatedAtLte() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setCreatedAtLte() : self ```php public setCreatedAtLte(\DateTime|string|null $created_at_lte) : self ``` **Summary** Устанавливает дату создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at_lte | Дата | **Returns:** self - #### public getCreatedAtLt() : null|\DateTime ```php public getCreatedAtLt() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** null|\DateTime - Время создания, до (не включая) #### public hasCreatedAtLt() : bool ```php public hasCreatedAtLt() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setCreatedAtLt() : self ```php public setCreatedAtLt(\DateTime|string|null $created_at_lt) : self ``` **Summary** Устанавливает дату создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at_lt | Дата | **Returns:** self - #### public getCapturedAtGte() : null|\DateTime ```php public getCapturedAtGte() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** null|\DateTime - Время создания, от (включительно) #### public hasCapturedAtGte() : bool ```php public hasCapturedAtGte() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setCapturedAtGte() : self ```php public setCapturedAtGte(\DateTime|string|null $captured_at_gte) : self ``` **Summary** Устанавливает дату создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | captured_at_gte | Дата | **Returns:** self - #### public getCapturedAtGt() : null|\DateTime ```php public getCapturedAtGt() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** null|\DateTime - Время создания, от (не включая) #### public hasCapturedAtGt() : bool ```php public hasCapturedAtGt() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setCapturedAtGt() : self ```php public setCapturedAtGt(\DateTime|string|null $captured_at_gt) : self ``` **Summary** Устанавливает дату создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | captured_at_gt | Дата | **Returns:** self - #### public getCapturedAtLte() : null|\DateTime ```php public getCapturedAtLte() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** null|\DateTime - Время создания, до (включительно) #### public hasCapturedAtLte() : bool ```php public hasCapturedAtLte() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setCapturedAtLte() : self ```php public setCapturedAtLte(\DateTime|string|null $captured_at_lte) : self ``` **Summary** Устанавливает дату создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | captured_at_lte | Дата | **Returns:** self - #### public getCapturedAtLt() : null|\DateTime ```php public getCapturedAtLt() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены платежи или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** null|\DateTime - Время создания, до (не включая) #### public hasCapturedAtLt() : bool ```php public hasCapturedAtLt() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public setCapturedAtLt() : self ```php public setCapturedAtLt(\DateTime|string|null $captured_at_lt) : self ``` **Summary** Устанавливает дату создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | captured_at_lt | Дата | **Returns:** self - #### public getStatus() : null|string ```php public getStatus() : null|string ``` **Summary** Возвращает статус выбираемых платежей или null, если он до этого не был установлен. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** null|string - Статус выбираемых платежей #### public hasStatus() : bool ```php public hasStatus() : bool ``` **Summary** Проверяет, был ли установлен статус выбираемых платежей. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** bool - True если статус был установлен, false если нет #### public setStatus() : self ```php public setStatus(string $status) : self ``` **Summary** Устанавливает статус выбираемых платежей. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | status | Статус платежей | **Returns:** self - #### public getPaymentMethod() : null|string ```php public getPaymentMethod() : null|string ``` **Summary** Возвращает код способа оплаты выбираемых платежей или null, если он до этого не был установлен. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** null|string - Код способа оплаты выбираемых платежей #### public hasPaymentMethod() : bool ```php public hasPaymentMethod() : bool ``` **Summary** Проверяет, был ли установлен код способа оплаты выбираемых платежей. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) **Returns:** bool - True если код способа оплаты был установлен, false если нет #### public setPaymentMethod() : self ```php public setPaymentMethod(string $payment_method) : self ``` **Summary** Устанавливает код способа оплаты выбираемых платежей. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestInterface](../classes/YooKassa-Request-Payments-PaymentsRequestInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | payment_method | Код способа оплаты | **Returns:** self - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodCash.md000064400000054647150364342670025233 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodCash ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodCash. **Description:** Оплата наличными в терминалах РФ или СНГ. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodCash.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodCash.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodCash.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodCash * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodCash](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodCash.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-ForbiddenException.md000064400000010574150364342670023540 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\ForbiddenException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- **Summary:** Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [HTTP_CODE](../classes/YooKassa-Common-Exceptions-ForbiddenException.md#constant_HTTP_CODE) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$retryAfter](../classes/YooKassa-Common-Exceptions-ForbiddenException.md#property_retryAfter) | | | | public | [$type](../classes/YooKassa-Common-Exceptions-ForbiddenException.md#property_type) | | | | protected | [$responseBody](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseBody) | | | | protected | [$responseHeaders](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseHeaders) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-ForbiddenException.md#method___construct) | | Constructor. | | public | [getResponseBody()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseBody) | | | | public | [getResponseHeaders()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseHeaders) | | | --- ### Details * File: [lib/Common/Exceptions/ForbiddenException.php](../../lib/Common/Exceptions/ForbiddenException.php) * Package: Default * Class Hierarchy: * [\Exception](\Exception) * [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) * \YooKassa\Common\Exceptions\ForbiddenException --- ## Constants ###### HTTP_CODE ```php HTTP_CODE = 403 ``` --- ## Properties #### public $retryAfter : mixed --- **Type:** mixed **Details:** #### public $type : mixed --- **Type:** mixed **Details:** #### protected $responseBody : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) #### protected $responseHeaders : array --- **Type:** array **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) --- ## Methods #### public __construct() : mixed ```php public __construct(mixed $responseHeaders = [], mixed $responseBody = '') : mixed ``` **Summary** Constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ForbiddenException](../classes/YooKassa-Common-Exceptions-ForbiddenException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | responseHeaders | HTTP header | | mixed | responseBody | HTTP body | **Returns:** mixed - #### public getResponseBody() : ?string ```php public getResponseBody() : ?string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** ?string - #### public getResponseHeaders() : string[] ```php public getResponseHeaders() : string[] ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** string[] - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-MarkQuantity.md000064400000040451150364342670021475 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\MarkQuantity ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Class MarkQuantity. **Description:** Дробное количество маркированного товара (тег в 54 ФЗ — 1291). Обязательный параметр, если одновременно выполняются эти условия: * вы используете Чеки от ЮKassa или онлайн-кассу, обновленную до ФФД 1.2; * товар нужно [маркировать](http://docs.cntd.ru/document/902192509); * поле `measure` имеет значение ~`piece`. Пример: вы продаете поштучно карандаши. Они поставляются пачками по 100 штук с одним кодом маркировки. При продаже одного карандаша нужно в `numerator` передать ~`1`, а в `denominator` — ~`100`. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MIN_VALUE](../classes/YooKassa-Model-Receipt-MarkQuantity.md#constant_MIN_VALUE) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$denominator](../classes/YooKassa-Model-Receipt-MarkQuantity.md#property_denominator) | | Знаменатель — общее количество товаров в потребительской упаковке (тег в 54 ФЗ — 1294) | | public | [$numerator](../classes/YooKassa-Model-Receipt-MarkQuantity.md#property_numerator) | | Числитель — количество продаваемых товаров из одной потребительской упаковки (тег в 54 ФЗ — 1293) | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getDenominator()](../classes/YooKassa-Model-Receipt-MarkQuantity.md#method_getDenominator) | | Возвращает знаменатель. | | public | [getNumerator()](../classes/YooKassa-Model-Receipt-MarkQuantity.md#method_getNumerator) | | Возвращает числитель. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setDenominator()](../classes/YooKassa-Model-Receipt-MarkQuantity.md#method_setDenominator) | | Устанавливает знаменатель. | | public | [setNumerator()](../classes/YooKassa-Model-Receipt-MarkQuantity.md#method_setNumerator) | | Устанавливает числитель. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Receipt/MarkQuantity.php](../../lib/Model/Receipt/MarkQuantity.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Receipt\MarkQuantity * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MIN_VALUE ```php MIN_VALUE = 1 : int ``` --- ## Properties #### public $denominator : string --- ***Description*** Знаменатель — общее количество товаров в потребительской упаковке (тег в 54 ФЗ — 1294) **Type:** string **Details:** #### public $numerator : string --- ***Description*** Числитель — количество продаваемых товаров из одной потребительской упаковки (тег в 54 ФЗ — 1293) **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getDenominator() : int|null ```php public getDenominator() : int|null ``` **Summary** Возвращает знаменатель. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkQuantity](../classes/YooKassa-Model-Receipt-MarkQuantity.md) **Returns:** int|null - Знаменатель #### public getNumerator() : int|null ```php public getNumerator() : int|null ``` **Summary** Возвращает числитель. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkQuantity](../classes/YooKassa-Model-Receipt-MarkQuantity.md) **Returns:** int|null - Числитель #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setDenominator() : self ```php public setDenominator(int|null $denominator = null) : self ``` **Summary** Устанавливает знаменатель. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkQuantity](../classes/YooKassa-Model-Receipt-MarkQuantity.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | denominator | Знаменатель | **Returns:** self - #### public setNumerator() : self ```php public setNumerator(int|null $numerator = null) : self ``` **Summary** Устанавливает числитель. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkQuantity](../classes/YooKassa-Model-Receipt-MarkQuantity.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | numerator | Числитель | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Deals-AbstractDealResponse.md000064400000120260150364342670023136 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Request\Deals\AbstractDealResponse ### Namespace: [\YooKassa\Request\Deals](../namespaces/yookassa-request-deals.md) --- **Summary:** Класс, представляющий AbstractDealResponse. **Description:** Абстрактный класс ответа от API, возвращающего информацию о платеже. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_ID](../classes/YooKassa-Model-Deal-SafeDeal.md#constant_MAX_LENGTH_ID) | | | | public | [MIN_LENGTH_ID](../classes/YooKassa-Model-Deal-SafeDeal.md#constant_MIN_LENGTH_ID) | | | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Deal-SafeDeal.md#constant_MAX_LENGTH_DESCRIPTION) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property_balance) | | Баланс сделки. | | public | [$created_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property_created_at) | | Время создания сделки. | | public | [$createdAt](../classes/YooKassa-Model-Deal-SafeDeal.md#property_createdAt) | | Время создания сделки. | | public | [$description](../classes/YooKassa-Model-Deal-SafeDeal.md#property_description) | | Описание сделки (не более 128 символов). | | public | [$expires_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property_expires_at) | | Время автоматического закрытия сделки. | | public | [$expiresAt](../classes/YooKassa-Model-Deal-SafeDeal.md#property_expiresAt) | | Время автоматического закрытия сделки. | | public | [$fee_moment](../classes/YooKassa-Model-Deal-SafeDeal.md#property_fee_moment) | | Момент перечисления вам вознаграждения платформы. | | public | [$feeMoment](../classes/YooKassa-Model-Deal-SafeDeal.md#property_feeMoment) | | Момент перечисления вам вознаграждения платформы. | | public | [$id](../classes/YooKassa-Model-Deal-SafeDeal.md#property_id) | | Идентификатор сделки. | | public | [$metadata](../classes/YooKassa-Model-Deal-SafeDeal.md#property_metadata) | | Любые дополнительные данные, которые нужны вам для работы. | | public | [$payout_balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property_payout_balance) | | Сумма вознаграждения продавцаю. | | public | [$payoutBalance](../classes/YooKassa-Model-Deal-SafeDeal.md#property_payoutBalance) | | Сумма вознаграждения продавца. | | public | [$status](../classes/YooKassa-Model-Deal-SafeDeal.md#property_status) | | Статус сделки. | | public | [$test](../classes/YooKassa-Model-Deal-SafeDeal.md#property_test) | | Признак тестовой операции. | | public | [$type](../classes/YooKassa-Model-Deal-BaseDeal.md#property_type) | | Тип сделки | | protected | [$_balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property__balance) | | Баланс сделки | | protected | [$_created_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property__created_at) | | Время создания сделки. | | protected | [$_description](../classes/YooKassa-Model-Deal-SafeDeal.md#property__description) | | Описание сделки (не более 128 символов). Используется для фильтрации при [получении списка сделок](/developers/api#get_deals_list). | | protected | [$_expires_at](../classes/YooKassa-Model-Deal-SafeDeal.md#property__expires_at) | | Время автоматического закрытия сделки. | | protected | [$_fee_moment](../classes/YooKassa-Model-Deal-SafeDeal.md#property__fee_moment) | | Момент перечисления вам вознаграждения платформы | | protected | [$_id](../classes/YooKassa-Model-Deal-SafeDeal.md#property__id) | | Идентификатор сделки. | | protected | [$_metadata](../classes/YooKassa-Model-Deal-SafeDeal.md#property__metadata) | | Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). | | protected | [$_payout_balance](../classes/YooKassa-Model-Deal-SafeDeal.md#property__payout_balance) | | Сумма вознаграждения продавца | | protected | [$_status](../classes/YooKassa-Model-Deal-SafeDeal.md#property__status) | | Статус сделки | | protected | [$_test](../classes/YooKassa-Model-Deal-SafeDeal.md#property__test) | | Признак тестовой операции. | | protected | [$_type](../classes/YooKassa-Model-Deal-BaseDeal.md#property__type) | | Тип сделки | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getBalance) | | Возвращает баланс сделки. | | public | [getCreatedAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getCreatedAt) | | Возвращает время создания сделки. | | public | [getDescription()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getDescription) | | Возвращает описание сделки (не более 128 символов). | | public | [getExpiresAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getExpiresAt) | | Возвращает время автоматического закрытия сделки. | | public | [getFeeMoment()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getFeeMoment) | | Возвращает момент перечисления вам вознаграждения платформы. | | public | [getId()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getId) | | Возвращает Id сделки. | | public | [getMetadata()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getMetadata) | | Возвращает дополнительные данные сделки. | | public | [getPayoutBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getPayoutBalance) | | Возвращает сумму вознаграждения продавца. | | public | [getStatus()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getStatus) | | Возвращает статус сделки. | | public | [getTest()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getType()](../classes/YooKassa-Model-Deal-BaseDeal.md#method_getType) | | Возвращает тип сделки. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setBalance) | | Устанавливает баланс сделки. | | public | [setCreatedAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setCreatedAt) | | Устанавливает created_at. | | public | [setDescription()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setDescription) | | Устанавливает описание сделки (не более 128 символов). | | public | [setExpiresAt()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setExpiresAt) | | Устанавливает время автоматического закрытия сделки. | | public | [setFeeMoment()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setFeeMoment) | | Устанавливает момент перечисления вам вознаграждения платформы. | | public | [setId()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setId) | | Устанавливает Id сделки. | | public | [setMetadata()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setMetadata) | | Устанавливает metadata. | | public | [setPayoutBalance()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setPayoutBalance) | | Устанавливает сумму вознаграждения продавца. | | public | [setStatus()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setStatus) | | Устанавливает статус сделки. | | public | [setTest()](../classes/YooKassa-Model-Deal-SafeDeal.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [setType()](../classes/YooKassa-Model-Deal-BaseDeal.md#method_setType) | | Устанавливает тип сделки. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Deals/AbstractDealResponse.php](../../lib/Request/Deals/AbstractDealResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) * [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) * \YooKassa\Request\Deals\AbstractDealResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Abstract Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_ID Inherited from [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ```php MAX_LENGTH_ID = 50 : int ``` ###### MIN_LENGTH_ID Inherited from [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ```php MIN_LENGTH_ID = 36 : int ``` ###### MAX_LENGTH_DESCRIPTION Inherited from [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ```php MAX_LENGTH_DESCRIPTION = 128 : int ``` --- ## Properties #### public $balance : \YooKassa\Model\AmountInterface --- ***Description*** Баланс сделки. **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $created_at : \DateTime --- ***Description*** Время создания сделки. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $createdAt : \DateTime --- ***Description*** Время создания сделки. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $description : string --- ***Description*** Описание сделки (не более 128 символов). **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $expires_at : \DateTime --- ***Description*** Время автоматического закрытия сделки. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $expiresAt : \DateTime --- ***Description*** Время автоматического закрытия сделки. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $fee_moment : string --- ***Description*** Момент перечисления вам вознаграждения платформы. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $feeMoment : string --- ***Description*** Момент перечисления вам вознаграждения платформы. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $id : string --- ***Description*** Идентификатор сделки. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Любые дополнительные данные, которые нужны вам для работы. **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $payout_balance : \YooKassa\Model\AmountInterface --- ***Description*** Сумма вознаграждения продавцаю. **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $payoutBalance : \YooKassa\Model\AmountInterface --- ***Description*** Сумма вознаграждения продавца. **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $status : string --- ***Description*** Статус сделки. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $test : bool --- ***Description*** Признак тестовой операции. **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### public $type : string --- ***Description*** Тип сделки **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) #### protected $_balance : ?\YooKassa\Model\AmountInterface --- **Summary** Баланс сделки **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_created_at : ?\DateTime --- **Summary** Время создания сделки. **Type:** DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_description : ?string --- **Summary** Описание сделки (не более 128 символов). Используется для фильтрации при [получении списка сделок](/developers/api#get_deals_list). **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_expires_at : ?\DateTime --- **Summary** Время автоматического закрытия сделки. **Type:** DateTime **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_fee_moment : ?string --- **Summary** Момент перечисления вам вознаграждения платформы **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_id : ?string --- **Summary** Идентификатор сделки. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Summary** Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_payout_balance : ?\YooKassa\Model\AmountInterface --- **Summary** Сумма вознаграждения продавца **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_status : ?string --- **Summary** Статус сделки **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_test : ?bool --- **Summary** Признак тестовой операции. **Type:** ?bool **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) #### protected $_type : ?string --- **Summary** Тип сделки **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getBalance() : \YooKassa\Model\AmountInterface|null ```php public getBalance() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает баланс сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \YooKassa\Model\AmountInterface|null - Баланс сделки #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \DateTime|null - Время создания сделки #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание сделки (не более 128 символов). **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Описание сделки #### public getExpiresAt() : \DateTime|null ```php public getExpiresAt() : \DateTime|null ``` **Summary** Возвращает время автоматического закрытия сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \DateTime|null - Время автоматического закрытия сделки #### public getFeeMoment() : string|null ```php public getFeeMoment() : string|null ``` **Summary** Возвращает момент перечисления вам вознаграждения платформы. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Момент перечисления вознаграждения #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Id сделки #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает дополнительные данные сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \YooKassa\Model\Metadata|null - Дополнительные данные сделки #### public getPayoutBalance() : \YooKassa\Model\AmountInterface|null ```php public getPayoutBalance() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму вознаграждения продавца. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма вознаграждения продавца #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** string|null - Статус сделки #### public getTest() : bool|null ```php public getTest() : bool|null ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) **Returns:** bool|null - Признак тестовой операции #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setBalance() : self ```php public setBalance(\YooKassa\Model\AmountInterface|array|null $balance = null) : self ``` **Summary** Устанавливает баланс сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | balance | | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает created_at. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания сделки. | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание сделки (не более 128 символов). **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Описание сделки (не более 128 символов). | **Returns:** self - #### public setExpiresAt() : self ```php public setExpiresAt(\DateTime|string|null $expires_at = null) : self ``` **Summary** Устанавливает время автоматического закрытия сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at | Время автоматического закрытия сделки. | **Returns:** self - #### public setFeeMoment() : self ```php public setFeeMoment(string|null $fee_moment = null) : self ``` **Summary** Устанавливает момент перечисления вам вознаграждения платформы. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fee_moment | Момент перечисления вам вознаграждения платформы | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор сделки. | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает metadata. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Любые дополнительные данные, которые нужны вам для работы. | **Returns:** self - #### public setPayoutBalance() : self ```php public setPayoutBalance(\YooKassa\Model\AmountInterface|array|null $payout_balance = null) : self ``` **Summary** Устанавливает сумму вознаграждения продавца. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | payout_balance | Сумма вознаграждения продавца | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус сделки | **Returns:** self - #### public setTest() : self ```php public setTest(bool|null $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Deal\SafeDeal](../classes/YooKassa-Model-Deal-SafeDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | test | Признак тестовой операции | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\BaseDeal](../classes/YooKassa-Model-Deal-BaseDeal.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Refund-RefundCancellationDetailsPartyCode.md000064400000012204150364342670025550 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Refund\RefundCancellationDetailsPartyCode ### Namespace: [\YooKassa\Model\Refund](../namespaces/yookassa-model-refund.md) --- **Summary:** Класс, представляющий модель CancellationDetailsPartyCode. **Description:** Возможные инициаторы отмены возврата: - `yoo_money` - ЮKassa - `refund_network` - Любые участники процесса возврата, кроме ЮKassa и вас --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [YOO_MONEY](../classes/YooKassa-Model-Refund-RefundCancellationDetailsPartyCode.md#constant_YOO_MONEY) | | ЮKassa | | public | [YANDEX_CHECKOUT](../classes/YooKassa-Model-Refund-RefundCancellationDetailsPartyCode.md#constant_YANDEX_CHECKOUT) | *deprecated* | | | public | [REFUND_NETWORK](../classes/YooKassa-Model-Refund-RefundCancellationDetailsPartyCode.md#constant_REFUND_NETWORK) | | Любые участники процесса возврата, кроме ЮKassa и вас (например, эмитент банковской карты) | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Refund-RefundCancellationDetailsPartyCode.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Refund/RefundCancellationDetailsPartyCode.php](../../lib/Model/Refund/RefundCancellationDetailsPartyCode.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Refund\RefundCancellationDetailsPartyCode * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### YOO_MONEY ЮKassa ```php YOO_MONEY = 'yoo_money' ``` ###### ~~YANDEX_CHECKOUT~~ ```php YANDEX_CHECKOUT = 'yandex_checkout' ``` **deprecated** Устарел. Оставлен для обратной совместимости ###### REFUND_NETWORK Любые участники процесса возврата, кроме ЮKassa и вас (например, эмитент банковской карты) ```php REFUND_NETWORK = 'refund_network' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataRate.md000064400000011462150364342670026132 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataRate ### Namespace: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank](../namespaces/yookassa-model-payment-paymentmethod-b2b-sberbank.md) --- **Summary:** Класс, представляющий модель CalculatedVatData. **Description:** Налоговая ставка НДС. Возможные значения: - 7 - 7% - 10 - 10% - 18 - 18% - 20 - 20% --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [RATE_7](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataRate.md#constant_RATE_7) | | 7% | | public | [RATE_10](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataRate.md#constant_RATE_10) | | 10% | | public | [RATE_18](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataRate.md#constant_RATE_18) | | 18% | | public | [RATE_20](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataRate.md#constant_RATE_20) | | 20% | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-VatDataRate.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payment/PaymentMethod/B2b/Sberbank/VatDataRate.php](../../lib/Model/Payment/PaymentMethod/B2b/Sberbank/VatDataRate.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\VatDataRate * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### RATE_7 7% ```php RATE_7 = '7' ``` ###### RATE_10 10% ```php RATE_10 = '10' ``` ###### RATE_18 18% ```php RATE_18 = '18' ``` ###### RATE_20 20% ```php RATE_20 = '20' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-AirlineInterface.md000064400000011075150364342670023045 0ustar00# [YooKassa API SDK](../home.md) # Interface: AirlineInterface ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Interface Airline. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getBookingReference()](../classes/YooKassa-Request-Payments-AirlineInterface.md#method_getBookingReference) | | Номер бронирования. Обязателен на этапе создания платежа. | | public | [getLegs()](../classes/YooKassa-Request-Payments-AirlineInterface.md#method_getLegs) | | Список объектов-контейнеров с данными о маршруте. | | public | [getPassengers()](../classes/YooKassa-Request-Payments-AirlineInterface.md#method_getPassengers) | | Список объектов-контейнеров с данными пассажиров. | | public | [getTicketNumber()](../classes/YooKassa-Request-Payments-AirlineInterface.md#method_getTicketNumber) | | Уникальный номер билета. Обязателен на этапе подтверждения платежа. | --- ### Details * File: [lib/Request/Payments/AirlineInterface.php](../../lib/Request/Payments/AirlineInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Номер бронирования. Обязателен на этапе создания платежа | | property | | Номер бронирования. Обязателен на этапе создания платежа | | property | | Уникальный номер билета. Обязателен на этапе подтверждения платежа | | property | | Уникальный номер билета. Обязателен на этапе подтверждения платежа | | property | | Список пассажиров | | property | | Список маршрутов | --- ## Methods #### public getBookingReference() : ?string ```php public getBookingReference() : ?string ``` **Summary** Номер бронирования. Обязателен на этапе создания платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\AirlineInterface](../classes/YooKassa-Request-Payments-AirlineInterface.md) **Returns:** ?string - #### public getTicketNumber() : ?string ```php public getTicketNumber() : ?string ``` **Summary** Уникальный номер билета. Обязателен на этапе подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\AirlineInterface](../classes/YooKassa-Request-Payments-AirlineInterface.md) **Returns:** ?string - #### public getPassengers() : \YooKassa\Request\Payments\PassengerInterface[]|\YooKassa\Common\ListObjectInterface ```php public getPassengers() : \YooKassa\Request\Payments\PassengerInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Список объектов-контейнеров с данными пассажиров. **Details:** * Inherited From: [\YooKassa\Request\Payments\AirlineInterface](../classes/YooKassa-Request-Payments-AirlineInterface.md) **Returns:** \YooKassa\Request\Payments\PassengerInterface[]|\YooKassa\Common\ListObjectInterface - #### public getLegs() : \YooKassa\Request\Payments\LegInterface[]|\YooKassa\Common\ListObjectInterface ```php public getLegs() : \YooKassa\Request\Payments\LegInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Список объектов-контейнеров с данными о маршруте. **Details:** * Inherited From: [\YooKassa\Request\Payments\AirlineInterface](../classes/YooKassa-Request-Payments-AirlineInterface.md) **Returns:** \YooKassa\Request\Payments\LegInterface[]|\YooKassa\Common\ListObjectInterface - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payouts-PayoutPersonalData.md000064400000034763150364342670023275 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payouts\PayoutPersonalData ### Namespace: [\YooKassa\Request\Payouts](../namespaces/yookassa-request-payouts.md) --- **Summary:** Класс, представляющий модель PayoutPersonalData. **Description:** Персональные данные получателя выплаты. Необходимо передавать, если вы делаете выплату с [проверкой получателя](/developers/payouts/scenario-extensions/recipient-check). Только для обычных выплат. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_ID](../classes/YooKassa-Request-Payouts-PayoutPersonalData.md#constant_MAX_LENGTH_ID) | | | | public | [MIN_LENGTH_ID](../classes/YooKassa-Request-Payouts-PayoutPersonalData.md#constant_MIN_LENGTH_ID) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Request-Payouts-PayoutPersonalData.md#property_id) | | Идентификатор персональных данных, сохраненных в ЮKassa. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Request-Payouts-PayoutPersonalData.md#method_getId) | | Возвращает идентификатор персональных данных. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Request-Payouts-PayoutPersonalData.md#method_setId) | | Устанавливает идентификатор персональных данных. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payouts/PayoutPersonalData.php](../../lib/Request/Payouts/PayoutPersonalData.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\Payouts\PayoutPersonalData * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_ID ```php MAX_LENGTH_ID = 50 : int ``` ###### MIN_LENGTH_ID ```php MIN_LENGTH_ID = 36 : int ``` --- ## Properties #### public $id : string --- ***Description*** Идентификатор персональных данных, сохраненных в ЮKassa. **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор персональных данных. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutPersonalData](../classes/YooKassa-Request-Payouts-PayoutPersonalData.md) **Returns:** string|null - Идентификатор персональных данных #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор персональных данных. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutPersonalData](../classes/YooKassa-Request-Payouts-PayoutPersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор персональных данных, сохраненных в ЮKassa | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-PersonalData-PersonalDataType.md000064400000010631150364342670023242 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\PersonalData\PersonalDataType ### Namespace: [\YooKassa\Model\PersonalData](../namespaces/yookassa-model-personaldata.md) --- **Summary:** Класс, представляющий модель PersonalDataType. **Description:** Тип персональных данных — цель, для которой вы будете использовать данные. Возможное значение: - `sbp_payout_recipient` — выплаты с [проверкой получателя](/developers/payouts/scenario-extensions/recipient-check). --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [SBP_PAYOUT_RECIPIENT](../classes/YooKassa-Model-PersonalData-PersonalDataType.md#constant_SBP_PAYOUT_RECIPIENT) | | Выплаты с проверкой получателя | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-PersonalData-PersonalDataType.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/PersonalData/PersonalDataType.php](../../lib/Model/PersonalData/PersonalDataType.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\PersonalData\PersonalDataType * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### SBP_PAYOUT_RECIPIENT Выплаты с проверкой получателя ```php SBP_PAYOUT_RECIPIENT = 'sbp_payout_recipient' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestSerializer.md000064400000004610150364342670026421 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\SelfEmployed\SelfEmployedRequestSerializer ### Namespace: [\YooKassa\Request\SelfEmployed](../namespaces/yookassa-request-selfemployed.md) --- **Summary:** Класс, представляющий модель SelfEmployedRequestSerializer. **Description:** Класс объекта осуществляющего сериализацию объекта запроса к API на создание самозанятого. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [serialize()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestSerializer.md#method_serialize) | | Формирует ассоциативный массив данных из объекта запроса. | --- ### Details * File: [lib/Request/SelfEmployed/SelfEmployedRequestSerializer.php](../../lib/Request/SelfEmployed/SelfEmployedRequestSerializer.php) * Package: YooKassa\Request * Class Hierarchy: * \YooKassa\Request\SelfEmployed\SelfEmployedRequestSerializer * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public serialize() : array ```php public serialize(\YooKassa\Request\SelfEmployed\SelfEmployedRequest $request) : array ``` **Summary** Формирует ассоциативный массив данных из объекта запроса. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestSerializer](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestSerializer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\SelfEmployed\SelfEmployedRequest | request | | **Returns:** array - Массив данных для дальнейшего кодирования в JSON --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataQiwi.md000064400000040526150364342670025112 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataQiwi ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentMethodDataQiwi. **Description:** Данные для оплаты из кошелька QIWI Wallet. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$phone](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataQiwi.md#property_phone) | | Телефон, на который зарегистрирован аккаунт в QIWI. Указывается в формате [ITU-T E.164](https://ru.wikipedia.org/wiki/E.164), например ~`79000000000`. | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataQiwi.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getPhone()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataQiwi.md#method_getPhone) | | Возвращает номер телефона в формате ITU-T E.164 | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setPhone()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataQiwi.md#method_setPhone) | | Устанавливает номер телефона в формате ITU-T E.164 | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataQiwi.php](../../lib/Request/Payments/PaymentData/PaymentDataQiwi.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataQiwi * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $phone : string --- ***Description*** Телефон, на который зарегистрирован аккаунт в QIWI. Указывается в формате [ITU-T E.164](https://ru.wikipedia.org/wiki/E.164), например ~`79000000000`. **Type:** string **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) #### protected $_type : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataQiwi](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataQiwi.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getPhone() : string|null ```php public getPhone() : string|null ``` **Summary** Возвращает номер телефона в формате ITU-T E.164 **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataQiwi](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataQiwi.md) **Returns:** string|null - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setPhone() : self ```php public setPhone(string|null $phone = null) : self ``` **Summary** Устанавливает номер телефона в формате ITU-T E.164 **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataQiwi](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataQiwi.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | phone | Номер телефона в формате ITU-T E.164 | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md000064400000046460150364342670024741 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\CancellationDetailsReasonCode ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Класс, представляющий модель CancellationDetailsReasonCode. **Description:** Возможные причины отмены платежа. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [THREE_D_SECURE_FAILED](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_THREE_D_SECURE_FAILED) | | Не пройдена аутентификация по 3-D Secure. При новой попытке оплаты пользователю следует пройти аутентификацию, использовать другое платежное средство или обратиться в банк за уточнениями. | | public | [CALL_ISSUER](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_CALL_ISSUER) | | Оплата данным платежным средством отклонена по неизвестным причинам. | | public | [CARD_EXPIRED](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_CARD_EXPIRED) | | Истек срок действия банковской карты. При новой попытке оплаты пользователю следует использовать другое платежное средство | | public | [COUNTRY_FORBIDDEN](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_COUNTRY_FORBIDDEN) | | Нельзя заплатить банковской картой, выпущенной в этой стране. | | public | [FRAUD_SUSPECTED](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_FRAUD_SUSPECTED) | | Платеж заблокирован из-за подозрения в мошенничестве. При новой попытке оплаты пользователю следует использовать другое платежное средство | | public | [GENERAL_DECLINE](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_GENERAL_DECLINE) | | Причина не детализирована. Пользователю следует обратиться к инициатору отмены платежа за уточнением подробностей | | public | [IDENTIFICATION_REQUIRED](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_IDENTIFICATION_REQUIRED) | | Превышены ограничения на платежи для кошелька ЮMoney. При новой попытке оплаты пользователю следует идентифицировать кошелек или выбрать другое платежное средство | | public | [INSUFFICIENT_FUNDS](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_INSUFFICIENT_FUNDS) | | Не хватает денег для оплаты. Пользователю следует пополнить баланс или использовать другое платежное средство | | public | [INVALID_CARD_NUMBER](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_INVALID_CARD_NUMBER) | | Неправильно указан номер карты. При новой попытке оплаты пользователю следует ввести корректные данные | | public | [INVALID_CSC](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_INVALID_CSC) | | Неправильно указан код CVV2 (CVC2, CID). При новой попытке оплаты пользователю следует ввести корректные данные | | public | [ISSUER_UNAVAILABLE](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_ISSUER_UNAVAILABLE) | | Организация, выпустившая платежное средство, недоступна. При новой попытке оплаты пользователю следует использовать другое платежное средство или повторить оплату позже | | public | [PAYMENT_METHOD_LIMIT_EXCEEDED](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_PAYMENT_METHOD_LIMIT_EXCEEDED) | | Исчерпан лимит платежей для данного платежного средства или вашего магазина. | | public | [PAYMENT_METHOD_RESTRICTED](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_PAYMENT_METHOD_RESTRICTED) | | Запрещены операции данным платежным средством (например, карта заблокирована из-за утери, кошелек — из-за взлома мошенниками). Пользователю следует обратиться в организацию, выпустившую платежное средство | | public | [PERMISSION_REVOKED](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_PERMISSION_REVOKED) | | Нельзя провести безакцептное списание: пользователь отозвал разрешение на автоплатежи. Если пользователь еще хочет оплатить, вам необходимо создать новый платеж, а пользователю — подтвердить оплату | | public | [INTERNAL_TIMEOUT](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_INTERNAL_TIMEOUT) | | Технические неполадки на стороне ЮKassa: не удалось обработать запрос в течение 30 секунд. Повторите платеж с новым ключом идемпотентности | | public | [CANCELED_BY_MERCHANT](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_CANCELED_BY_MERCHANT) | | Платеж отменен по API при оплате в две стадии | | public | [EXPIRED_ON_CONFIRMATION](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_EXPIRED_ON_CONFIRMATION) | | Истек срок оплаты: пользователь не подтвердил платеж за время, отведенное на оплату выбранным способом. | | public | [EXPIRED_ON_CAPTURE](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_EXPIRED_ON_CAPTURE) | | Истек срок списания оплаты у двухстадийного платежа. | | public | [DEAL_EXPIRED](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_DEAL_EXPIRED) | | Для тех, кто использует Безопасную сделку: закончился срок жизни сделки. | | public | [UNSUPPORTED_MOBILE_OPERATOR](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#constant_UNSUPPORTED_MOBILE_OPERATOR) | | Нельзя заплатить с номера телефона этого мобильного оператора. При новой попытке оплаты пользователю следует использовать другое платежное средство. Список поддерживаемых операторов | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payment-CancellationDetailsReasonCode.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payment/CancellationDetailsReasonCode.php](../../lib/Model/Payment/CancellationDetailsReasonCode.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payment\CancellationDetailsReasonCode * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### THREE_D_SECURE_FAILED Не пройдена аутентификация по 3-D Secure. При новой попытке оплаты пользователю следует пройти аутентификацию, использовать другое платежное средство или обратиться в банк за уточнениями. ```php THREE_D_SECURE_FAILED = '3d_secure_failed' ``` ###### CALL_ISSUER Оплата данным платежным средством отклонена по неизвестным причинам. ```php CALL_ISSUER = 'call_issuer' ``` Пользователю следует обратиться в организацию, выпустившую платежное средство. ###### CARD_EXPIRED Истек срок действия банковской карты. При новой попытке оплаты пользователю следует использовать другое платежное средство ```php CARD_EXPIRED = 'card_expired' ``` ###### COUNTRY_FORBIDDEN Нельзя заплатить банковской картой, выпущенной в этой стране. ```php COUNTRY_FORBIDDEN = 'country_forbidden' ``` При новой попытке оплаты пользователю следует использовать другое платежное средство. Вы можете настроить ограничения на оплату иностранными банковскими картами. ###### FRAUD_SUSPECTED Платеж заблокирован из-за подозрения в мошенничестве. При новой попытке оплаты пользователю следует использовать другое платежное средство ```php FRAUD_SUSPECTED = 'fraud_suspected' ``` ###### GENERAL_DECLINE Причина не детализирована. Пользователю следует обратиться к инициатору отмены платежа за уточнением подробностей ```php GENERAL_DECLINE = 'general_decline' ``` ###### IDENTIFICATION_REQUIRED Превышены ограничения на платежи для кошелька ЮMoney. При новой попытке оплаты пользователю следует идентифицировать кошелек или выбрать другое платежное средство ```php IDENTIFICATION_REQUIRED = 'identification_required' ``` ###### INSUFFICIENT_FUNDS Не хватает денег для оплаты. Пользователю следует пополнить баланс или использовать другое платежное средство ```php INSUFFICIENT_FUNDS = 'insufficient_funds' ``` ###### INVALID_CARD_NUMBER Неправильно указан номер карты. При новой попытке оплаты пользователю следует ввести корректные данные ```php INVALID_CARD_NUMBER = 'invalid_card_number' ``` ###### INVALID_CSC Неправильно указан код CVV2 (CVC2, CID). При новой попытке оплаты пользователю следует ввести корректные данные ```php INVALID_CSC = 'invalid_csc' ``` ###### ISSUER_UNAVAILABLE Организация, выпустившая платежное средство, недоступна. При новой попытке оплаты пользователю следует использовать другое платежное средство или повторить оплату позже ```php ISSUER_UNAVAILABLE = 'issuer_unavailable' ``` ###### PAYMENT_METHOD_LIMIT_EXCEEDED Исчерпан лимит платежей для данного платежного средства или вашего магазина. ```php PAYMENT_METHOD_LIMIT_EXCEEDED = 'payment_method_limit_exceeded' ``` При новой попытке оплаты пользователю следует использовать другое платежное средство или повторить оплату на следующий день. ###### PAYMENT_METHOD_RESTRICTED Запрещены операции данным платежным средством (например, карта заблокирована из-за утери, кошелек — из-за взлома мошенниками). Пользователю следует обратиться в организацию, выпустившую платежное средство ```php PAYMENT_METHOD_RESTRICTED = 'payment_method_restricted' ``` ###### PERMISSION_REVOKED Нельзя провести безакцептное списание: пользователь отозвал разрешение на автоплатежи. Если пользователь еще хочет оплатить, вам необходимо создать новый платеж, а пользователю — подтвердить оплату ```php PERMISSION_REVOKED = 'permission_revoked' ``` ###### INTERNAL_TIMEOUT Технические неполадки на стороне ЮKassa: не удалось обработать запрос в течение 30 секунд. Повторите платеж с новым ключом идемпотентности ```php INTERNAL_TIMEOUT = 'internal_timeout' ``` ###### CANCELED_BY_MERCHANT Платеж отменен по API при оплате в две стадии ```php CANCELED_BY_MERCHANT = 'canceled_by_merchant' ``` ###### EXPIRED_ON_CONFIRMATION Истек срок оплаты: пользователь не подтвердил платеж за время, отведенное на оплату выбранным способом. ```php EXPIRED_ON_CONFIRMATION = 'expired_on_confirmation' ``` Если пользователь еще хочет оплатить, вам необходимо повторить платеж с новым ключом идемпотентности, а пользователю — подтвердить его. ###### EXPIRED_ON_CAPTURE Истек срок списания оплаты у двухстадийного платежа. ```php EXPIRED_ON_CAPTURE = 'expired_on_capture' ``` Если вы еще хотите принять оплату, повторите платеж с новым ключом идемпотентности и спишите деньги после подтверждения платежа пользователем ###### DEAL_EXPIRED Для тех, кто использует Безопасную сделку: закончился срок жизни сделки. ```php DEAL_EXPIRED = 'deal_expired' ``` Если вы еще хотите принять оплату, создайте новую сделку и проведите для нее новый платеж. ###### UNSUPPORTED_MOBILE_OPERATOR Нельзя заплатить с номера телефона этого мобильного оператора. При новой попытке оплаты пользователю следует использовать другое платежное средство. Список поддерживаемых операторов ```php UNSUPPORTED_MOBILE_OPERATOR = 'unsupported_mobile_operator' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCard.md000064400000043440150364342670031545 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCard ### Namespace: [\YooKassa\Request\Payouts\PayoutDestinationData](../namespaces/yookassa-request-payouts-payoutdestinationdata.md) --- **Summary:** Класс, представляющий модель PayoutDestinationDataBankCard. **Description:** Платежные данные для проведения оплаты при помощи банковской карты. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$card](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCard.md#property_card) | | Данные банковской карты | | public | [$type](../classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md#property_type) | | Тип метода оплаты | | public | [$type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property__type) | | Тип метода оплаты | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCard.md#method___construct) | | Конструктор PayoutDestinationDataBankCard. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCard()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCard.md#method_getCard) | | Возвращает данные банковской карты. | | public | [getType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCard()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCard.md#method_setCard) | | Устанавливает данные банковской карты. | | public | [setType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_setType) | | Устанавливает тип метода оплаты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payouts/PayoutDestinationData/PayoutDestinationDataBankCard.php](../../lib/Request/Payouts/PayoutDestinationData/PayoutDestinationDataBankCard.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) * [\YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData](../classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md) * \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCard * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $card : \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCardCard --- ***Description*** Данные банковской карты **Type:** PayoutDestinationDataBankCardCard **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData](../classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md) #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) #### protected $_type : ?string --- **Summary** Тип метода оплаты **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** Конструктор PayoutDestinationDataBankCard. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCard](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCard() : \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCardCard|null ```php public getCard() : \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCardCard|null ``` **Summary** Возвращает данные банковской карты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCard](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCard.md) **Returns:** \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCardCard|null - Данные банковской карты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCard() : self ```php public setCard(\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCardCard|array|null $card = null) : self ``` **Summary** Устанавливает данные банковской карты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCard](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCardCard OR array OR null | card | Данные банковской карты | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md000064400000050444150364342670026067 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataGooglePay ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentDataGooglePay. **Description:** Платежные данные для проведения оплаты при помощи Google Pay. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$google_transaction_id](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md#property_google_transaction_id) | | Уникальный идентификатор транзакции, выданный Google | | public | [$googleTransactionId](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md#property_googleTransactionId) | | Уникальный идентификатор транзакции, выданный Google | | public | [$payment_method_token](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md#property_payment_method_token) | | Криптограмма Payment Token Cryptography для проведения оплаты через Google Pay | | public | [$paymentMethodToken](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md#property_paymentMethodToken) | | Криптограмма Payment Token Cryptography для проведения оплаты через Google Pay | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getGoogleTransactionId()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md#method_getGoogleTransactionId) | | Возвращает уникальный идентификатор транзакции, выданный Google. | | public | [getPaymentMethodToken()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md#method_getPaymentMethodToken) | | Возвращает криптограмму Payment Token Cryptography для проведения оплаты через Google Pay. | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setGoogleTransactionId()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md#method_setGoogleTransactionId) | | Устанавливает уникальный идентификатор транзакции, выданный Google. | | public | [setPaymentMethodToken()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md#method_setPaymentMethodToken) | | Устанавливает криптограмму Payment Token Cryptography для проведения оплаты через Google Pay. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataGooglePay.php](../../lib/Request/Payments/PaymentData/PaymentDataGooglePay.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataGooglePay * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $google_transaction_id : string --- ***Description*** Уникальный идентификатор транзакции, выданный Google **Type:** string **Details:** #### public $googleTransactionId : string --- ***Description*** Уникальный идентификатор транзакции, выданный Google **Type:** string **Details:** #### public $payment_method_token : string --- ***Description*** Криптограмма Payment Token Cryptography для проведения оплаты через Google Pay **Type:** string **Details:** #### public $paymentMethodToken : string --- ***Description*** Криптограмма Payment Token Cryptography для проведения оплаты через Google Pay **Type:** string **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) #### protected $_type : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataGooglePay](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getGoogleTransactionId() : string|null ```php public getGoogleTransactionId() : string|null ``` **Summary** Возвращает уникальный идентификатор транзакции, выданный Google. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataGooglePay](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md) **Returns:** string|null - Уникальный идентификатор транзакции, выданный Google #### public getPaymentMethodToken() : string|null ```php public getPaymentMethodToken() : string|null ``` **Summary** Возвращает криптограмму Payment Token Cryptography для проведения оплаты через Google Pay. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataGooglePay](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md) **Returns:** string|null - Криптограмма Payment Token Cryptography для проведения оплаты через Google Pay #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setGoogleTransactionId() : self ```php public setGoogleTransactionId(string|null $google_transaction_id = null) : self ``` **Summary** Устанавливает уникальный идентификатор транзакции, выданный Google. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataGooglePay](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | google_transaction_id | Уникальный идентификатор транзакции, выданный Google | **Returns:** self - #### public setPaymentMethodToken() : self ```php public setPaymentMethodToken(string|null $payment_method_token = null) : self ``` **Summary** Устанавливает криптограмму Payment Token Cryptography для проведения оплаты через Google Pay. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataGooglePay](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataGooglePay.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_method_token | Криптограмма Payment Token Cryptography для проведения оплаты через Google Pay | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-SettlementPayoutPaymentType.md000064400000010507150364342670024043 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Deal\SettlementPayoutPaymentType ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Класс, представляющий модель SettlementPayoutPaymentType. **Description:** Тип операции. Фиксированное значение: ~`payout` — Выплата продавцу. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [PAYOUT](../classes/YooKassa-Model-Deal-SettlementPayoutPaymentType.md#constant_PAYOUT) | | Выплата продавцу | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Deal-SettlementPayoutPaymentType.md#property_validValues) | | Возвращает список доступных значений | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Deal/SettlementPayoutPaymentType.php](../../lib/Model/Deal/SettlementPayoutPaymentType.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Deal\SettlementPayoutPaymentType * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### PAYOUT Выплата продавцу ```php PAYOUT = 'payout' ``` --- ## Properties #### protected $validValues : array --- **Summary** Возвращает список доступных значений **Type:** array Массив принимаемых enum'ом значений **Details:** ##### Tags | Tag | Version | Description | | --- | ------- | ----------- | | return | | | --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-AbstractRequest.md000064400000034762150364342670020767 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Common\AbstractRequest ### Namespace: [\YooKassa\Common](../namespaces/yookassa-common.md) --- **Summary:** Класс, представляющий модель AbstractRequest. **Description:** Базовый класс объекта запроса, передаваемого в методы клиента API. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | public | [validate()](../classes/YooKassa-Common-AbstractRequest.md#method_validate) | | Валидирует текущий запрос, проверяет все ли нужные свойства установлены. | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_setValidationError) | | Устанавливает ошибку валидации. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Common/AbstractRequest.php](../../lib/Common/AbstractRequest.php) * Package: YooKassa * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Common\AbstractRequest * Implements: * [\YooKassa\Common\AbstractRequestInterface](../classes/YooKassa-Common-AbstractRequestInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string|null - Последняя произошедшая ошибка валидации #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public validate() : bool ```php Abstract public validate() : bool ``` **Summary** Валидирует текущий запрос, проверяет все ли нужные свойства установлены. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** bool - True если запрос валиден, false если нет #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setValidationError() : void ```php protected setValidationError(string $value) : void ``` **Summary** Устанавливает ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** void - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Helpers-StringObject.md000064400000004571150364342670020415 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Helpers\StringObject ### Namespace: [\YooKassa\Helpers](../namespaces/yookassa-helpers.md) --- **Summary:** Класс, представляющий модель StringObject. **Description:** Класс объекта, преобразуемого в строку, используется только в тестах. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Helpers-StringObject.md#method___construct) | | StringObject constructor. | | public | [__toString()](../classes/YooKassa-Helpers-StringObject.md#method___toString) | | Возвращает строковое значение текущего объекта. | --- ### Details * File: [lib/Helpers/StringObject.php](../../lib/Helpers/StringObject.php) * Package: YooKassa\Helpers * Class Hierarchy: * \YooKassa\Helpers\StringObject * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public __construct() : mixed ```php public __construct(string $value) : mixed ``` **Summary** StringObject constructor. **Details:** * Inherited From: [\YooKassa\Helpers\StringObject](../classes/YooKassa-Helpers-StringObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | | **Returns:** mixed - #### public __toString() : string ```php public __toString() : string ``` **Summary** Возвращает строковое значение текущего объекта. **Details:** * Inherited From: [\YooKassa\Helpers\StringObject](../classes/YooKassa-Helpers-StringObject.md) **Returns:** string - Строковое представление объекта --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payouts-CreatePayoutRequest.md000064400000154512150364342670023467 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payouts\CreatePayoutRequest ### Namespace: [\YooKassa\Request\Payouts](../namespaces/yookassa-request-payouts.md) --- **Summary:** Класс, представляющий модель CreatePayoutRequest. **Description:** Класс объекта запроса к API на проведение новой выплаты. --- ### Examples Пример использования билдера ```php try { $payoutBuilder = \YooKassa\Request\Payouts\CreatePayoutRequest::builder(); $payoutBuilder ->setAmount(new \YooKassa\Model\MonetaryAmount(80)) ->setPayoutDestinationData( new \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataYooMoney( [ 'type' => \YooKassa\Model\Payment\PaymentMethodType::YOO_MONEY, 'account_number' => '4100116075156746' ] ) ) ->setDeal(new \YooKassa\Model\Deal\PayoutDealInfo(['id' => 'dl-2909e77d-0022-5000-8000-0c37205b3208'])) ->setDescription('Выплата по заказу №37') ; // Создаем объект запроса $request = $payoutBuilder->build(); $idempotenceKey = uniqid('', true); $response = $client->createPayout($request, $idempotenceKey); } catch (Exception $e) { $response = $e; } var_dump($response); ``` --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#constant_MAX_LENGTH_DESCRIPTION) | | | | public | [MAX_PERSONAL_DATA](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#constant_MAX_PERSONAL_DATA) | | | | public | [MIN_PERSONAL_DATA](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#constant_MIN_PERSONAL_DATA) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_amount) | | Сумма создаваемой выплаты | | public | [$deal](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_deal) | | Сделка, в рамках которой нужно провести выплату. Необходимо передавать, если вы проводите Безопасную сделку | | public | [$description](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_description) | | Описание транзакции (не более 128 символов). Например: «Выплата по договору N» | | public | [$metadata](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_metadata) | | Метаданные привязанные к выплате | | public | [$payment_method_id](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_payment_method_id) | | Идентификатор сохраненного способа оплаты, данные которого нужно использовать для проведения выплаты | | public | [$paymentMethodId](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_paymentMethodId) | | Идентификатор сохраненного способа оплаты, данные которого нужно использовать для проведения выплаты | | public | [$payout_destination_data](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_payout_destination_data) | | Данные платежного средства, на которое нужно сделать выплату. Обязательный параметр, если не передан payout_token. | | public | [$payout_token](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_payout_token) | | Токенизированные данные для выплаты. Например, синоним банковской карты. Обязательный параметр, если не передан payout_destination_data | | public | [$payoutDestinationData](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_payoutDestinationData) | | Данные платежного средства, на которое нужно сделать выплату. Обязательный параметр, если не передан payout_token. | | public | [$payoutToken](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_payoutToken) | | Токенизированные данные для выплаты. Например, синоним банковской карты. Обязательный параметр, если не передан payout_destination_data | | public | [$personal_data](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_personal_data) | | Персональные данные получателя выплаты. Необходимо передавать, если вы делаете выплаты с [проверкой получателя](/developers/payouts/scenario-extensions/recipient-check) (только для выплат через СБП). | | public | [$personalData](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_personalData) | | Персональные данные получателя выплаты. Необходимо передавать, если вы делаете выплаты с [проверкой получателя](/developers/payouts/scenario-extensions/recipient-check) (только для выплат через СБП). | | public | [$receipt_data](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_receipt_data) | | Данные для формирования чека в сервисе Мой налог. Необходимо передавать, если вы делаете выплату [самозанятому](https://yookassa.ru/developers/payouts/scenario-extensions/self-employed). Только для обычных выплат. | | public | [$receiptData](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_receiptData) | | Данные для формирования чека в сервисе Мой налог. Необходимо передавать, если вы делаете выплату [самозанятому](https://yookassa.ru/developers/payouts/scenario-extensions/self-employed). Только для обычных выплат. | | public | [$self_employed](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_self_employed) | | Данные самозанятого, который получит выплату. Необходимо передавать, если вы делаете выплату [самозанятому](https://yookassa.ru/developers/payouts/scenario-extensions/self-employed). Только для обычных выплат. | | public | [$selfEmployed](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#property_selfEmployed) | | Данные самозанятого, который получит выплату. Необходимо передавать, если вы делаете выплату [самозанятому](https://yookassa.ru/developers/payouts/scenario-extensions/self-employed). Только для обычных выплат. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [builder()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_builder) | | Возвращает билдер объектов запросов создания выплаты. | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_getAmount) | | Возвращает сумму выплаты. | | public | [getDeal()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_getDeal) | | Возвращает сделку, в рамках которой нужно провести выплату. | | public | [getDescription()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_getDescription) | | Возвращает описание транзакции. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [getMetadata()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_getMetadata) | | Возвращает данные оплаты установленные мерчантом. | | public | [getPaymentMethodId()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_getPaymentMethodId) | | Возвращает идентификатор сохраненного способа оплаты. | | public | [getPayoutDestinationData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_getPayoutDestinationData) | | Возвращает данные для создания метода оплаты. | | public | [getPayoutToken()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_getPayoutToken) | | Возвращает токенизированные данные для выплаты. | | public | [getPersonalData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_getPersonalData) | | Возвращает персональные данные получателя выплаты. | | public | [getReceiptData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_getReceiptData) | | Возвращает данные для формирования чека в сервисе Мой налог. | | public | [getSelfEmployed()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_getSelfEmployed) | | Возвращает данные самозанятого, который получит выплату. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasAmount()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_hasAmount) | | Проверяет, была ли установлена сумма выплаты. | | public | [hasDeal()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_hasDeal) | | Проверяет наличие сделки в создаваемой выплате. | | public | [hasDescription()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_hasDescription) | | Проверяет наличие описания транзакции в создаваемом платеже. | | public | [hasMetadata()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_hasMetadata) | | Проверяет, были ли установлены метаданные выплаты. | | public | [hasPaymentMethodId()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_hasPaymentMethodId) | | Проверяет наличие идентификатора сохраненного способа оплаты. | | public | [hasPayoutDestinationData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_hasPayoutDestinationData) | | Проверяет установлен ли объект с методом оплаты. | | public | [hasPayoutToken()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_hasPayoutToken) | | Проверяет наличие токенизированных данных для выплаты. | | public | [hasPersonalData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_hasPersonalData) | | Проверяет наличие персональных данных в создаваемой выплате. | | public | [hasReceiptData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_hasReceiptData) | | Проверяет наличие данных для формирования чека в сервисе Мой налог. | | public | [hasSelfEmployed()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_hasSelfEmployed) | | Проверяет наличие данных самозанятого в создаваемой выплате. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_setAmount) | | Устанавливает сумму выплаты. | | public | [setDeal()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_setDeal) | | Устанавливает сделку, в рамках которой нужно провести выплату. | | public | [setDescription()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_setDescription) | | Устанавливает описание транзакции. | | public | [setMetadata()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_setMetadata) | | Устанавливает метаданные, привязанные к выплате. | | public | [setPaymentMethodId()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_setPaymentMethodId) | | Устанавливает идентификатор сохраненного способа оплаты. | | public | [setPayoutDestinationData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_setPayoutDestinationData) | | Устанавливает объект с информацией для создания метода оплаты. | | public | [setPayoutToken()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_setPayoutToken) | | Устанавливает токенизированные данные для выплаты. | | public | [setPersonalData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_setPersonalData) | | Устанавливает персональные данные получателя выплаты. | | public | [setReceiptData()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_setReceiptData) | | Устанавливает данные для формирования чека в сервисе Мой налог. | | public | [setSelfEmployed()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_setSelfEmployed) | | Устанавливает данные самозанятого, который получит выплату. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | public | [validate()](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md#method_validate) | | Проверяет на валидность текущий объект | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_setValidationError) | | Устанавливает ошибку валидации. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payouts/CreatePayoutRequest.php](../../lib/Request/Payouts/CreatePayoutRequest.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) * \YooKassa\Request\Payouts\CreatePayoutRequest * Implements: * [\YooKassa\Request\Payouts\CreatePayoutRequestInterface](../classes/YooKassa-Request-Payouts-CreatePayoutRequestInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION ```php MAX_LENGTH_DESCRIPTION = 128 : int ``` ###### MAX_PERSONAL_DATA ```php MAX_PERSONAL_DATA = 2 : int ``` ###### MIN_PERSONAL_DATA ```php MIN_PERSONAL_DATA = 1 : int ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма создаваемой выплаты **Type:** AmountInterface **Details:** #### public $deal : \YooKassa\Model\Deal\PayoutDealInfo --- ***Description*** Сделка, в рамках которой нужно провести выплату. Необходимо передавать, если вы проводите Безопасную сделку **Type:** PayoutDealInfo **Details:** #### public $description : string --- ***Description*** Описание транзакции (не более 128 символов). Например: «Выплата по договору N» **Type:** string **Details:** #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные привязанные к выплате **Type:** Metadata **Details:** #### public $payment_method_id : string --- ***Description*** Идентификатор сохраненного способа оплаты, данные которого нужно использовать для проведения выплаты **Type:** string **Details:** #### public $paymentMethodId : string --- ***Description*** Идентификатор сохраненного способа оплаты, данные которого нужно использовать для проведения выплаты **Type:** string **Details:** #### public $payout_destination_data : \YooKassa\Model\Payout\AbstractPayoutDestination --- ***Description*** Данные платежного средства, на которое нужно сделать выплату. Обязательный параметр, если не передан payout_token. **Type:** AbstractPayoutDestination **Details:** #### public $payout_token : string --- ***Description*** Токенизированные данные для выплаты. Например, синоним банковской карты. Обязательный параметр, если не передан payout_destination_data **Type:** string **Details:** #### public $payoutDestinationData : \YooKassa\Model\Payout\AbstractPayoutDestination --- ***Description*** Данные платежного средства, на которое нужно сделать выплату. Обязательный параметр, если не передан payout_token. **Type:** AbstractPayoutDestination **Details:** #### public $payoutToken : string --- ***Description*** Токенизированные данные для выплаты. Например, синоним банковской карты. Обязательный параметр, если не передан payout_destination_data **Type:** string **Details:** #### public $personal_data : \YooKassa\Common\ListObjectInterface|\YooKassa\Request\Payouts\PayoutPersonalData[] --- ***Description*** Персональные данные получателя выплаты. Необходимо передавать, если вы делаете выплаты с [проверкой получателя](/developers/payouts/scenario-extensions/recipient-check) (только для выплат через СБП). **Type:** PayoutPersonalData[] **Details:** #### public $personalData : \YooKassa\Common\ListObjectInterface|\YooKassa\Request\Payouts\PayoutPersonalData[] --- ***Description*** Персональные данные получателя выплаты. Необходимо передавать, если вы делаете выплаты с [проверкой получателя](/developers/payouts/scenario-extensions/recipient-check) (только для выплат через СБП). **Type:** PayoutPersonalData[] **Details:** #### public $receipt_data : \YooKassa\Request\Payouts\IncomeReceiptData --- ***Description*** Данные для формирования чека в сервисе Мой налог. Необходимо передавать, если вы делаете выплату [самозанятому](https://yookassa.ru/developers/payouts/scenario-extensions/self-employed). Только для обычных выплат. **Type:** IncomeReceiptData **Details:** #### public $receiptData : \YooKassa\Request\Payouts\IncomeReceiptData --- ***Description*** Данные для формирования чека в сервисе Мой налог. Необходимо передавать, если вы делаете выплату [самозанятому](https://yookassa.ru/developers/payouts/scenario-extensions/self-employed). Только для обычных выплат. **Type:** IncomeReceiptData **Details:** #### public $self_employed : \YooKassa\Request\Payouts\PayoutSelfEmployedInfo --- ***Description*** Данные самозанятого, который получит выплату. Необходимо передавать, если вы делаете выплату [самозанятому](https://yookassa.ru/developers/payouts/scenario-extensions/self-employed). Только для обычных выплат. **Type:** PayoutSelfEmployedInfo **Details:** #### public $selfEmployed : \YooKassa\Request\Payouts\PayoutSelfEmployedInfo --- ***Description*** Данные самозанятого, который получит выплату. Необходимо передавать, если вы делаете выплату [самозанятому](https://yookassa.ru/developers/payouts/scenario-extensions/self-employed). Только для обычных выплат. **Type:** PayoutSelfEmployedInfo **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public builder() : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ```php Static public builder() : \YooKassa\Request\Payouts\CreatePayoutRequestBuilder ``` **Summary** Возвращает билдер объектов запросов создания выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** \YooKassa\Request\Payouts\CreatePayoutRequestBuilder - Инстанс билдера объектов запросов #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма выплаты #### public getDeal() : \YooKassa\Model\Deal\PayoutDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PayoutDealInfo|null ``` **Summary** Возвращает сделку, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** \YooKassa\Model\Deal\PayoutDealInfo|null - Сделка, в рамках которой нужно провести выплату #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** string|null - Описание транзакции #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string|null - Последняя произошедшая ошибка валидации #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает данные оплаты установленные мерчантом. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные, привязанные к выплате #### public getPaymentMethodId() : null|string ```php public getPaymentMethodId() : null|string ``` **Summary** Возвращает идентификатор сохраненного способа оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** null|string - Идентификатор сохраненного способа оплаты #### public getPayoutDestinationData() : \YooKassa\Model\Payout\AbstractPayoutDestination|null ```php public getPayoutDestinationData() : \YooKassa\Model\Payout\AbstractPayoutDestination|null ``` **Summary** Возвращает данные для создания метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** \YooKassa\Model\Payout\AbstractPayoutDestination|null - Данные используемые для создания метода оплаты #### public getPayoutToken() : string|null ```php public getPayoutToken() : string|null ``` **Summary** Возвращает токенизированные данные для выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** string|null - Токенизированные данные для выплаты #### public getPersonalData() : \YooKassa\Request\Payouts\PayoutPersonalData[]|\YooKassa\Common\ListObjectInterface ```php public getPersonalData() : \YooKassa\Request\Payouts\PayoutPersonalData[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает персональные данные получателя выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** \YooKassa\Request\Payouts\PayoutPersonalData[]|\YooKassa\Common\ListObjectInterface - Персональные данные получателя выплаты #### public getReceiptData() : null|\YooKassa\Request\Payouts\IncomeReceiptData ```php public getReceiptData() : null|\YooKassa\Request\Payouts\IncomeReceiptData ``` **Summary** Возвращает данные для формирования чека в сервисе Мой налог. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** null|\YooKassa\Request\Payouts\IncomeReceiptData - Данные для формирования чека в сервисе Мой налог #### public getSelfEmployed() : null|\YooKassa\Request\Payouts\PayoutSelfEmployedInfo ```php public getSelfEmployed() : null|\YooKassa\Request\Payouts\PayoutSelfEmployedInfo ``` **Summary** Возвращает данные самозанятого, который получит выплату. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** null|\YooKassa\Request\Payouts\PayoutSelfEmployedInfo - Данные самозанятого, который получит выплату #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasAmount() : bool ```php public hasAmount() : bool ``` **Summary** Проверяет, была ли установлена сумма выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** bool - True если сумма выплаты была установлена, false если нет #### public hasDeal() : bool ```php public hasDeal() : bool ``` **Summary** Проверяет наличие сделки в создаваемой выплате. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** bool - True если сделка есть, false если нет #### public hasDescription() : bool ```php public hasDescription() : bool ``` **Summary** Проверяет наличие описания транзакции в создаваемом платеже. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** bool - True если описание транзакции есть, false если нет #### public hasMetadata() : bool ```php public hasMetadata() : bool ``` **Summary** Проверяет, были ли установлены метаданные выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** bool - True если метаданные были установлены, false если нет #### public hasPaymentMethodId() : bool ```php public hasPaymentMethodId() : bool ``` **Summary** Проверяет наличие идентификатора сохраненного способа оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** bool - True если идентификатора установлен, false если нет #### public hasPayoutDestinationData() : bool ```php public hasPayoutDestinationData() : bool ``` **Summary** Проверяет установлен ли объект с методом оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** bool - True если объект метода оплаты установлен, false если нет #### public hasPayoutToken() : bool ```php public hasPayoutToken() : bool ``` **Summary** Проверяет наличие токенизированных данных для выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** bool - True если токен установлен, false если нет #### public hasPersonalData() : bool ```php public hasPersonalData() : bool ``` **Summary** Проверяет наличие персональных данных в создаваемой выплате. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** bool - True если персональные данные есть, false если нет #### public hasReceiptData() : bool ```php public hasReceiptData() : bool ``` **Summary** Проверяет наличие данных для формирования чека в сервисе Мой налог. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** bool - True если данные для формирования чека есть, false если нет #### public hasSelfEmployed() : bool ```php public hasSelfEmployed() : bool ``` **Summary** Проверяет наличие данных самозанятого в создаваемой выплате. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** bool - True если данные самозанятого есть, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount) : self ``` **Summary** Устанавливает сумму выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма выплаты | **Returns:** self - #### public setDeal() : self ```php public setDeal(\YooKassa\Model\Deal\PayoutDealInfo|array|null $deal) : self ``` **Summary** Устанавливает сделку, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Deal\PayoutDealInfo OR array OR null | deal | Сделка, в рамках которой нужно провести выплату | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание транзакции. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Описание транзакции | **Returns:** self - #### public setMetadata() : $this ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : $this ``` **Summary** Устанавливает метаданные, привязанные к выплате. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Метаданные выплаты, устанавливаемые мерчантом | **Returns:** $this - #### public setPaymentMethodId() : self ```php public setPaymentMethodId(null|string $payment_method_id = null) : self ``` **Summary** Устанавливает идентификатор сохраненного способа оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | payment_method_id | Идентификатор сохраненного способа оплаты | **Returns:** self - #### public setPayoutDestinationData() : self ```php public setPayoutDestinationData(\YooKassa\Model\Payout\AbstractPayoutDestination|array|null $payout_destination_data) : self ``` **Summary** Устанавливает объект с информацией для создания метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\AbstractPayoutDestination OR array OR null | payout_destination_data | Объект создания метода оплаты или null | **Returns:** self - #### public setPayoutToken() : self ```php public setPayoutToken(string|null $payout_token) : self ``` **Summary** Устанавливает токенизированные данные для выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payout_token | Токенизированные данные для выплаты | **Returns:** self - #### public setPersonalData() : self ```php public setPersonalData(\YooKassa\Common\ListObjectInterface|array|null $personal_data = null) : self ``` **Summary** Устанавливает персональные данные получателя выплаты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | personal_data | Персональные данные получателя выплаты | **Returns:** self - #### public setReceiptData() : $this ```php public setReceiptData(\YooKassa\Request\Payouts\IncomeReceiptData|array|null $receipt_data = null) : $this ``` **Summary** Устанавливает данные для формирования чека в сервисе Мой налог. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Payouts\IncomeReceiptData OR array OR null | receipt_data | Данные для формирования чека в сервисе Мой налог | **Returns:** $this - #### public setSelfEmployed() : self ```php public setSelfEmployed(\YooKassa\Request\Payouts\PayoutSelfEmployedInfo|array|null $self_employed = null) : self ``` **Summary** Устанавливает данные самозанятого, который получит выплату. **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Payouts\PayoutSelfEmployedInfo OR array OR null | self_employed | Данные самозанятого, который получит выплату | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public validate() : bool ```php public validate() : bool ``` **Summary** Проверяет на валидность текущий объект **Details:** * Inherited From: [\YooKassa\Request\Payouts\CreatePayoutRequest](../classes/YooKassa-Request-Payouts-CreatePayoutRequest.md) **Returns:** bool - True если объект запроса валиден, false если нет #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setValidationError() : void ```php protected setValidationError(string $value) : void ``` **Summary** Устанавливает ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** void - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md000064400000063372150364342670025635 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\Confirmation\ConfirmationRedirect ### Namespace: [\YooKassa\Model\Payment\Confirmation](../namespaces/yookassa-model-payment-confirmation.md) --- **Summary:** Класс, представляющий модель ConfirmationRedirect. **Description:** Сценарий, при котором необходимо отправить плательщика на веб-страницу ЮKassa или партнера для подтверждения платежа. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$confirmation_url](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md#property_confirmation_url) | | URL на который необходимо перенаправить плательщика для подтверждения оплаты | | public | [$confirmationUrl](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md#property_confirmationUrl) | | URL на который необходимо перенаправить плательщика для подтверждения оплаты | | public | [$enforce](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md#property_enforce) | | Требование принудительного подтверждения платежа покупателем, требование 3-D Secure для оплаты банковскими картами. По умолчанию определяется политикой платежной системы | | public | [$return_url](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md#property_return_url) | | URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера | | public | [$returnUrl](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md#property_returnUrl) | | URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера | | public | [$type](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#property_type) | | Тип подтверждения платежа | | protected | [$_type](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#property__type) | | Тип подтверждения платежа. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getConfirmationData()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationData) | | | | public | [getConfirmationToken()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationToken) | | | | public | [getConfirmationUrl()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationUrl) | | | | public | [getConfirmationUrl()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md#method_getConfirmationUrl) | | Возвращает URL на который необходимо перенаправить плательщика для подтверждения оплаты | | public | [getEnforce()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md#method_getEnforce) | | Возвращает флаг принудительного подтверждения платежа покупателем | | public | [getReturnUrl()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md#method_getReturnUrl) | | Возвращает URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера | | public | [getType()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getType) | | Возвращает тип подтверждения платежа. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setConfirmationUrl()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md#method_setConfirmationUrl) | | Устанавливает URL на который необходимо перенаправить плательщика для подтверждения оплаты | | public | [setEnforce()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md#method_setEnforce) | | Устанавливает флаг принудительного подтверждения платежа покупателем | | public | [setReturnUrl()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md#method_setReturnUrl) | | Устанавливает URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера | | public | [setType()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_setType) | | Устанавливает тип подтверждения платежа | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/Confirmation/ConfirmationRedirect.php](../../lib/Model/Payment/Confirmation/ConfirmationRedirect.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) * \YooKassa\Model\Payment\Confirmation\ConfirmationRedirect * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $confirmation_url : string --- ***Description*** URL на который необходимо перенаправить плательщика для подтверждения оплаты **Type:** string **Details:** #### public $confirmationUrl : string --- ***Description*** URL на который необходимо перенаправить плательщика для подтверждения оплаты **Type:** string **Details:** #### public $enforce : bool --- ***Description*** Требование принудительного подтверждения платежа покупателем, требование 3-D Secure для оплаты банковскими картами. По умолчанию определяется политикой платежной системы **Type:** bool **Details:** #### public $return_url : string --- ***Description*** URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера **Type:** string **Details:** #### public $returnUrl : string --- ***Description*** URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера **Type:** string **Details:** #### public $type : string --- ***Description*** Тип подтверждения платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) #### protected $_type : ?string --- **Summary** Тип подтверждения платежа. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationRedirect](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getConfirmationData() ```php public getConfirmationData() ``` **Description** Для ConfirmationQr **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationToken() ```php public getConfirmationToken() ``` **Description** Для ConfirmationEmbedded **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationUrl() ```php public getConfirmationUrl() ``` **Description** Для ConfirmationRedirect **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationUrl() : string|null ```php public getConfirmationUrl() : string|null ``` **Summary** Возвращает URL на который необходимо перенаправить плательщика для подтверждения оплаты **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationRedirect](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md) **Returns:** string|null - URL на который необходимо перенаправить плательщика для подтверждения оплаты #### public getEnforce() : bool ```php public getEnforce() : bool ``` **Summary** Возвращает флаг принудительного подтверждения платежа покупателем **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationRedirect](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md) **Returns:** bool - Требование принудительного подтверждения платежа покупателем, требование 3-D Secure для оплаты банковскими картами. По умолчанию определяется политикой платежной системы. #### public getReturnUrl() : string|null ```php public getReturnUrl() : string|null ``` **Summary** Возвращает URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationRedirect](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md) **Returns:** string|null - URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера #### public getType() : ?string ```php public getType() : ?string ``` **Summary** Возвращает тип подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** ?string - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setConfirmationUrl() : self ```php public setConfirmationUrl(string|null $confirmation_url = null) : self ``` **Summary** Устанавливает URL на который необходимо перенаправить плательщика для подтверждения оплаты **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationRedirect](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | confirmation_url | URL на который необходимо перенаправить плательщика для подтверждения оплаты | **Returns:** self - #### public setEnforce() : self ```php public setEnforce(bool $enforce) : self ``` **Summary** Устанавливает флаг принудительного подтверждения платежа покупателем **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationRedirect](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | enforce | Требование принудительного подтверждения платежа покупателем, требование 3-D Secure для оплаты банковскими картами. По умолчанию определяется политикой платежной системы. | **Returns:** self - #### public setReturnUrl() : self ```php public setReturnUrl(string|null $return_url = null) : self ``` **Summary** Устанавливает URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationRedirect](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationRedirect.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | return_url | URL на который вернется плательщик после подтверждения или отмены платежа на странице партнера | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип подтверждения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип подтверждения платежа | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md000064400000066140150364342670026051 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodSberLoan ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodSberLoan. **Description:** Оплата с использованием Кредита от СберБанка. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$discount_amount](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md#property_discount_amount) | | Сумма скидки для рассрочки | | public | [$discountAmount](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md#property_discountAmount) | | Сумма скидки для рассрочки | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$loan_option](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md#property_loan_option) | | Тариф кредита | | public | [$loanOption](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md#property_loanOption) | | Тариф кредита | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getDiscountAmount()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md#method_getDiscountAmount) | | Возвращает сумму скидки для рассрочки. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getLoanOption()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md#method_getLoanOption) | | Возвращает тариф кредита. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setDiscountAmount()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md#method_setDiscountAmount) | | Устанавливает сумму скидки для рассрочки. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setLoanOption()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md#method_setLoanOption) | | Устанавливает тариф кредита. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodSberLoan.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodSberLoan.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodSberLoan * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $discount_amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма скидки для рассрочки **Type:** AmountInterface **Details:** #### public $discountAmount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма скидки для рассрочки **Type:** AmountInterface **Details:** #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $loan_option : string --- ***Description*** Тариф кредита **Type:** string **Details:** #### public $loanOption : string --- ***Description*** Тариф кредита **Type:** string **Details:** #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodSberLoan](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getDiscountAmount() : \YooKassa\Model\AmountInterface|null ```php public getDiscountAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму скидки для рассрочки. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodSberLoan](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма скидки для рассрочки #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getLoanOption() : ?string ```php public getLoanOption() : ?string ``` **Summary** Возвращает тариф кредита. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodSberLoan](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md) **Returns:** ?string - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setDiscountAmount() : self ```php public setDiscountAmount(\YooKassa\Model\AmountInterface|array|null $discount_amount = null) : self ``` **Summary** Устанавливает сумму скидки для рассрочки. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodSberLoan](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | discount_amount | Сумма скидки для рассрочки | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setLoanOption() : self ```php public setLoanOption(?string $loan_option) : self ``` **Summary** Устанавливает тариф кредита. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodSberLoan](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberLoan.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?string | loan_option | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-CreateCaptureRequestSerializer.md000064400000005005150364342670025767 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\CreateCaptureRequestSerializer ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель CreateCaptureRequestSerializer. **Description:** Класс объекта осуществляющего сериализацию запроса к API на подтверждение заказа. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [serialize()](../classes/YooKassa-Request-Payments-CreateCaptureRequestSerializer.md#method_serialize) | | Сериализует объект запроса к API на подтверждение заказа в ассоциативный массив. | --- ### Details * File: [lib/Request/Payments/CreateCaptureRequestSerializer.php](../../lib/Request/Payments/CreateCaptureRequestSerializer.php) * Package: YooKassa\Request * Class Hierarchy: * \YooKassa\Request\Payments\CreateCaptureRequestSerializer * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public serialize() : array ```php public serialize(\YooKassa\Request\Payments\CreateCaptureRequestInterface $request) : array ``` **Summary** Сериализует объект запроса к API на подтверждение заказа в ассоциативный массив. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequestSerializer](../classes/YooKassa-Request-Payments-CreateCaptureRequestSerializer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Payments\CreateCaptureRequestInterface | request | Сериализуемый объект запроса | **Returns:** array - Ассоциативный массив содержащий информацию для отправки в API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberbank.md000064400000066675150364342670026110 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodSberbank ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodSberbank. **Description:** Оплата через SberPay. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$card](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md#property_card) | | Данные банковской карты | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$phone](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberbank.md#property_phone) | | Телефон пользователя, на который зарегистрирован аккаунт в SberPay. Указывается в формате [ITU-T E.164](https://ru.wikipedia.org/wiki/E.164), например ~`79000000000`. | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_card](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md#property__card) | | | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberbank.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCard()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md#method_getCard) | | Возвращает данные банковской карты. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getPhone()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberbank.md#method_getPhone) | | Возвращает номер телефона в формате ITU-T E.164. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCard()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md#method_setCard) | | Устанавливает данные банковской карты. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setPhone()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberbank.md#method_setPhone) | | Устанавливает номер телефона в формате ITU-T E.164. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodSberbank.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodSberbank.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodBankCard](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodSberbank * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $card : string --- ***Description*** Данные банковской карты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodBankCard](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md) #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $phone : string --- ***Description*** Телефон пользователя, на который зарегистрирован аккаунт в SberPay. Указывается в формате [ITU-T E.164](https://ru.wikipedia.org/wiki/E.164), например ~`79000000000`. **Type:** string **Details:** #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_card : ?\YooKassa\Model\Payment\PaymentMethod\BankCard --- **Type:** BankCard Данные банковской карты **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodBankCard](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodSberbank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberbank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCard() : \YooKassa\Model\Payment\PaymentMethod\BankCard|null ```php public getCard() : \YooKassa\Model\Payment\PaymentMethod\BankCard|null ``` **Summary** Возвращает данные банковской карты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodBankCard](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md) **Returns:** \YooKassa\Model\Payment\PaymentMethod\BankCard|null - Данные банковской карты #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getPhone() : string|null ```php public getPhone() : string|null ``` **Summary** Возвращает номер телефона в формате ITU-T E.164. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodSberbank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberbank.md) **Returns:** string|null - Номер телефона в формате ITU-T E.164 #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCard() : self ```php public setCard(\YooKassa\Model\Payment\PaymentMethod\BankCard|array|null $card) : self ``` **Summary** Устанавливает данные банковской карты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodBankCard](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\PaymentMethod\BankCard OR array OR null | card | Данные банковской карты | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setPhone() : self ```php public setPhone(string|null $phone) : self ``` **Summary** Устанавливает номер телефона в формате ITU-T E.164. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodSberbank](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSberbank.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | phone | Номер телефона в формате ITU-T E.164 | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-JsonException.md000064400000003733150364342670022554 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\JsonException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$errorLabels](../classes/YooKassa-Common-Exceptions-JsonException.md#property_errorLabels) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-JsonException.md#method___construct) | | | --- ### Details * File: [lib/Common/Exceptions/JsonException.php](../../lib/Common/Exceptions/JsonException.php) * Package: Default * Class Hierarchy: * [\UnexpectedValueException](\UnexpectedValueException) * \YooKassa\Common\Exceptions\JsonException --- ## Properties #### public $errorLabels : array --- **Type:** array **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(mixed $message = '', mixed $code, mixed $previous = null) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\JsonException](../classes/YooKassa-Common-Exceptions-JsonException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | message | | | mixed | code | | | mixed | previous | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentsResponse.md000064400000045035150364342670023163 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentsResponse ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель PaymentsResponse. **Description:** Класс объекта ответа от API со списком платежей магазина. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$items](../classes/YooKassa-Request-Payments-PaymentsResponse.md#property_items) | | Массив платежей | | public | [$nextCursor](../classes/YooKassa-Request-AbstractListResponse.md#property_nextCursor) | | Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. | | public | [$type](../classes/YooKassa-Request-AbstractListResponse.md#property_type) | | Формат выдачи результатов запроса. Возможное значение: `list` (список). | | protected | [$_items](../classes/YooKassa-Request-Payments-PaymentsResponse.md#property__items) | | | | protected | [$_next_cursor](../classes/YooKassa-Request-AbstractListResponse.md#property__next_cursor) | | Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. | | protected | [$_type](../classes/YooKassa-Request-AbstractListResponse.md#property__type) | | Формат выдачи результатов запроса. Возможное значение: `list` (список). | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getItems()](../classes/YooKassa-Request-Payments-PaymentsResponse.md#method_getItems) | | Возвращает список платежей. | | public | [getNextCursor()](../classes/YooKassa-Request-AbstractListResponse.md#method_getNextCursor) | | Возвращает токен следующей страницы, если он задан, или null. | | public | [getType()](../classes/YooKassa-Request-AbstractListResponse.md#method_getType) | | Возвращает формат выдачи результатов запроса. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasNextCursor()](../classes/YooKassa-Request-AbstractListResponse.md#method_hasNextCursor) | | Проверяет, имеется ли в ответе токен следующей страницы. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentsResponse.php](../../lib/Request/Payments/PaymentsResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) * \YooKassa\Request\Payments\PaymentsResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $items : \YooKassa\Model\Payment\PaymentInterface[]|\YooKassa\Common\ListObjectInterface|null --- ***Description*** Массив платежей **Type:** ListObjectInterface|null **Details:** #### public $nextCursor : string --- ***Description*** Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### public $type : string --- ***Description*** Формат выдачи результатов запроса. Возможное значение: `list` (список). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### protected $_items : ?\YooKassa\Common\ListObject --- **Type:** ListObject Массив платежей **Details:** #### protected $_next_cursor : ?string --- **Summary** Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### protected $_type : string --- **Summary** Формат выдачи результатов запроса. Возможное значение: `list` (список). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getItems() : \YooKassa\Model\Payment\PaymentInterface[]|\YooKassa\Common\ListObjectInterface ```php public getItems() : \YooKassa\Model\Payment\PaymentInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список платежей. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsResponse](../classes/YooKassa-Request-Payments-PaymentsResponse.md) **Returns:** \YooKassa\Model\Payment\PaymentInterface[]|\YooKassa\Common\ListObjectInterface - Список платежей #### public getNextCursor() : null|string ```php public getNextCursor() : null|string ``` **Summary** Возвращает токен следующей страницы, если он задан, или null. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** null|string - Токен следующей страницы #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает формат выдачи результатов запроса. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasNextCursor() : bool ```php public hasNextCursor() : bool ``` **Summary** Проверяет, имеется ли в ответе токен следующей страницы. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** bool - True если токен следующей страницы есть, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Notification-NotificationPayoutSucceeded.md000064400000055620150364342670025540 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Notification\NotificationPayoutSucceeded ### Namespace: [\YooKassa\Model\Notification](../namespaces/yookassa-model-notification.md) --- **Summary:** Класс объекта, присылаемого API при изменении статуса выплаты на "succeeded". --- ### Examples Пример скрипта обработки уведомления ```php require_once '../vendor/autoload.php'; try { $source = file_get_contents('php://input'); $data = json_decode($source, true); $factory = new \YooKassa\Model\Notification\NotificationFactory(); $notificationObject = $factory->factory($data); $responseObject = $notificationObject->getObject(); $client = new \YooKassa\Client(); if (!$client->isNotificationIPTrusted($_SERVER['REMOTE_ADDR'])) { header('HTTP/1.1 400 Something went wrong'); exit; } if (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_CANCELED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::REFUND_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'refundId' => $responseObject->getId(), 'refundStatus' => $responseObject->getStatus(), 'paymentId' => $responseObject->getPaymentId(), ]; // ... // Специфичная логика } else { header('HTTP/1.1 400 Something went wrong'); exit; } // Специфичная логика // ... $client->setAuth('xxxxxx', 'test_XXXXXXX'); // Получим актуальную информацию о платеже if ($paymentInfo = $client->getPaymentInfo($someData['paymentId'])) { $paymentStatus = $paymentInfo->getStatus(); // Специфичная логика // ... } else { header('HTTP/1.1 400 Something went wrong'); exit; } } catch (Exception $e) { header('HTTP/1.1 400 Something went wrong'); exit; } ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_event) | | Тип события | | public | [$object](../classes/YooKassa-Model-Notification-NotificationPayoutSucceeded.md#property_object) | | Объект с информацией о выплате | | public | [$type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_type) | | Тип уведомления в виде строки | | protected | [$_event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__event) | | | | protected | [$_type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Model-Notification-NotificationPayoutSucceeded.md#method_fromArray) | | Конструктор объекта нотификации. | | public | [getEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getEvent) | | Возвращает тип события. | | public | [getObject()](../classes/YooKassa-Model-Notification-NotificationPayoutSucceeded.md#method_getObject) | | Возвращает объект с информацией о выплате, уведомление о которой хранится в текущем объекте. | | public | [getType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getType) | | Возвращает тип уведомления. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setObject()](../classes/YooKassa-Model-Notification-NotificationPayoutSucceeded.md#method_setObject) | | Устанавливает объект с информацией о выплате, уведомление о которой хранится в текущем объекте. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setEvent) | | Устанавливает тип события. | | protected | [setType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setType) | | Устанавливает тип уведомления. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Notification/NotificationPayoutSucceeded.php](../../lib/Model/Notification/NotificationPayoutSucceeded.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) * \YooKassa\Model\Notification\NotificationPayoutSucceeded * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $event : string --- ***Description*** Тип события **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### public $object : \YooKassa\Model\Payout\PayoutInterface --- ***Description*** Объект с информацией о выплате **Type:** PayoutInterface **Details:** #### public $type : string --- ***Description*** Тип уведомления в виде строки **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### protected $_event : ?string --- **Type:** ?string Тип произошедшего события **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### protected $_type : ?string --- **Type:** ?string Тип уведомления **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array $sourceArray) : void ``` **Summary** Конструктор объекта нотификации. **Description** Инициализирует текущий объект из ассоциативного массива, который просто путём JSON десериализации получен из тела пришедшего запроса. При конструировании проверяется валидность типа передаваемого уведомления, если передать уведомление не того типа, будет сгенерировано исключение типа {@link} **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationPayoutSucceeded](../classes/YooKassa-Model-Notification-NotificationPayoutSucceeded.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | sourceArray | Ассоциативный массив с информацией об уведомлении | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если значение типа нотификации или события не равны "notification" и "payout.succeeded" соответственно, что может говорить о том, что переданные в конструктор данные не являются уведомлением нужного типа. | **Returns:** void - #### public getEvent() : string|null ```php public getEvent() : string|null ``` **Summary** Возвращает тип события. **Description** Тип события - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип события #### public getObject() : \YooKassa\Model\Payout\PayoutInterface ```php public getObject() : \YooKassa\Model\Payout\PayoutInterface ``` **Summary** Возвращает объект с информацией о выплате, уведомление о которой хранится в текущем объекте. **Description** Так как нотификация может быть сгенерирована и поставлена в очередь на отправку гораздо раньше, чем она будет получена на сайте, то опираться на статус пришедшей выплаты не стоит, лучше запросить текущую информацию о выплате у API. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationPayoutSucceeded](../classes/YooKassa-Model-Notification-NotificationPayoutSucceeded.md) **Returns:** \YooKassa\Model\Payout\PayoutInterface - Объект с информацией о выплате #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип уведомления. **Description** Тип уведомления - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип уведомления в виде строки #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setObject() : self ```php public setObject(\YooKassa\Model\Payout\PayoutInterface|array $object) : self ``` **Summary** Устанавливает объект с информацией о выплате, уведомление о которой хранится в текущем объекте. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationPayoutSucceeded](../classes/YooKassa-Model-Notification-NotificationPayoutSucceeded.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\PayoutInterface OR array | object | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setEvent() : self ```php protected setEvent(string|null $event) : self ``` **Summary** Устанавливает тип события. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | event | Тип события | **Returns:** self - #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип уведомления. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип уведомления | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataYooMoney.md000064400000034455150364342670025763 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataYooMoney ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentMethodDataYooMoney. **Description:** Данные для проведения оплаты через ЮMoney. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataYooMoney.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataYooMoney.php](../../lib/Request/Payments/PaymentData/PaymentDataYooMoney.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataYooMoney * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) #### protected $_type : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataYooMoney](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataYooMoney.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payouts-CreatePayoutResponse.md000064400000135035150364342670023634 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payouts\CreatePayoutResponse ### Namespace: [\YooKassa\Request\Payouts](../namespaces/yookassa-request-payouts.md) --- **Summary:** Класс, представляющий CreatePayoutResponse. **Description:** Класс объекта ответа возвращаемого API при запросе на создание выплаты. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Payout-Payout.md#constant_MAX_LENGTH_DESCRIPTION) | | | | public | [MAX_LENGTH_ID](../classes/YooKassa-Model-Payout-Payout.md#constant_MAX_LENGTH_ID) | | | | public | [MIN_LENGTH_ID](../classes/YooKassa-Model-Payout-Payout.md#constant_MIN_LENGTH_ID) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Payout-Payout.md#property_amount) | | Сумма выплаты | | public | [$cancellation_details](../classes/YooKassa-Model-Payout-Payout.md#property_cancellation_details) | | Комментарий к отмене выплаты | | public | [$cancellationDetails](../classes/YooKassa-Model-Payout-Payout.md#property_cancellationDetails) | | Комментарий к отмене выплаты | | public | [$created_at](../classes/YooKassa-Model-Payout-Payout.md#property_created_at) | | Время создания заказа | | public | [$createdAt](../classes/YooKassa-Model-Payout-Payout.md#property_createdAt) | | Время создания заказа | | public | [$deal](../classes/YooKassa-Model-Payout-Payout.md#property_deal) | | Сделка, в рамках которой нужно провести выплату | | public | [$description](../classes/YooKassa-Model-Payout-Payout.md#property_description) | | Описание транзакции | | public | [$id](../classes/YooKassa-Model-Payout-Payout.md#property_id) | | Идентификатор выплаты | | public | [$metadata](../classes/YooKassa-Model-Payout-Payout.md#property_metadata) | | Метаданные выплаты указанные мерчантом | | public | [$payout_destination](../classes/YooKassa-Model-Payout-Payout.md#property_payout_destination) | | Способ проведения выплаты | | public | [$payoutDestination](../classes/YooKassa-Model-Payout-Payout.md#property_payoutDestination) | | Способ проведения выплаты | | public | [$receipt](../classes/YooKassa-Model-Payout-Payout.md#property_receipt) | | Данные чека, зарегистрированного в ФНС | | public | [$self_employed](../classes/YooKassa-Model-Payout-Payout.md#property_self_employed) | | Данные самозанятого, который получит выплату | | public | [$selfEmployed](../classes/YooKassa-Model-Payout-Payout.md#property_selfEmployed) | | Данные самозанятого, который получит выплату | | public | [$status](../classes/YooKassa-Model-Payout-Payout.md#property_status) | | Текущее состояние выплаты | | public | [$test](../classes/YooKassa-Model-Payout-Payout.md#property_test) | | Признак тестовой операции | | protected | [$_amount](../classes/YooKassa-Model-Payout-Payout.md#property__amount) | | Сумма выплаты | | protected | [$_cancellation_details](../classes/YooKassa-Model-Payout-Payout.md#property__cancellation_details) | | Комментарий к статусу canceled: кто отменил выплаты и по какой причине | | protected | [$_created_at](../classes/YooKassa-Model-Payout-Payout.md#property__created_at) | | Время создания выплаты. Пример: ~`2017-11-03T11:52:31.827Z` | | protected | [$_deal](../classes/YooKassa-Model-Payout-Payout.md#property__deal) | | Сделка, в рамках которой нужно провести выплату. Присутствует, если вы проводите Безопасную сделку | | protected | [$_description](../classes/YooKassa-Model-Payout-Payout.md#property__description) | | Описание транзакции (не более 128 символов). Например: «Выплата по договору 37». | | protected | [$_id](../classes/YooKassa-Model-Payout-Payout.md#property__id) | | Идентификатор выплаты. | | protected | [$_metadata](../classes/YooKassa-Model-Payout-Payout.md#property__metadata) | | Метаданные выплаты указанные мерчантом | | protected | [$_payout_destination](../classes/YooKassa-Model-Payout-Payout.md#property__payout_destination) | | Способ проведения выплаты | | protected | [$_receipt](../classes/YooKassa-Model-Payout-Payout.md#property__receipt) | | Данные чека, зарегистрированного в ФНС. Присутствует, если вы делаете выплату самозанятому. | | protected | [$_self_employed](../classes/YooKassa-Model-Payout-Payout.md#property__self_employed) | | Данные самозанятого, который получит выплату. Присутствует, если вы делаете выплату самозанятому | | protected | [$_status](../classes/YooKassa-Model-Payout-Payout.md#property__status) | | Текущее состояние выплаты | | protected | [$_test](../classes/YooKassa-Model-Payout-Payout.md#property__test) | | Признак тестовой операции | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Payout-Payout.md#method_getAmount) | | Возвращает сумму. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Payout-Payout.md#method_getCancellationDetails) | | Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [getCreatedAt()](../classes/YooKassa-Model-Payout-Payout.md#method_getCreatedAt) | | Возвращает время создания заказа. | | public | [getDeal()](../classes/YooKassa-Model-Payout-Payout.md#method_getDeal) | | Возвращает сделку, в рамках которой нужно провести выплату. | | public | [getDescription()](../classes/YooKassa-Model-Payout-Payout.md#method_getDescription) | | Возвращает описание транзакции. | | public | [getId()](../classes/YooKassa-Model-Payout-Payout.md#method_getId) | | Возвращает идентификатор выплаты. | | public | [getMetadata()](../classes/YooKassa-Model-Payout-Payout.md#method_getMetadata) | | Возвращает метаданные выплаты установленные мерчантом | | public | [getPayoutDestination()](../classes/YooKassa-Model-Payout-Payout.md#method_getPayoutDestination) | | Возвращает используемый способ проведения выплаты. | | public | [getReceipt()](../classes/YooKassa-Model-Payout-Payout.md#method_getReceipt) | | Возвращает данные чека, зарегистрированного в ФНС. | | public | [getSelfEmployed()](../classes/YooKassa-Model-Payout-Payout.md#method_getSelfEmployed) | | Возвращает данные самозанятого, который получит выплату. | | public | [getStatus()](../classes/YooKassa-Model-Payout-Payout.md#method_getStatus) | | Возвращает состояние выплаты. | | public | [getTest()](../classes/YooKassa-Model-Payout-Payout.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Payout-Payout.md#method_setAmount) | | Устанавливает сумму выплаты. | | public | [setCancellationDetails()](../classes/YooKassa-Model-Payout-Payout.md#method_setCancellationDetails) | | Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [setCreatedAt()](../classes/YooKassa-Model-Payout-Payout.md#method_setCreatedAt) | | Устанавливает время создания заказа. | | public | [setDeal()](../classes/YooKassa-Model-Payout-Payout.md#method_setDeal) | | Устанавливает сделку, в рамках которой нужно провести выплату. | | public | [setDescription()](../classes/YooKassa-Model-Payout-Payout.md#method_setDescription) | | Устанавливает описание транзакции | | public | [setId()](../classes/YooKassa-Model-Payout-Payout.md#method_setId) | | Устанавливает идентификатор выплаты. | | public | [setMetadata()](../classes/YooKassa-Model-Payout-Payout.md#method_setMetadata) | | Устанавливает метаданные выплаты. | | public | [setPayoutDestination()](../classes/YooKassa-Model-Payout-Payout.md#method_setPayoutDestination) | | Устанавливает используемый способ проведения выплаты. | | public | [setReceipt()](../classes/YooKassa-Model-Payout-Payout.md#method_setReceipt) | | Устанавливает данные чека, зарегистрированного в ФНС. | | public | [setSelfEmployed()](../classes/YooKassa-Model-Payout-Payout.md#method_setSelfEmployed) | | Устанавливает данные самозанятого, который получит выплату. | | public | [setStatus()](../classes/YooKassa-Model-Payout-Payout.md#method_setStatus) | | Устанавливает статус выплаты | | public | [setTest()](../classes/YooKassa-Model-Payout-Payout.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payouts/CreatePayoutResponse.php](../../lib/Request/Payouts/CreatePayoutResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) * [\YooKassa\Request\Payouts\AbstractPayoutResponse](../classes/YooKassa-Request-Payouts-AbstractPayoutResponse.md) * \YooKassa\Request\Payouts\CreatePayoutResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Inherited from [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ```php MAX_LENGTH_DESCRIPTION = 128 : int ``` ###### MAX_LENGTH_ID Inherited from [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ```php MAX_LENGTH_ID = 50 : int ``` ###### MIN_LENGTH_ID Inherited from [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ```php MIN_LENGTH_ID = 36 : int ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма выплаты **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $cancellation_details : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене выплаты **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $cancellationDetails : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене выплаты **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $created_at : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $createdAt : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $deal : \YooKassa\Model\Deal\PayoutDealInfo --- ***Description*** Сделка, в рамках которой нужно провести выплату **Type:** PayoutDealInfo **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $description : string --- ***Description*** Описание транзакции **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $id : string --- ***Description*** Идентификатор выплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные выплаты указанные мерчантом **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $payout_destination : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения выплаты **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $payoutDestination : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения выплаты **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $receipt : \YooKassa\Model\Payout\IncomeReceipt --- ***Description*** Данные чека, зарегистрированного в ФНС **Type:** IncomeReceipt **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $self_employed : \YooKassa\Model\Payout\PayoutSelfEmployed --- ***Description*** Данные самозанятого, который получит выплату **Type:** PayoutSelfEmployed **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $selfEmployed : \YooKassa\Model\Payout\PayoutSelfEmployed --- ***Description*** Данные самозанятого, который получит выплату **Type:** PayoutSelfEmployed **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $status : string --- ***Description*** Текущее состояние выплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $test : bool --- ***Description*** Признак тестовой операции **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Summary** Сумма выплаты **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_cancellation_details : ?\YooKassa\Model\Payout\PayoutCancellationDetails --- **Summary** Комментарий к статусу canceled: кто отменил выплаты и по какой причине **Type:** PayoutCancellationDetails **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_created_at : ?\DateTime --- **Summary** Время создания выплаты. Пример: ~`2017-11-03T11:52:31.827Z` **Type:** DateTime **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_deal : ?\YooKassa\Model\Deal\PayoutDealInfo --- **Summary** Сделка, в рамках которой нужно провести выплату. Присутствует, если вы проводите Безопасную сделку **Type:** PayoutDealInfo **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_description : ?string --- **Summary** Описание транзакции (не более 128 символов). Например: «Выплата по договору 37». **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_id : ?string --- **Summary** Идентификатор выплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Summary** Метаданные выплаты указанные мерчантом **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_payout_destination : ?\YooKassa\Model\Payout\AbstractPayoutDestination --- **Summary** Способ проведения выплаты **Type:** AbstractPayoutDestination **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_receipt : ?\YooKassa\Model\Payout\IncomeReceipt --- **Summary** Данные чека, зарегистрированного в ФНС. Присутствует, если вы делаете выплату самозанятому. **Type:** IncomeReceipt **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_self_employed : ?\YooKassa\Model\Payout\PayoutSelfEmployed --- **Summary** Данные самозанятого, который получит выплату. Присутствует, если вы делаете выплату самозанятому **Type:** PayoutSelfEmployed **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_status : ?string --- **Summary** Текущее состояние выплаты **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_test : ?bool --- **Summary** Признак тестовой операции **Type:** ?bool **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма выплаты #### public getCancellationDetails() : \YooKassa\Model\Payout\PayoutCancellationDetails|null ```php public getCancellationDetails() : \YooKassa\Model\Payout\PayoutCancellationDetails|null ``` **Summary** Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\PayoutCancellationDetails|null - Комментарий к статусу canceled #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \DateTime|null - Время создания заказа #### public getDeal() : \YooKassa\Model\Deal\PayoutDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PayoutDealInfo|null ``` **Summary** Возвращает сделку, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Deal\PayoutDealInfo|null - Сделка, в рамках которой нужно провести выплату #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** string|null - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** string|null - Идентификатор выплаты #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает метаданные выплаты установленные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные выплаты указанные мерчантом #### public getPayoutDestination() : \YooKassa\Model\Payout\AbstractPayoutDestination|null ```php public getPayoutDestination() : \YooKassa\Model\Payout\AbstractPayoutDestination|null ``` **Summary** Возвращает используемый способ проведения выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\AbstractPayoutDestination|null - Способ проведения выплаты #### public getReceipt() : \YooKassa\Model\Payout\IncomeReceipt|null ```php public getReceipt() : \YooKassa\Model\Payout\IncomeReceipt|null ``` **Summary** Возвращает данные чека, зарегистрированного в ФНС. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\IncomeReceipt|null - Данные чека, зарегистрированного в ФНС #### public getSelfEmployed() : \YooKassa\Model\Payout\PayoutSelfEmployed|null ```php public getSelfEmployed() : \YooKassa\Model\Payout\PayoutSelfEmployed|null ``` **Summary** Возвращает данные самозанятого, который получит выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\PayoutSelfEmployed|null - Данные самозанятого, который получит выплату #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает состояние выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** string|null - Текущее состояние выплаты #### public getTest() : bool|null ```php public getTest() : bool|null ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** bool|null - Признак тестовой операции #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма выплаты | **Returns:** self - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\Payout\PayoutCancellationDetails|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\PayoutCancellationDetails OR array OR null | cancellation_details | Комментарий к статусу canceled | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания выплаты. Пример: ~`2017-11-03T11:52:31.827Z` | **Returns:** self - #### public setDeal() : self ```php public setDeal(\YooKassa\Model\Deal\PayoutDealInfo|array|null $deal = null) : self ``` **Summary** Устанавливает сделку, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Deal\PayoutDealInfo OR array OR null | deal | Сделка, в рамках которой нужно провести выплату | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Описание транзакции (не более 128 символов). Например: «Выплата по договору 37». | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор выплаты | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает метаданные выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Метаданные выплаты указанные мерчантом | **Returns:** self - #### public setPayoutDestination() : $this ```php public setPayoutDestination(\YooKassa\Model\Payout\AbstractPayoutDestination|array|null $payout_destination) : $this ``` **Summary** Устанавливает используемый способ проведения выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\AbstractPayoutDestination OR array OR null | payout_destination | Способ проведения выплаты | **Returns:** $this - #### public setReceipt() : self ```php public setReceipt(\YooKassa\Model\Payout\IncomeReceipt|array|null $receipt = null) : self ``` **Summary** Устанавливает данные чека, зарегистрированного в ФНС. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\IncomeReceipt OR array OR null | receipt | Данные чека, зарегистрированного в ФНС | **Returns:** self - #### public setSelfEmployed() : self ```php public setSelfEmployed(\YooKassa\Model\Payout\PayoutSelfEmployed|array|null $self_employed = null) : self ``` **Summary** Устанавливает данные самозанятого, который получит выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\PayoutSelfEmployed OR array OR null | self_employed | Данные самозанятого, который получит выплату | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус выплаты **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус выплаты | **Returns:** self - #### public setTest() : self ```php public setTest(bool|null $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | test | Признак тестовой операции | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-IndustryDetails.md000064400000055477150364342670022211 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\IndustryDetails ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Class IndustryDetails. **Description:** Данные отраслевого реквизита --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [DOCUMENT_NUMBER_MAX_LENGTH](../classes/YooKassa-Model-Receipt-IndustryDetails.md#constant_DOCUMENT_NUMBER_MAX_LENGTH) | | | | public | [VALUE_MAX_LENGTH](../classes/YooKassa-Model-Receipt-IndustryDetails.md#constant_VALUE_MAX_LENGTH) | | | | public | [DOCUMENT_DATE_FORMAT](../classes/YooKassa-Model-Receipt-IndustryDetails.md#constant_DOCUMENT_DATE_FORMAT) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$document_date](../classes/YooKassa-Model-Receipt-IndustryDetails.md#property_document_date) | | Дата документа основания (тег в 54 ФЗ — 1263) | | public | [$document_number](../classes/YooKassa-Model-Receipt-IndustryDetails.md#property_document_number) | | Номер нормативного акта федерального органа исполнительной власти (тег в 54 ФЗ — 1264) | | public | [$documentDate](../classes/YooKassa-Model-Receipt-IndustryDetails.md#property_documentDate) | | Дата документа основания (тег в 54 ФЗ — 1263) | | public | [$documentNumber](../classes/YooKassa-Model-Receipt-IndustryDetails.md#property_documentNumber) | | Номер нормативного акта федерального органа исполнительной власти (тег в 54 ФЗ — 1264) | | public | [$federal_id](../classes/YooKassa-Model-Receipt-IndustryDetails.md#property_federal_id) | | Идентификатор федерального органа исполнительной власти (тег в 54 ФЗ — 1262) | | public | [$federalId](../classes/YooKassa-Model-Receipt-IndustryDetails.md#property_federalId) | | Идентификатор федерального органа исполнительной власти (тег в 54 ФЗ — 1262) | | public | [$value](../classes/YooKassa-Model-Receipt-IndustryDetails.md#property_value) | | Значение отраслевого реквизита (тег в 54 ФЗ — 1265) | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getDocumentDate()](../classes/YooKassa-Model-Receipt-IndustryDetails.md#method_getDocumentDate) | | Возвращает дату документа основания. | | public | [getDocumentNumber()](../classes/YooKassa-Model-Receipt-IndustryDetails.md#method_getDocumentNumber) | | Возвращает номер нормативного акта федерального органа исполнительной власти. | | public | [getFederalId()](../classes/YooKassa-Model-Receipt-IndustryDetails.md#method_getFederalId) | | Возвращает идентификатор федерального органа исполнительной власти. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [getValue()](../classes/YooKassa-Model-Receipt-IndustryDetails.md#method_getValue) | | Возвращает значение отраслевого реквизита. | | public | [jsonSerialize()](../classes/YooKassa-Model-Receipt-IndustryDetails.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setDocumentDate()](../classes/YooKassa-Model-Receipt-IndustryDetails.md#method_setDocumentDate) | | Устанавливает дату документа основания. | | public | [setDocumentNumber()](../classes/YooKassa-Model-Receipt-IndustryDetails.md#method_setDocumentNumber) | | Устанавливает номер нормативного акта федерального органа исполнительной власти. | | public | [setFederalId()](../classes/YooKassa-Model-Receipt-IndustryDetails.md#method_setFederalId) | | Устанавливает идентификатор федерального органа исполнительной власти. | | public | [setValue()](../classes/YooKassa-Model-Receipt-IndustryDetails.md#method_setValue) | | Устанавливает значение отраслевого реквизита. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Receipt/IndustryDetails.php](../../lib/Model/Receipt/IndustryDetails.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Receipt\IndustryDetails * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### DOCUMENT_NUMBER_MAX_LENGTH ```php DOCUMENT_NUMBER_MAX_LENGTH = 32 : int ``` ###### VALUE_MAX_LENGTH ```php VALUE_MAX_LENGTH = 256 : int ``` ###### DOCUMENT_DATE_FORMAT ```php DOCUMENT_DATE_FORMAT = 'Y-m-d' : string ``` --- ## Properties #### public $document_date : \DateTime --- ***Description*** Дата документа основания (тег в 54 ФЗ — 1263) **Type:** \DateTime **Details:** #### public $document_number : string --- ***Description*** Номер нормативного акта федерального органа исполнительной власти (тег в 54 ФЗ — 1264) **Type:** string **Details:** #### public $documentDate : \DateTime --- ***Description*** Дата документа основания (тег в 54 ФЗ — 1263) **Type:** \DateTime **Details:** #### public $documentNumber : string --- ***Description*** Номер нормативного акта федерального органа исполнительной власти (тег в 54 ФЗ — 1264) **Type:** string **Details:** #### public $federal_id : string --- ***Description*** Идентификатор федерального органа исполнительной власти (тег в 54 ФЗ — 1262) **Type:** string **Details:** #### public $federalId : string --- ***Description*** Идентификатор федерального органа исполнительной власти (тег в 54 ФЗ — 1262) **Type:** string **Details:** #### public $value : string --- ***Description*** Значение отраслевого реквизита (тег в 54 ФЗ — 1265) **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getDocumentDate() : \DateTime|null ```php public getDocumentDate() : \DateTime|null ``` **Summary** Возвращает дату документа основания. **Details:** * Inherited From: [\YooKassa\Model\Receipt\IndustryDetails](../classes/YooKassa-Model-Receipt-IndustryDetails.md) **Returns:** \DateTime|null - Дата документа основания #### public getDocumentNumber() : string|null ```php public getDocumentNumber() : string|null ``` **Summary** Возвращает номер нормативного акта федерального органа исполнительной власти. **Details:** * Inherited From: [\YooKassa\Model\Receipt\IndustryDetails](../classes/YooKassa-Model-Receipt-IndustryDetails.md) **Returns:** string|null - Номер нормативного акта федерального органа исполнительной власти #### public getFederalId() : string|null ```php public getFederalId() : string|null ``` **Summary** Возвращает идентификатор федерального органа исполнительной власти. **Details:** * Inherited From: [\YooKassa\Model\Receipt\IndustryDetails](../classes/YooKassa-Model-Receipt-IndustryDetails.md) **Returns:** string|null - Идентификатор федерального органа исполнительной власти #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public getValue() : string|null ```php public getValue() : string|null ``` **Summary** Возвращает значение отраслевого реквизита. **Details:** * Inherited From: [\YooKassa\Model\Receipt\IndustryDetails](../classes/YooKassa-Model-Receipt-IndustryDetails.md) **Returns:** string|null - Значение отраслевого реквизита #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Model\Receipt\IndustryDetails](../classes/YooKassa-Model-Receipt-IndustryDetails.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setDocumentDate() : \YooKassa\Model\Receipt\IndustryDetails ```php public setDocumentDate(\DateTime|string|null $document_date = null) : \YooKassa\Model\Receipt\IndustryDetails ``` **Summary** Устанавливает дату документа основания. **Details:** * Inherited From: [\YooKassa\Model\Receipt\IndustryDetails](../classes/YooKassa-Model-Receipt-IndustryDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | document_date | Дата документа основания | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** \YooKassa\Model\Receipt\IndustryDetails - #### public setDocumentNumber() : self ```php public setDocumentNumber(string|null $document_number = null) : self ``` **Summary** Устанавливает номер нормативного акта федерального органа исполнительной власти. **Details:** * Inherited From: [\YooKassa\Model\Receipt\IndustryDetails](../classes/YooKassa-Model-Receipt-IndustryDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | document_number | Номер нормативного акта федерального органа исполнительной власти | **Returns:** self - #### public setFederalId() : \YooKassa\Model\Receipt\IndustryDetails ```php public setFederalId(string|null $federal_id = null) : \YooKassa\Model\Receipt\IndustryDetails ``` **Summary** Устанавливает идентификатор федерального органа исполнительной власти. **Details:** * Inherited From: [\YooKassa\Model\Receipt\IndustryDetails](../classes/YooKassa-Model-Receipt-IndustryDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | federal_id | Идентификатор федерального органа исполнительной власти | **Returns:** \YooKassa\Model\Receipt\IndustryDetails - #### public setValue() : \YooKassa\Model\Receipt\IndustryDetails ```php public setValue(string|null $value = null) : \YooKassa\Model\Receipt\IndustryDetails ``` **Summary** Устанавливает значение отраслевого реквизита. **Details:** * Inherited From: [\YooKassa\Model\Receipt\IndustryDetails](../classes/YooKassa-Model-Receipt-IndustryDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Значение отраслевого реквизита | **Returns:** \YooKassa\Model\Receipt\IndustryDetails - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Refunds-CreateRefundResponse.md000064400000114461150364342670023540 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Refunds\CreateRefundResponse ### Namespace: [\YooKassa\Request\Refunds](../namespaces/yookassa-request-refunds.md) --- **Summary:** Класс, представляющий модель CreateRefundResponse. **Description:** Класс объекта ответа от API при создании нового возврата. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Refund-Refund.md#constant_MAX_LENGTH_DESCRIPTION) | | Максимальная длина строки описания возврата | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Refund-Refund.md#property_amount) | | Сумма возврата | | public | [$cancellation_details](../classes/YooKassa-Model-Refund-Refund.md#property_cancellation_details) | | Комментарий к статусу `canceled` | | public | [$cancellationDetails](../classes/YooKassa-Model-Refund-Refund.md#property_cancellationDetails) | | Комментарий к статусу `canceled` | | public | [$created_at](../classes/YooKassa-Model-Refund-Refund.md#property_created_at) | | Время создания возврата | | public | [$createdAt](../classes/YooKassa-Model-Refund-Refund.md#property_createdAt) | | Время создания возврата | | public | [$deal](../classes/YooKassa-Model-Refund-Refund.md#property_deal) | | Данные о сделке, в составе которой проходит возврат | | public | [$description](../classes/YooKassa-Model-Refund-Refund.md#property_description) | | Комментарий, основание для возврата средств покупателю | | public | [$id](../classes/YooKassa-Model-Refund-Refund.md#property_id) | | Идентификатор возврата платежа | | public | [$payment_id](../classes/YooKassa-Model-Refund-Refund.md#property_payment_id) | | Идентификатор платежа | | public | [$paymentId](../classes/YooKassa-Model-Refund-Refund.md#property_paymentId) | | Идентификатор платежа | | public | [$receipt_registration](../classes/YooKassa-Model-Refund-Refund.md#property_receipt_registration) | | Статус регистрации чека | | public | [$receiptRegistration](../classes/YooKassa-Model-Refund-Refund.md#property_receiptRegistration) | | Статус регистрации чека | | public | [$sources](../classes/YooKassa-Model-Refund-Refund.md#property_sources) | | Данные о том, с какого магазина и какую сумму нужно удержать для проведения возврата | | public | [$status](../classes/YooKassa-Model-Refund-Refund.md#property_status) | | Статус возврата | | protected | [$_amount](../classes/YooKassa-Model-Refund-Refund.md#property__amount) | | | | protected | [$_cancellation_details](../classes/YooKassa-Model-Refund-Refund.md#property__cancellation_details) | | | | protected | [$_created_at](../classes/YooKassa-Model-Refund-Refund.md#property__created_at) | | | | protected | [$_deal](../classes/YooKassa-Model-Refund-Refund.md#property__deal) | | | | protected | [$_description](../classes/YooKassa-Model-Refund-Refund.md#property__description) | | | | protected | [$_id](../classes/YooKassa-Model-Refund-Refund.md#property__id) | | | | protected | [$_payment_id](../classes/YooKassa-Model-Refund-Refund.md#property__payment_id) | | | | protected | [$_receipt_registration](../classes/YooKassa-Model-Refund-Refund.md#property__receipt_registration) | | | | protected | [$_sources](../classes/YooKassa-Model-Refund-Refund.md#property__sources) | | | | protected | [$_status](../classes/YooKassa-Model-Refund-Refund.md#property__status) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Refund-Refund.md#method_getAmount) | | Возвращает сумму возврата. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Refund-Refund.md#method_getCancellationDetails) | | Возвращает cancellation_details. | | public | [getCreatedAt()](../classes/YooKassa-Model-Refund-Refund.md#method_getCreatedAt) | | Возвращает дату создания возврата. | | public | [getDeal()](../classes/YooKassa-Model-Refund-Refund.md#method_getDeal) | | Возвращает данные о сделке, в составе которой проходит возврат | | public | [getDescription()](../classes/YooKassa-Model-Refund-Refund.md#method_getDescription) | | Возвращает комментарий к возврату. | | public | [getId()](../classes/YooKassa-Model-Refund-Refund.md#method_getId) | | Возвращает идентификатор возврата платежа. | | public | [getPaymentId()](../classes/YooKassa-Model-Refund-Refund.md#method_getPaymentId) | | Возвращает идентификатор платежа. | | public | [getReceiptRegistration()](../classes/YooKassa-Model-Refund-Refund.md#method_getReceiptRegistration) | | Возвращает статус регистрации чека. | | public | [getSources()](../classes/YooKassa-Model-Refund-Refund.md#method_getSources) | | Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. | | public | [getStatus()](../classes/YooKassa-Model-Refund-Refund.md#method_getStatus) | | Возвращает статус текущего возврата. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Refund-Refund.md#method_setAmount) | | Устанавливает сумму возврата. | | public | [setCancellationDetails()](../classes/YooKassa-Model-Refund-Refund.md#method_setCancellationDetails) | | Устанавливает cancellation_details. | | public | [setCreatedAt()](../classes/YooKassa-Model-Refund-Refund.md#method_setCreatedAt) | | Устанавливает время создания возврата. | | public | [setDeal()](../classes/YooKassa-Model-Refund-Refund.md#method_setDeal) | | Устанавливает данные о сделке, в составе которой проходит возврат. | | public | [setDescription()](../classes/YooKassa-Model-Refund-Refund.md#method_setDescription) | | Устанавливает комментарий к возврату. | | public | [setId()](../classes/YooKassa-Model-Refund-Refund.md#method_setId) | | Устанавливает идентификатор возврата. | | public | [setPaymentId()](../classes/YooKassa-Model-Refund-Refund.md#method_setPaymentId) | | Устанавливает идентификатор платежа. | | public | [setReceiptRegistration()](../classes/YooKassa-Model-Refund-Refund.md#method_setReceiptRegistration) | | Устанавливает статус регистрации чека. | | public | [setSources()](../classes/YooKassa-Model-Refund-Refund.md#method_setSources) | | Устанавливает sources (массив распределения денег между магазинами). | | public | [setStatus()](../classes/YooKassa-Model-Refund-Refund.md#method_setStatus) | | Устанавливает статус возврата платежа. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Refunds/CreateRefundResponse.php](../../lib/Request/Refunds/CreateRefundResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) * [\YooKassa\Request\Refunds\AbstractRefundResponse](../classes/YooKassa-Request-Refunds-AbstractRefundResponse.md) * \YooKassa\Request\Refunds\CreateRefundResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Inherited from [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) Максимальная длина строки описания возврата ```php MAX_LENGTH_DESCRIPTION = 250 ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возврата **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $cancellation_details : \YooKassa\Model\Refund\RefundCancellationDetails --- ***Description*** Комментарий к статусу `canceled` **Type:** RefundCancellationDetails **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $cancellationDetails : \YooKassa\Model\Refund\RefundCancellationDetails --- ***Description*** Комментарий к статусу `canceled` **Type:** RefundCancellationDetails **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $created_at : \DateTime --- ***Description*** Время создания возврата **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $createdAt : \DateTime --- ***Description*** Время создания возврата **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $deal : \YooKassa\Model\Deal\RefundDealInfo --- ***Description*** Данные о сделке, в составе которой проходит возврат **Type:** RefundDealInfo **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $description : string --- ***Description*** Комментарий, основание для возврата средств покупателю **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $id : string --- ***Description*** Идентификатор возврата платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $payment_id : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $paymentId : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $receipt_registration : string --- ***Description*** Статус регистрации чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $receiptRegistration : string --- ***Description*** Статус регистрации чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $sources : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Refund\SourceInterface[] --- ***Description*** Данные о том, с какого магазина и какую сумму нужно удержать для проведения возврата **Type:** SourceInterface[] **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $status : string --- ***Description*** Статус возврата **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface Сумма возврата **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_cancellation_details : ?\YooKassa\Model\CancellationDetailsInterface --- **Type:** CancellationDetailsInterface Комментарий к статусу `canceled` **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_created_at : ?\DateTime --- **Type:** DateTime Время создания возврата **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_deal : ?\YooKassa\Model\Deal\RefundDealInfo --- **Type:** RefundDealInfo Данные о сделке, в составе которой проходит возврат **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_description : ?string --- **Type:** ?string Комментарий, основание для возврата средств покупателю **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_id : ?string --- **Type:** ?string Идентификатор возврата платежа **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_payment_id : ?string --- **Type:** ?string Идентификатор платежа **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_receipt_registration : ?string --- **Type:** ?string Статус регистрации чека **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_sources : ?\YooKassa\Common\ListObject --- **Type:** ListObject Данные о распределении денег — сколько и в какой магазин нужно перевести **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_status : ?string --- **Type:** ?string Статус возврата **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма возврата #### public getCancellationDetails() : \YooKassa\Model\CancellationDetailsInterface|null ```php public getCancellationDetails() : \YooKassa\Model\CancellationDetailsInterface|null ``` **Summary** Возвращает cancellation_details. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \YooKassa\Model\CancellationDetailsInterface|null - #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает дату создания возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \DateTime|null - Время создания возврата #### public getDeal() : null|\YooKassa\Model\Deal\RefundDealInfo ```php public getDeal() : null|\YooKassa\Model\Deal\RefundDealInfo ``` **Summary** Возвращает данные о сделке, в составе которой проходит возврат **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** null|\YooKassa\Model\Deal\RefundDealInfo - Данные о сделке, в составе которой проходит возврат #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает комментарий к возврату. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Комментарий, основание для возврата средств покупателю #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор возврата платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Идентификатор возврата #### public getPaymentId() : string|null ```php public getPaymentId() : string|null ``` **Summary** Возвращает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Идентификатор платежа #### public getReceiptRegistration() : string|null ```php public getReceiptRegistration() : string|null ``` **Summary** Возвращает статус регистрации чека. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Статус регистрации чека #### public getSources() : \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSources() : \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface - #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус текущего возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Статус возврата #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма возврата | **Returns:** self - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\CancellationDetailsInterface|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает cancellation_details. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\CancellationDetailsInterface OR array OR null | cancellation_details | | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания возврата | **Returns:** self - #### public setDeal() : self ```php public setDeal(\YooKassa\Model\Deal\RefundDealInfo|array|null $deal = null) : self ``` **Summary** Устанавливает данные о сделке, в составе которой проходит возврат. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Deal\RefundDealInfo OR array OR null | deal | Данные о сделке, в составе которой проходит возврат | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает комментарий к возврату. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Комментарий, основание для возврата средств покупателю | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор возврата | **Returns:** self - #### public setPaymentId() : self ```php public setPaymentId(string|null $payment_id = null) : self ``` **Summary** Устанавливает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_id | Идентификатор платежа | **Returns:** self - #### public setReceiptRegistration() : self ```php public setReceiptRegistration(string|null $receipt_registration = null) : self ``` **Summary** Устанавливает статус регистрации чека. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | receipt_registration | Статус регистрации чека | **Returns:** self - #### public setSources() : self ```php public setSources(\YooKassa\Common\ListObjectInterface|array|null $sources = null) : self ``` **Summary** Устанавливает sources (массив распределения денег между магазинами). **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | sources | | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус возврата платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус возврата платежа | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodApplePay.md000064400000054636150364342670026066 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodApplePay ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodApplePay. **Description:** Оплата через Apple Pay. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodApplePay.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodApplePay.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodApplePay.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodApplePay * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodApplePay](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodApplePay.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-RefundReceiptResponse.md000064400000205065150364342670024101 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Receipts\RefundReceiptResponse ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Класс описывающий чек, привязанный к возврату. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [LENGTH_RECEIPT_ID](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#constant_LENGTH_RECEIPT_ID) | | Длина идентификатора чека | | public | [LENGTH_REFUND_ID](../classes/YooKassa-Request-Receipts-RefundReceiptResponse.md#constant_LENGTH_REFUND_ID) | | Длина идентификатора возврата | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$fiscal_attribute](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_attribute) | | Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. | | public | [$fiscal_document_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_document_number) | | Номер фискального документа. | | public | [$fiscal_provider_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_provider_id) | | Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. | | public | [$fiscal_storage_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_storage_number) | | Номер фискального накопителя в кассовом аппарате. | | public | [$fiscalAttribute](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalAttribute) | | Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. | | public | [$fiscalDocumentNumber](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalDocumentNumber) | | Номер фискального документа. | | public | [$fiscalProviderId](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalProviderId) | | Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. | | public | [$fiscalStorageNumber](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalStorageNumber) | | Номер фискального накопителя в кассовом аппарате. | | public | [$id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_id) | | Идентификатор чека в ЮKassa. | | public | [$items](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_items) | | Список товаров в заказе. | | public | [$object_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_object_id) | | Идентификатор объекта чека. | | public | [$objectId](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_objectId) | | Идентификатор объекта чека. | | public | [$on_behalf_of](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_on_behalf_of) | | Идентификатор магазина. | | public | [$onBehalfOf](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_onBehalfOf) | | Идентификатор магазина. | | public | [$receipt_industry_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receipt_industry_details) | | Отраслевой реквизит чека. | | public | [$receipt_operational_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receipt_operational_details) | | Операционный реквизит чека. | | public | [$receiptIndustryDetails](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receiptIndustryDetails) | | Отраслевой реквизит чека. | | public | [$receiptOperationalDetails](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receiptOperationalDetails) | | Операционный реквизит чека. | | public | [$refund_id](../classes/YooKassa-Request-Receipts-RefundReceiptResponse.md#property_refund_id) | | Идентификатор возврата в ЮKassa. | | public | [$refundId](../classes/YooKassa-Request-Receipts-RefundReceiptResponse.md#property_refundId) | | Идентификатор возврата в ЮKassa. | | public | [$registered_at](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_registered_at) | | Дата и время формирования чека в фискальном накопителе. | | public | [$registeredAt](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_registeredAt) | | Дата и время формирования чека в фискальном накопителе. | | public | [$settlements](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_settlements) | | Перечень совершенных расчетов. | | public | [$status](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_status) | | Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled"). | | public | [$tax_system_code](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_tax_system_code) | | Код системы налогообложения. Число 1-6. | | public | [$taxSystemCode](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_taxSystemCode) | | Код системы налогообложения. Число 1-6. | | public | [$type](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_type) | | Тип чека в онлайн-кассе: приход "payment" или возврат "refund". | | protected | [$_fiscal_attribute](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_attribute) | | | | protected | [$_fiscal_document_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_document_number) | | | | protected | [$_fiscal_provider_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_provider_id) | | | | protected | [$_fiscal_storage_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_storage_number) | | | | protected | [$_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__id) | | | | protected | [$_items](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__items) | | | | protected | [$_object_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__object_id) | | | | protected | [$_on_behalf_of](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__on_behalf_of) | | | | protected | [$_receipt_industry_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__receipt_industry_details) | | | | protected | [$_receipt_operational_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__receipt_operational_details) | | | | protected | [$_registered_at](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__registered_at) | | | | protected | [$_settlements](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__settlements) | | | | protected | [$_status](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__status) | | | | protected | [$_tax_system_code](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__tax_system_code) | | | | protected | [$_type](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [addItem()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_addItem) | | Добавляет товар в чек. | | public | [addSettlement()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_addSettlement) | | Добавляет оплату в массив. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getFiscalAttribute()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalAttribute) | | Возвращает фискальный признак чека. | | public | [getFiscalDocumentNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalDocumentNumber) | | Возвращает номер фискального документа. | | public | [getFiscalProviderId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalProviderId) | | Возвращает идентификатор чека в онлайн-кассе. | | public | [getFiscalStorageNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalStorageNumber) | | Возвращает номер фискального накопителя в кассовом аппарате. | | public | [getId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getId) | | Возвращает идентификатор чека в ЮKassa. | | public | [getItems()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getItems) | | Возвращает список товаров в заказ. | | public | [getObjectId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getObjectId) | | Возвращает идентификатор платежа или возврата, для которого был сформирован чек. | | public | [getOnBehalfOf()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getOnBehalfOf) | | Возвращает идентификатор магазин | | public | [getReceiptIndustryDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getReceiptIndustryDetails) | | Возвращает отраслевой реквизит чека. | | public | [getReceiptOperationalDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getReceiptOperationalDetails) | | Возвращает операционный реквизит чека. | | public | [getRefundId()](../classes/YooKassa-Request-Receipts-RefundReceiptResponse.md#method_getRefundId) | | Возвращает идентификатор возврата. | | public | [getRegisteredAt()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getRegisteredAt) | | Возвращает дату и время формирования чека в фискальном накопителе. | | public | [getSettlements()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getSettlements) | | Возвращает Массив оплат, обеспечивающих выдачу товара. | | public | [getStatus()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getStatus) | | Возвращает статус доставки данных для чека в онлайн-кассу. | | public | [getTaxSystemCode()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getTaxSystemCode) | | Возвращает код системы налогообложения. | | public | [getType()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getType) | | Возвращает тип чека в онлайн-кассе. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [notEmpty()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_notEmpty) | | Проверяет есть ли в чеке хотя бы одна позиция. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setFiscalAttribute()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalAttribute) | | Устанавливает фискальный признак чека. | | public | [setFiscalDocumentNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalDocumentNumber) | | Устанавливает номер фискального документа | | public | [setFiscalProviderId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalProviderId) | | Устанавливает идентификатор чека в онлайн-кассе. | | public | [setFiscalStorageNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalStorageNumber) | | Устанавливает номер фискального накопителя в кассовом аппарате. | | public | [setId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setId) | | Устанавливает идентификатор чека. | | public | [setItems()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setItems) | | Устанавливает список позиций в чеке. | | public | [setObjectId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setObjectId) | | Устанавливает идентификатор платежа или возврата, для которого был сформирован чек. | | public | [setOnBehalfOf()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setOnBehalfOf) | | Возвращает идентификатор магазина, от имени которого нужно отправить чек. | | public | [setReceiptIndustryDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setReceiptIndustryDetails) | | Устанавливает отраслевой реквизит чека. | | public | [setReceiptOperationalDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setReceiptOperationalDetails) | | Устанавливает операционный реквизит чека. | | public | [setRefundId()](../classes/YooKassa-Request-Receipts-RefundReceiptResponse.md#method_setRefundId) | | Устанавливает идентификатор возврата в ЮKassa. | | public | [setRegisteredAt()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setRegisteredAt) | | Устанавливает дату и время формирования чека в фискальном накопителе. | | public | [setSettlements()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setSettlements) | | Устанавливает массив оплат, обеспечивающих выдачу товара. | | public | [setSpecificProperties()](../classes/YooKassa-Request-Receipts-RefundReceiptResponse.md#method_setSpecificProperties) | | Установка свойств, присущих конкретному объекту. | | public | [setStatus()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setStatus) | | Устанавливает состояние регистрации фискального чека. | | public | [setTaxSystemCode()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setTaxSystemCode) | | Устанавливает код системы налогообложения. | | public | [setType()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setType) | | Устанавливает типа чека. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Receipts/RefundReceiptResponse.php](../../lib/Request/Receipts/RefundReceiptResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) * \YooKassa\Request\Receipts\RefundReceiptResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### LENGTH_RECEIPT_ID Inherited from [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) Длина идентификатора чека ```php LENGTH_RECEIPT_ID = 39 ``` ###### LENGTH_REFUND_ID Длина идентификатора возврата ```php LENGTH_REFUND_ID = 36 ``` --- ## Properties #### public $fiscal_attribute : string --- ***Description*** Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscal_document_number : string --- ***Description*** Номер фискального документа. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscal_provider_id : string --- ***Description*** Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscal_storage_number : string --- ***Description*** Номер фискального накопителя в кассовом аппарате. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscalAttribute : string --- ***Description*** Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscalDocumentNumber : string --- ***Description*** Номер фискального документа. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscalProviderId : string --- ***Description*** Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscalStorageNumber : string --- ***Description*** Номер фискального накопителя в кассовом аппарате. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $id : string --- ***Description*** Идентификатор чека в ЮKassa. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $items : \YooKassa\Common\ListObjectInterface|\YooKassa\Request\Receipts\ReceiptResponseItemInterface[] --- ***Description*** Список товаров в заказе. **Type:** ReceiptResponseItemInterface[] **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $object_id : string --- ***Description*** Идентификатор объекта чека. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $objectId : string --- ***Description*** Идентификатор объекта чека. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $on_behalf_of : string --- ***Description*** Идентификатор магазина. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $onBehalfOf : string --- ***Description*** Идентификатор магазина. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $receipt_industry_details : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\IndustryDetails[] --- ***Description*** Отраслевой реквизит чека. **Type:** IndustryDetails[] **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $receipt_operational_details : \YooKassa\Model\Receipt\OperationalDetails --- ***Description*** Операционный реквизит чека. **Type:** OperationalDetails **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $receiptIndustryDetails : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\IndustryDetails[] --- ***Description*** Отраслевой реквизит чека. **Type:** IndustryDetails[] **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $receiptOperationalDetails : \YooKassa\Model\Receipt\OperationalDetails --- ***Description*** Операционный реквизит чека. **Type:** OperationalDetails **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $refund_id : string --- ***Description*** Идентификатор возврата в ЮKassa. **Type:** string **Details:** #### public $refundId : string --- ***Description*** Идентификатор возврата в ЮKassa. **Type:** string **Details:** #### public $registered_at : \DateTime --- ***Description*** Дата и время формирования чека в фискальном накопителе. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $registeredAt : \DateTime --- ***Description*** Дата и время формирования чека в фискальном накопителе. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $settlements : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\SettlementInterface[] --- ***Description*** Перечень совершенных расчетов. **Type:** SettlementInterface[] **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $status : string --- ***Description*** Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled"). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $tax_system_code : int --- ***Description*** Код системы налогообложения. Число 1-6. **Type:** int **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $taxSystemCode : int --- ***Description*** Код системы налогообложения. Число 1-6. **Type:** int **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $type : string --- ***Description*** Тип чека в онлайн-кассе: приход "payment" или возврат "refund". **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_fiscal_attribute : ?string --- **Type:** ?string Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_fiscal_document_number : ?string --- **Type:** ?string Номер фискального документа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_fiscal_provider_id : ?string --- **Type:** ?string Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_fiscal_storage_number : ?string --- **Type:** ?string Номер фискального накопителя в кассовом аппарате. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_id : ?string --- **Type:** ?string Идентификатор чека в ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_items : ?\YooKassa\Common\ListObject --- **Type:** ListObject Список товаров в заказе **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_object_id : ?string --- **Type:** ?string Идентификатор объекта чека **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_on_behalf_of : ?string --- **Type:** ?string Идентификатор магазина **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_receipt_industry_details : ?\YooKassa\Common\ListObject --- **Type:** ListObject Отраслевой реквизит предмета расчета **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_receipt_operational_details : ?\YooKassa\Model\Receipt\OperationalDetails --- **Type:** OperationalDetails Операционный реквизит чека **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_registered_at : ?\DateTime --- **Type:** DateTime Дата и время формирования чека в фискальном накопителе. Указывается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_settlements : ?\YooKassa\Common\ListObject --- **Type:** ListObject Список оплат **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_status : ?string --- **Type:** ?string Статус доставки данных для чека в онлайн-кассу "pending", "succeeded" или "canceled". **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_tax_system_code : ?int --- **Type:** ?int Код системы налогообложения. Число 1-6. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_type : ?string --- **Type:** ?string Тип чека в онлайн-кассе: приход "payment" или возврат "refund". **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public addItem() : void ```php public addItem(\YooKassa\Request\Receipts\ReceiptResponseItemInterface $value) : void ``` **Summary** Добавляет товар в чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Receipts\ReceiptResponseItemInterface | value | Объект добавляемой в чек позиции | **Returns:** void - #### public addSettlement() : void ```php public addSettlement(\YooKassa\Model\Receipt\SettlementInterface $value) : void ``` **Summary** Добавляет оплату в массив. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\SettlementInterface | value | | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getFiscalAttribute() : string|null ```php public getFiscalAttribute() : string|null ``` **Summary** Возвращает фискальный признак чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Фискальный признак чека #### public getFiscalDocumentNumber() : string|null ```php public getFiscalDocumentNumber() : string|null ``` **Summary** Возвращает номер фискального документа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Номер фискального документа #### public getFiscalProviderId() : string|null ```php public getFiscalProviderId() : string|null ``` **Summary** Возвращает идентификатор чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Идентификатор чека в онлайн-кассе #### public getFiscalStorageNumber() : string|null ```php public getFiscalStorageNumber() : string|null ``` **Summary** Возвращает номер фискального накопителя в кассовом аппарате. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Номер фискального накопителя в кассовом аппарате #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор чека в ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Идентификатор чека в ЮKassa #### public getItems() : \YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|\YooKassa\Common\ListObjectInterface ```php public getItems() : \YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список товаров в заказ. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|\YooKassa\Common\ListObjectInterface - #### public getObjectId() : string|null ```php public getObjectId() : string|null ``` **Summary** Возвращает идентификатор платежа или возврата, для которого был сформирован чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - #### public getOnBehalfOf() : string|null ```php public getOnBehalfOf() : string|null ``` **Summary** Возвращает идентификатор магазин **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - #### public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ```php public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface - Отраслевой реквизит чека #### public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails|null ```php public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails|null ``` **Summary** Возвращает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Model\Receipt\OperationalDetails|null - Операционный реквизит чека #### public getRefundId() : string|null ```php public getRefundId() : string|null ``` **Summary** Возвращает идентификатор возврата. **Details:** * Inherited From: [\YooKassa\Request\Receipts\RefundReceiptResponse](../classes/YooKassa-Request-Receipts-RefundReceiptResponse.md) **Returns:** string|null - Идентификатор возврата #### public getRegisteredAt() : \DateTime|null ```php public getRegisteredAt() : \DateTime|null ``` **Summary** Возвращает дату и время формирования чека в фискальном накопителе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \DateTime|null - Дата и время формирования чека в фискальном накопителе #### public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает Массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface - #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус доставки данных для чека в онлайн-кассу. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled") #### public getTaxSystemCode() : int|null ```php public getTaxSystemCode() : int|null ``` **Summary** Возвращает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** int|null - Код системы налогообложения. Число 1-6. #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Тип чека в онлайн-кассе: приход "payment" или возврат "refund" #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public notEmpty() : bool ```php public notEmpty() : bool ``` **Summary** Проверяет есть ли в чеке хотя бы одна позиция. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** bool - True если чек не пуст, false если в чеке нет ни одной позиции #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setFiscalAttribute() : self ```php public setFiscalAttribute(string|null $fiscal_attribute = null) : self ``` **Summary** Устанавливает фискальный признак чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_attribute | Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. | **Returns:** self - #### public setFiscalDocumentNumber() : self ```php public setFiscalDocumentNumber(string|null $fiscal_document_number = null) : self ``` **Summary** Устанавливает номер фискального документа **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_document_number | Номер фискального документа. | **Returns:** self - #### public setFiscalProviderId() : self ```php public setFiscalProviderId(string|null $fiscal_provider_id = null) : self ``` **Summary** Устанавливает идентификатор чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_provider_id | Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. | **Returns:** self - #### public setFiscalStorageNumber() : self ```php public setFiscalStorageNumber(string|null $fiscal_storage_number = null) : self ``` **Summary** Устанавливает номер фискального накопителя в кассовом аппарате. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_storage_number | Номер фискального накопителя в кассовом аппарате. | **Returns:** self - #### public setId() : self ```php public setId(string $id) : self ``` **Summary** Устанавливает идентификатор чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | id | Идентификатор чека | **Returns:** self - #### public setItems() : self ```php public setItems(\YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|null $items) : self ``` **Summary** Устанавливает список позиций в чеке. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Receipts\ReceiptResponseItemInterface[] OR null | items | Список товаров в заказе | **Returns:** self - #### public setObjectId() : self ```php public setObjectId(string|null $object_id) : self ``` **Summary** Устанавливает идентификатор платежа или возврата, для которого был сформирован чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | object_id | | **Returns:** self - #### public setOnBehalfOf() : self ```php public setOnBehalfOf(string|null $on_behalf_of = null) : self ``` **Summary** Возвращает идентификатор магазина, от имени которого нужно отправить чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | on_behalf_of | Идентификатор магазина, от имени которого нужно отправить чек | **Returns:** self - #### public setReceiptIndustryDetails() : self ```php public setReceiptIndustryDetails(array|\YooKassa\Model\Receipt\IndustryDetails[]|null $receipt_industry_details = null) : self ``` **Summary** Устанавливает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\IndustryDetails[] OR null | receipt_industry_details | Отраслевой реквизит чека | **Returns:** self - #### public setReceiptOperationalDetails() : self ```php public setReceiptOperationalDetails(array|\YooKassa\Model\Receipt\OperationalDetails|null $receipt_operational_details = null) : self ``` **Summary** Устанавливает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\OperationalDetails OR null | receipt_operational_details | Операционный реквизит чека | **Returns:** self - #### public setRefundId() : self ```php public setRefundId(string|null $refund_id) : self ``` **Summary** Устанавливает идентификатор возврата в ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\Receipts\RefundReceiptResponse](../classes/YooKassa-Request-Receipts-RefundReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | refund_id | Идентификатор возврата в ЮKassa | **Returns:** self - #### public setRegisteredAt() : self ```php public setRegisteredAt(\DateTime|string|null $registered_at = null) : self ``` **Summary** Устанавливает дату и время формирования чека в фискальном накопителе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | registered_at | Дата и время формирования чека в фискальном накопителе. Указывается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). | **Returns:** self - #### public setSettlements() : self ```php public setSettlements(\YooKassa\Model\Receipt\SettlementInterface[]|null $settlements) : self ``` **Summary** Устанавливает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\SettlementInterface[] OR null | settlements | | **Returns:** self - #### public setSpecificProperties() : void ```php public setSpecificProperties(array $receiptData) : void ``` **Summary** Установка свойств, присущих конкретному объекту. **Details:** * Inherited From: [\YooKassa\Request\Receipts\RefundReceiptResponse](../classes/YooKassa-Request-Receipts-RefundReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | receiptData | | **Returns:** void - #### public setStatus() : self ```php public setStatus(string|null $status) : self ``` **Summary** Устанавливает состояние регистрации фискального чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Состояние регистрации фискального чека | **Returns:** self - #### public setTaxSystemCode() : self ```php public setTaxSystemCode(int|null $tax_system_code) : self ``` **Summary** Устанавливает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | tax_system_code | Код системы налогообложения. Число 1-6 | **Returns:** self - #### public setType() : self ```php public setType(string $type) : self ``` **Summary** Устанавливает типа чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | type | Тип чека | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-LoggerWrapper.md000064400000017721150364342670020427 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\LoggerWrapper ### Namespace: [\YooKassa\Common](../namespaces/yookassa-common.md) --- **Summary:** Класс, представляющий модель LoggerWrapper. **Description:** Класс логгера по умолчанию. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-LoggerWrapper.md#method___construct) | | LoggerWrapper constructor. | | public | [alert()](../classes/YooKassa-Common-LoggerWrapper.md#method_alert) | | Action must be taken immediately. | | public | [critical()](../classes/YooKassa-Common-LoggerWrapper.md#method_critical) | | Critical conditions. | | public | [debug()](../classes/YooKassa-Common-LoggerWrapper.md#method_debug) | | Detailed debug information. | | public | [emergency()](../classes/YooKassa-Common-LoggerWrapper.md#method_emergency) | | System is unusable. | | public | [error()](../classes/YooKassa-Common-LoggerWrapper.md#method_error) | | Runtime errors that do not require immediate action but should typically be logged and monitored. | | public | [info()](../classes/YooKassa-Common-LoggerWrapper.md#method_info) | | Interesting events. | | public | [log()](../classes/YooKassa-Common-LoggerWrapper.md#method_log) | | Logs with an arbitrary level. | | public | [notice()](../classes/YooKassa-Common-LoggerWrapper.md#method_notice) | | Normal but significant events. | | public | [warning()](../classes/YooKassa-Common-LoggerWrapper.md#method_warning) | | Exceptional occurrences that are not errors. | --- ### Details * File: [lib/Common/LoggerWrapper.php](../../lib/Common/LoggerWrapper.php) * Package: YooKassa * Class Hierarchy: * \YooKassa\Common\LoggerWrapper * Implements: * [](\Psr\Log\LoggerInterface) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public __construct() : mixed ```php public __construct(callable|mixed|object $wrapped) : mixed ``` **Summary** LoggerWrapper constructor. **Details:** * Inherited From: [\YooKassa\Common\LoggerWrapper](../classes/YooKassa-Common-LoggerWrapper.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | callable OR mixed OR object | wrapped | | **Returns:** mixed - #### public alert() : void ```php public alert(string|\Stringable $message, array $context = []) : void ``` **Summary** Action must be taken immediately. **Description** Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up. **Details:** * Inherited From: [\YooKassa\Common\LoggerWrapper](../classes/YooKassa-Common-LoggerWrapper.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR \Stringable | message | | | array | context | | **Returns:** void - #### public critical() : void ```php public critical(string|\Stringable $message, array $context = []) : void ``` **Summary** Critical conditions. **Description** Example: Application component unavailable, unexpected exception. **Details:** * Inherited From: [\YooKassa\Common\LoggerWrapper](../classes/YooKassa-Common-LoggerWrapper.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR \Stringable | message | | | array | context | | **Returns:** void - #### public debug() : void ```php public debug(string|\Stringable $message, array $context = []) : void ``` **Summary** Detailed debug information. **Details:** * Inherited From: [\YooKassa\Common\LoggerWrapper](../classes/YooKassa-Common-LoggerWrapper.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR \Stringable | message | | | array | context | | **Returns:** void - #### public emergency() : void ```php public emergency(string|\Stringable $message, array $context = []) : void ``` **Summary** System is unusable. **Details:** * Inherited From: [\YooKassa\Common\LoggerWrapper](../classes/YooKassa-Common-LoggerWrapper.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR \Stringable | message | | | array | context | | **Returns:** void - #### public error() : void ```php public error(string|\Stringable $message, array $context = []) : void ``` **Summary** Runtime errors that do not require immediate action but should typically be logged and monitored. **Details:** * Inherited From: [\YooKassa\Common\LoggerWrapper](../classes/YooKassa-Common-LoggerWrapper.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR \Stringable | message | | | array | context | | **Returns:** void - #### public info() : void ```php public info(string|\Stringable $message, array $context = []) : void ``` **Summary** Interesting events. **Description** Example: User logs in, SQL logs. **Details:** * Inherited From: [\YooKassa\Common\LoggerWrapper](../classes/YooKassa-Common-LoggerWrapper.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR \Stringable | message | | | array | context | | **Returns:** void - #### public log() : void ```php public log(mixed $level, string|\Stringable $message, array $context = []) : void ``` **Summary** Logs with an arbitrary level. **Details:** * Inherited From: [\YooKassa\Common\LoggerWrapper](../classes/YooKassa-Common-LoggerWrapper.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | level | | | string OR \Stringable | message | | | array | context | | **Returns:** void - #### public notice() : void ```php public notice(string|\Stringable $message, array $context = []) : void ``` **Summary** Normal but significant events. **Details:** * Inherited From: [\YooKassa\Common\LoggerWrapper](../classes/YooKassa-Common-LoggerWrapper.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR \Stringable | message | | | array | context | | **Returns:** void - #### public warning() : void ```php public warning(string|\Stringable $message, array $context = []) : void ``` **Summary** Exceptional occurrences that are not errors. **Description** Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong. **Details:** * Inherited From: [\YooKassa\Common\LoggerWrapper](../classes/YooKassa-Common-LoggerWrapper.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR \Stringable | message | | | array | context | | **Returns:** void - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCardCard.md000064400000034353150364342670032342 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCardCard ### Namespace: [\YooKassa\Request\Payouts\PayoutDestinationData](../namespaces/yookassa-request-payouts-payoutdestinationdata.md) --- **Summary:** Класс, представляющий модель PayoutDestinationDataBankCardCard. **Description:** Данные банковской карты для выплаты. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$number](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCardCard.md#property_number) | | Номер банковской карты. Формат: только цифры, без пробелов. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getNumber()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCardCard.md#method_getNumber) | | Возвращает последние 4 цифры номера карты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setNumber()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCardCard.md#method_setNumber) | | Устанавливает номер банковской карты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payouts/PayoutDestinationData/PayoutDestinationDataBankCardCard.php](../../lib/Request/Payouts/PayoutDestinationData/PayoutDestinationDataBankCardCard.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCardCard * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $number : string --- ***Description*** Номер банковской карты. Формат: только цифры, без пробелов. **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getNumber() : string|null ```php public getNumber() : string|null ``` **Summary** Возвращает последние 4 цифры номера карты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCardCard](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCardCard.md) **Returns:** string|null - Последние 4 цифры номера карты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setNumber() : self ```php public setNumber(string|null $number = null) : self ``` **Summary** Устанавливает номер банковской карты. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataBankCardCard](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataBankCardCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | number | Номер банковской карты. Формат: только цифры, без пробелов. Пример: ~`5555555555554477` | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-ListObjectInterface.md000064400000012420150364342670021521 0ustar00# [YooKassa API SDK](../home.md) # Interface: ListObjectInterface ### Namespace: [\YooKassa\Common](../namespaces/yookassa-common.md) --- **Summary:** Interface ListObjectInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [add()](../classes/YooKassa-Common-ListObjectInterface.md#method_add) | | | | public | [clear()](../classes/YooKassa-Common-ListObjectInterface.md#method_clear) | | | | public | [get()](../classes/YooKassa-Common-ListObjectInterface.md#method_get) | | | | public | [getItems()](../classes/YooKassa-Common-ListObjectInterface.md#method_getItems) | | | | public | [getType()](../classes/YooKassa-Common-ListObjectInterface.md#method_getType) | | | | public | [isEmpty()](../classes/YooKassa-Common-ListObjectInterface.md#method_isEmpty) | | | | public | [merge()](../classes/YooKassa-Common-ListObjectInterface.md#method_merge) | | | | public | [remove()](../classes/YooKassa-Common-ListObjectInterface.md#method_remove) | | | | public | [setType()](../classes/YooKassa-Common-ListObjectInterface.md#method_setType) | | | | public | [toArray()](../classes/YooKassa-Common-ListObjectInterface.md#method_toArray) | | | --- ### Details * File: [lib/Common/ListObjectInterface.php](../../lib/Common/ListObjectInterface.php) * Package: \YooKassa * Parents: * [](\ArrayAccess) * [](\JsonSerializable) * [](\Countable) * [](\IteratorAggregate) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | --- ## Methods #### public getType() : string ```php public getType() : string ``` **Details:** * Inherited From: [\YooKassa\Common\ListObjectInterface](../classes/YooKassa-Common-ListObjectInterface.md) **Returns:** string - #### public setType() : $this ```php public setType(string $type) : $this ``` **Details:** * Inherited From: [\YooKassa\Common\ListObjectInterface](../classes/YooKassa-Common-ListObjectInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | type | | **Returns:** $this - #### public add() : $this ```php public add(mixed $item) : $this ``` **Details:** * Inherited From: [\YooKassa\Common\ListObjectInterface](../classes/YooKassa-Common-ListObjectInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | item | | **Returns:** $this - #### public merge() : $this ```php public merge(iterable $data) : $this ``` **Details:** * Inherited From: [\YooKassa\Common\ListObjectInterface](../classes/YooKassa-Common-ListObjectInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable | data | | **Returns:** $this - #### public remove() : $this ```php public remove(int $index) : $this ``` **Details:** * Inherited From: [\YooKassa\Common\ListObjectInterface](../classes/YooKassa-Common-ListObjectInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | index | | **Returns:** $this - #### public clear() : $this ```php public clear() : $this ``` **Details:** * Inherited From: [\YooKassa\Common\ListObjectInterface](../classes/YooKassa-Common-ListObjectInterface.md) **Returns:** $this - #### public isEmpty() : bool ```php public isEmpty() : bool ``` **Details:** * Inherited From: [\YooKassa\Common\ListObjectInterface](../classes/YooKassa-Common-ListObjectInterface.md) **Returns:** bool - #### public getItems() : \Ds\Vector ```php public getItems() : \Ds\Vector ``` **Details:** * Inherited From: [\YooKassa\Common\ListObjectInterface](../classes/YooKassa-Common-ListObjectInterface.md) **Returns:** \Ds\Vector - #### public get() : \YooKassa\Common\AbstractObject ```php public get(int $index) : \YooKassa\Common\AbstractObject ``` **Details:** * Inherited From: [\YooKassa\Common\ListObjectInterface](../classes/YooKassa-Common-ListObjectInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | index | | **Returns:** \YooKassa\Common\AbstractObject - #### public toArray() : array ```php public toArray() : array ``` **Details:** * Inherited From: [\YooKassa\Common\ListObjectInterface](../classes/YooKassa-Common-ListObjectInterface.md) **Returns:** array - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-AbstractObject.md000064400000027230150364342670020535 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Common\AbstractObject ### Namespace: [\YooKassa\Common](../namespaces/yookassa-common.md) --- **Summary:** Класс, представляющий модель AbstractObject. **Description:** Базовый класс генерируемых объектов. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Common/AbstractObject.php](../../lib/Common/AbstractObject.php) * Package: YooKassa * Class Hierarchy: * \YooKassa\Common\AbstractObject * Implements: * [](\ArrayAccess) * [](\JsonSerializable) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-MarkCodeInfo.md000064400000101020150364342670021333 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\MarkCodeInfo ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Class MarkCodeInfo. **Description:** Код товара (тег в 54 ФЗ — 1163). Обязательный параметр, если одновременно выполняются эти условия: * вы используете Чеки от ЮKassa или онлайн-кассу, обновленную до ФФД 1.2; * товар нужно [маркировать](http://docs.cntd.ru/document/902192509). Должно быть заполнено хотя бы одно поле. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MIN_LENGTH](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#constant_MIN_LENGTH) | | | | public | [MAX_UNKNOWN_LENGTH](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#constant_MAX_UNKNOWN_LENGTH) | | | | public | [EAN_8_LENGTH](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#constant_EAN_8_LENGTH) | | | | public | [EAN_13_LENGTH](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#constant_EAN_13_LENGTH) | | | | public | [ITF_14_LENGTH](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#constant_ITF_14_LENGTH) | | | | public | [MAX_GS_10_LENGTH](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#constant_MAX_GS_10_LENGTH) | | | | public | [MAX_GS_1M_LENGTH](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#constant_MAX_GS_1M_LENGTH) | | | | public | [MAX_SHORT_LENGTH](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#constant_MAX_SHORT_LENGTH) | | | | public | [FUR_LENGTH](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#constant_FUR_LENGTH) | | | | public | [EGAIS_20_LENGTH](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#constant_EGAIS_20_LENGTH) | | | | public | [EGAIS_30_LENGTH](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#constant_EGAIS_30_LENGTH) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$ean_13](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#property_ean_13) | | Код товара в формате EAN-13 (тег в 54 ФЗ — 1302) | | public | [$ean_8](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#property_ean_8) | | Код товара в формате EAN-8 (тег в 54 ФЗ — 1301) | | public | [$egais_20](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#property_egais_20) | | Код товара в формате ЕГАИС-2.0 (тег в 54 ФЗ — 1308) | | public | [$egais_30](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#property_egais_30) | | Код товара в формате ЕГАИС-3.0 (тег в 54 ФЗ — 1309) | | public | [$fur](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#property_fur) | | Контрольно-идентификационный знак мехового изделия (тег в 54 ФЗ — 1307) | | public | [$gs_10](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#property_gs_10) | | Код товара в формате GS1.0 (тег в 54 ФЗ — 1304) | | public | [$gs_1m](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#property_gs_1m) | | Код товара в формате GS1.M (тег в 54 ФЗ — 1305) | | public | [$itf_14](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#property_itf_14) | | Код товара в формате ITF-14 (тег в 54 ФЗ — 1303) | | public | [$mark_code_raw](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#property_mark_code_raw) | | Код товара в том виде, в котором он был прочитан сканером (тег в 54 ФЗ — 2000) | | public | [$markCodeRaw](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#property_markCodeRaw) | | Код товара в том виде, в котором он был прочитан сканером (тег в 54 ФЗ — 2000) | | public | [$short](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#property_short) | | Код товара в формате короткого кода маркировки (тег в 54 ФЗ — 1306) | | public | [$unknown](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#property_unknown) | | Нераспознанный код товара (тег в 54 ФЗ — 1300) | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getEan13()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_getEan13) | | Возвращает ean_13. | | public | [getEan8()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_getEan8) | | Возвращает ean_8. | | public | [getEgais20()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_getEgais20) | | Возвращает egais_20. | | public | [getEgais30()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_getEgais30) | | Возвращает egais_30. | | public | [getFur()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_getFur) | | Возвращает fur. | | public | [getGs10()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_getGs10) | | Возвращает gs_10. | | public | [getGs1m()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_getGs1m) | | Возвращает gs_1m. | | public | [getItf14()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_getItf14) | | Возвращает itf_14. | | public | [getMarkCodeRaw()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_getMarkCodeRaw) | | Возвращает исходный код товара. | | public | [getShort()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_getShort) | | Возвращает short. | | public | [getUnknown()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_getUnknown) | | Возвращает unknown. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setEan13()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_setEan13) | | Устанавливает ean_13. | | public | [setEan8()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_setEan8) | | Устанавливает ean_8. | | public | [setEgais20()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_setEgais20) | | Устанавливает egais_20. | | public | [setEgais30()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_setEgais30) | | Устанавливает egais_30. | | public | [setFur()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_setFur) | | Устанавливает fur. | | public | [setGs10()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_setGs10) | | Устанавливает gs_10. | | public | [setGs1m()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_setGs1m) | | Устанавливает gs_1m. | | public | [setItf14()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_setItf14) | | Устанавливает itf_14. | | public | [setMarkCodeRaw()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_setMarkCodeRaw) | | Устанавливает исходный код товара. | | public | [setShort()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_setShort) | | Устанавливает short. | | public | [setUnknown()](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md#method_setUnknown) | | Устанавливает unknown. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Receipt/MarkCodeInfo.php](../../lib/Model/Receipt/MarkCodeInfo.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Receipt\MarkCodeInfo * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MIN_LENGTH ```php MIN_LENGTH = 1 : int ``` ###### MAX_UNKNOWN_LENGTH ```php MAX_UNKNOWN_LENGTH = 32 : int ``` ###### EAN_8_LENGTH ```php EAN_8_LENGTH = 8 : int ``` ###### EAN_13_LENGTH ```php EAN_13_LENGTH = 13 : int ``` ###### ITF_14_LENGTH ```php ITF_14_LENGTH = 14 : int ``` ###### MAX_GS_10_LENGTH ```php MAX_GS_10_LENGTH = 38 : int ``` ###### MAX_GS_1M_LENGTH ```php MAX_GS_1M_LENGTH = 200 : int ``` ###### MAX_SHORT_LENGTH ```php MAX_SHORT_LENGTH = 38 : int ``` ###### FUR_LENGTH ```php FUR_LENGTH = 20 : int ``` ###### EGAIS_20_LENGTH ```php EGAIS_20_LENGTH = 33 : int ``` ###### EGAIS_30_LENGTH ```php EGAIS_30_LENGTH = 14 : int ``` --- ## Properties #### public $ean_13 : string --- ***Description*** Код товара в формате EAN-13 (тег в 54 ФЗ — 1302) **Type:** string **Details:** #### public $ean_8 : string --- ***Description*** Код товара в формате EAN-8 (тег в 54 ФЗ — 1301) **Type:** string **Details:** #### public $egais_20 : string --- ***Description*** Код товара в формате ЕГАИС-2.0 (тег в 54 ФЗ — 1308) **Type:** string **Details:** #### public $egais_30 : string --- ***Description*** Код товара в формате ЕГАИС-3.0 (тег в 54 ФЗ — 1309) **Type:** string **Details:** #### public $fur : string --- ***Description*** Контрольно-идентификационный знак мехового изделия (тег в 54 ФЗ — 1307) **Type:** string **Details:** #### public $gs_10 : string --- ***Description*** Код товара в формате GS1.0 (тег в 54 ФЗ — 1304) **Type:** string **Details:** #### public $gs_1m : string --- ***Description*** Код товара в формате GS1.M (тег в 54 ФЗ — 1305) **Type:** string **Details:** #### public $itf_14 : string --- ***Description*** Код товара в формате ITF-14 (тег в 54 ФЗ — 1303) **Type:** string **Details:** #### public $mark_code_raw : string --- ***Description*** Код товара в том виде, в котором он был прочитан сканером (тег в 54 ФЗ — 2000) **Type:** string **Details:** #### public $markCodeRaw : string --- ***Description*** Код товара в том виде, в котором он был прочитан сканером (тег в 54 ФЗ — 2000) **Type:** string **Details:** #### public $short : string --- ***Description*** Код товара в формате короткого кода маркировки (тег в 54 ФЗ — 1306) **Type:** string **Details:** #### public $unknown : string --- ***Description*** Нераспознанный код товара (тег в 54 ФЗ — 1300) **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getEan13() : string|null ```php public getEan13() : string|null ``` **Summary** Возвращает ean_13. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) **Returns:** string|null - #### public getEan8() : string|null ```php public getEan8() : string|null ``` **Summary** Возвращает ean_8. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) **Returns:** string|null - #### public getEgais20() : string|null ```php public getEgais20() : string|null ``` **Summary** Возвращает egais_20. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) **Returns:** string|null - #### public getEgais30() : string|null ```php public getEgais30() : string|null ``` **Summary** Возвращает egais_30. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) **Returns:** string|null - #### public getFur() : string|null ```php public getFur() : string|null ``` **Summary** Возвращает fur. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) **Returns:** string|null - #### public getGs10() : string|null ```php public getGs10() : string|null ``` **Summary** Возвращает gs_10. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) **Returns:** string|null - #### public getGs1m() : string|null ```php public getGs1m() : string|null ``` **Summary** Возвращает gs_1m. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) **Returns:** string|null - #### public getItf14() : string|null ```php public getItf14() : string|null ``` **Summary** Возвращает itf_14. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) **Returns:** string|null - #### public getMarkCodeRaw() : string|null ```php public getMarkCodeRaw() : string|null ``` **Summary** Возвращает исходный код товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) **Returns:** string|null - Исходный код товара #### public getShort() : string|null ```php public getShort() : string|null ``` **Summary** Возвращает short. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) **Returns:** string|null - #### public getUnknown() : string|null ```php public getUnknown() : string|null ``` **Summary** Возвращает unknown. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setEan13() : self ```php public setEan13(string|null $ean_13 = null) : self ``` **Summary** Устанавливает ean_13. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | ean_13 | Код товара в формате EAN-13 (тег в 54 ФЗ — 1302). | **Returns:** self - #### public setEan8() : self ```php public setEan8(string|null $ean_8 = null) : self ``` **Summary** Устанавливает ean_8. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | ean_8 | Код товара в формате EAN-8 (тег в 54 ФЗ — 1301). | **Returns:** self - #### public setEgais20() : self ```php public setEgais20(string|null $egais_20 = null) : self ``` **Summary** Устанавливает egais_20. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | egais_20 | Код товара в формате ЕГАИС-2.0 (тег в 54 ФЗ — 1308). | **Returns:** self - #### public setEgais30() : self ```php public setEgais30(string|null $egais_30 = null) : self ``` **Summary** Устанавливает egais_30. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | egais_30 | Код товара в формате ЕГАИС-3.0 (тег в 54 ФЗ — 1309). | **Returns:** self - #### public setFur() : self ```php public setFur(string|null $fur = null) : self ``` **Summary** Устанавливает fur. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fur | Контрольно-идентификационный знак мехового изделия (тег в 54 ФЗ — 1307). | **Returns:** self - #### public setGs10() : self ```php public setGs10(string|null $gs_10 = null) : self ``` **Summary** Устанавливает gs_10. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | gs_10 | Код товара в формате GS1.0 (тег в 54 ФЗ — 1304).
Онлайн-кассы, которые поддерживают этот параметр: **Orange Data**, **aQsi**, **Кит Инвест**. | **Returns:** self - #### public setGs1m() : self ```php public setGs1m(string|null $gs_1m = null) : self ``` **Summary** Устанавливает gs_1m. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | gs_1m | Код товара в формате GS1.M (тег в 54 ФЗ — 1305). | **Returns:** self - #### public setItf14() : self ```php public setItf14(string|null $itf_14 = null) : self ``` **Summary** Устанавливает itf_14. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | itf_14 | Код товара в формате ITF-14 (тег в 54 ФЗ — 1303). | **Returns:** self - #### public setMarkCodeRaw() : self ```php public setMarkCodeRaw(string|null $mark_code_raw = null) : self ``` **Summary** Устанавливает исходный код товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | mark_code_raw | Исходный код товара | **Returns:** self - #### public setShort() : self ```php public setShort(string|null $short = null) : self ``` **Summary** Устанавливает short. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | short | Код товара в формате короткого кода маркировки (тег в 54 ФЗ — 1306). | **Returns:** self - #### public setUnknown() : self ```php public setUnknown(string|null $unknown = null) : self ``` **Summary** Устанавливает unknown. **Details:** * Inherited From: [\YooKassa\Model\Receipt\MarkCodeInfo](../classes/YooKassa-Model-Receipt-MarkCodeInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | unknown | Нераспознанный код товара (тег в 54 ФЗ — 1300). | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-AbstractPaymentResponse.md000064400000230321150364342670024456 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Request\Payments\AbstractPaymentResponse ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель AbstractPaymentResponse. **Description:** Объект ответа от API, возвращающего информацию о платеже. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Payment-Payment.md#constant_MAX_LENGTH_DESCRIPTION) | | Максимальная длина строки описания платежа | | public | [MAX_LENGTH_MERCHANT_CUSTOMER_ID](../classes/YooKassa-Model-Payment-Payment.md#constant_MAX_LENGTH_MERCHANT_CUSTOMER_ID) | | Максимальная длина строки идентификатора покупателя в вашей системе | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Payment-Payment.md#property_amount) | | Сумма заказа | | public | [$authorization_details](../classes/YooKassa-Model-Payment-Payment.md#property_authorization_details) | | Данные об авторизации платежа | | public | [$authorizationDetails](../classes/YooKassa-Model-Payment-Payment.md#property_authorizationDetails) | | Данные об авторизации платежа | | public | [$cancellation_details](../classes/YooKassa-Model-Payment-Payment.md#property_cancellation_details) | | Комментарий к отмене платежа | | public | [$cancellationDetails](../classes/YooKassa-Model-Payment-Payment.md#property_cancellationDetails) | | Комментарий к отмене платежа | | public | [$captured_at](../classes/YooKassa-Model-Payment-Payment.md#property_captured_at) | | Время подтверждения платежа магазином | | public | [$capturedAt](../classes/YooKassa-Model-Payment-Payment.md#property_capturedAt) | | Время подтверждения платежа магазином | | public | [$confirmation](../classes/YooKassa-Model-Payment-Payment.md#property_confirmation) | | Способ подтверждения платежа | | public | [$created_at](../classes/YooKassa-Model-Payment-Payment.md#property_created_at) | | Время создания заказа | | public | [$createdAt](../classes/YooKassa-Model-Payment-Payment.md#property_createdAt) | | Время создания заказа | | public | [$deal](../classes/YooKassa-Model-Payment-Payment.md#property_deal) | | Данные о сделке, в составе которой проходит платеж | | public | [$description](../classes/YooKassa-Model-Payment-Payment.md#property_description) | | Описание транзакции | | public | [$expires_at](../classes/YooKassa-Model-Payment-Payment.md#property_expires_at) | | Время, до которого можно бесплатно отменить или подтвердить платеж | | public | [$expiresAt](../classes/YooKassa-Model-Payment-Payment.md#property_expiresAt) | | Время, до которого можно бесплатно отменить или подтвердить платеж | | public | [$id](../classes/YooKassa-Model-Payment-Payment.md#property_id) | | Идентификатор платежа | | public | [$income_amount](../classes/YooKassa-Model-Payment-Payment.md#property_income_amount) | | Сумма платежа, которую получит магазин | | public | [$incomeAmount](../classes/YooKassa-Model-Payment-Payment.md#property_incomeAmount) | | Сумма платежа, которую получит магазин | | public | [$merchant_customer_id](../classes/YooKassa-Model-Payment-Payment.md#property_merchant_customer_id) | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | public | [$merchantCustomerId](../classes/YooKassa-Model-Payment-Payment.md#property_merchantCustomerId) | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | public | [$metadata](../classes/YooKassa-Model-Payment-Payment.md#property_metadata) | | Метаданные платежа указанные мерчантом | | public | [$paid](../classes/YooKassa-Model-Payment-Payment.md#property_paid) | | Признак оплаты заказа | | public | [$payment_method](../classes/YooKassa-Model-Payment-Payment.md#property_payment_method) | | Способ проведения платежа | | public | [$paymentMethod](../classes/YooKassa-Model-Payment-Payment.md#property_paymentMethod) | | Способ проведения платежа | | public | [$receipt_registration](../classes/YooKassa-Model-Payment-Payment.md#property_receipt_registration) | | Состояние регистрации фискального чека | | public | [$receiptRegistration](../classes/YooKassa-Model-Payment-Payment.md#property_receiptRegistration) | | Состояние регистрации фискального чека | | public | [$recipient](../classes/YooKassa-Model-Payment-Payment.md#property_recipient) | | Получатель платежа | | public | [$refundable](../classes/YooKassa-Model-Payment-Payment.md#property_refundable) | | Возможность провести возврат по API | | public | [$refunded_amount](../classes/YooKassa-Model-Payment-Payment.md#property_refunded_amount) | | Сумма возвращенных средств платежа | | public | [$refundedAmount](../classes/YooKassa-Model-Payment-Payment.md#property_refundedAmount) | | Сумма возвращенных средств платежа | | public | [$status](../classes/YooKassa-Model-Payment-Payment.md#property_status) | | Текущее состояние платежа | | public | [$test](../classes/YooKassa-Model-Payment-Payment.md#property_test) | | Признак тестовой операции | | public | [$transfers](../classes/YooKassa-Model-Payment-Payment.md#property_transfers) | | Данные о распределении платежа между магазинами | | protected | [$_amount](../classes/YooKassa-Model-Payment-Payment.md#property__amount) | | | | protected | [$_authorization_details](../classes/YooKassa-Model-Payment-Payment.md#property__authorization_details) | | Данные об авторизации платежа | | protected | [$_cancellation_details](../classes/YooKassa-Model-Payment-Payment.md#property__cancellation_details) | | Комментарий к статусу canceled: кто отменил платеж и по какой причине | | protected | [$_captured_at](../classes/YooKassa-Model-Payment-Payment.md#property__captured_at) | | | | protected | [$_confirmation](../classes/YooKassa-Model-Payment-Payment.md#property__confirmation) | | | | protected | [$_created_at](../classes/YooKassa-Model-Payment-Payment.md#property__created_at) | | | | protected | [$_deal](../classes/YooKassa-Model-Payment-Payment.md#property__deal) | | | | protected | [$_description](../classes/YooKassa-Model-Payment-Payment.md#property__description) | | | | protected | [$_expires_at](../classes/YooKassa-Model-Payment-Payment.md#property__expires_at) | | Время, до которого можно бесплатно отменить или подтвердить платеж. В указанное время платеж в статусе `waiting_for_capture` будет автоматически отменен. | | protected | [$_id](../classes/YooKassa-Model-Payment-Payment.md#property__id) | | | | protected | [$_income_amount](../classes/YooKassa-Model-Payment-Payment.md#property__income_amount) | | | | protected | [$_merchant_customer_id](../classes/YooKassa-Model-Payment-Payment.md#property__merchant_customer_id) | | | | protected | [$_metadata](../classes/YooKassa-Model-Payment-Payment.md#property__metadata) | | | | protected | [$_paid](../classes/YooKassa-Model-Payment-Payment.md#property__paid) | | | | protected | [$_payment_method](../classes/YooKassa-Model-Payment-Payment.md#property__payment_method) | | | | protected | [$_receipt_registration](../classes/YooKassa-Model-Payment-Payment.md#property__receipt_registration) | | | | protected | [$_recipient](../classes/YooKassa-Model-Payment-Payment.md#property__recipient) | | | | protected | [$_refundable](../classes/YooKassa-Model-Payment-Payment.md#property__refundable) | | | | protected | [$_refunded_amount](../classes/YooKassa-Model-Payment-Payment.md#property__refunded_amount) | | | | protected | [$_status](../classes/YooKassa-Model-Payment-Payment.md#property__status) | | | | protected | [$_test](../classes/YooKassa-Model-Payment-Payment.md#property__test) | | Признак тестовой операции. | | protected | [$_transfers](../classes/YooKassa-Model-Payment-Payment.md#property__transfers) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getAmount) | | Возвращает сумму. | | public | [getAuthorizationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_getAuthorizationDetails) | | Возвращает данные об авторизации платежа. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_getCancellationDetails) | | Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [getCapturedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getCapturedAt) | | Возвращает время подтверждения платежа магазином или null, если время не задано. | | public | [getConfirmation()](../classes/YooKassa-Model-Payment-Payment.md#method_getConfirmation) | | Возвращает способ подтверждения платежа. | | public | [getCreatedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getCreatedAt) | | Возвращает время создания заказа. | | public | [getDeal()](../classes/YooKassa-Model-Payment-Payment.md#method_getDeal) | | Возвращает данные о сделке, в составе которой проходит платеж. | | public | [getDescription()](../classes/YooKassa-Model-Payment-Payment.md#method_getDescription) | | Возвращает описание транзакции | | public | [getExpiresAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getExpiresAt) | | Возвращает время до которого можно бесплатно отменить или подтвердить платеж, или null, если оно не задано. | | public | [getId()](../classes/YooKassa-Model-Payment-Payment.md#method_getId) | | Возвращает идентификатор платежа. | | public | [getIncomeAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getIncomeAmount) | | Возвращает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa. | | public | [getMerchantCustomerId()](../classes/YooKassa-Model-Payment-Payment.md#method_getMerchantCustomerId) | | Возвращает идентификатор покупателя в вашей системе. | | public | [getMetadata()](../classes/YooKassa-Model-Payment-Payment.md#method_getMetadata) | | Возвращает метаданные платежа установленные мерчантом | | public | [getPaid()](../classes/YooKassa-Model-Payment-Payment.md#method_getPaid) | | Проверяет, был ли уже оплачен заказ. | | public | [getPaymentMethod()](../classes/YooKassa-Model-Payment-Payment.md#method_getPaymentMethod) | | Возвращает используемый способ проведения платежа. | | public | [getReceiptRegistration()](../classes/YooKassa-Model-Payment-Payment.md#method_getReceiptRegistration) | | Возвращает состояние регистрации фискального чека. | | public | [getRecipient()](../classes/YooKassa-Model-Payment-Payment.md#method_getRecipient) | | Возвращает получателя платежа. | | public | [getRefundable()](../classes/YooKassa-Model-Payment-Payment.md#method_getRefundable) | | Проверяет возможность провести возврат по API. | | public | [getRefundedAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getRefundedAmount) | | Возвращает сумму возвращенных средств. | | public | [getStatus()](../classes/YooKassa-Model-Payment-Payment.md#method_getStatus) | | Возвращает состояние платежа. | | public | [getTest()](../classes/YooKassa-Model-Payment-Payment.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getTransfers()](../classes/YooKassa-Model-Payment-Payment.md#method_getTransfers) | | Возвращает массив распределения денег между магазинами. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setAmount) | | Устанавливает сумму платежа. | | public | [setAuthorizationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_setAuthorizationDetails) | | Устанавливает данные об авторизации платежа. | | public | [setCancellationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_setCancellationDetails) | | Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [setCapturedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setCapturedAt) | | Устанавливает время подтверждения платежа магазином | | public | [setConfirmation()](../classes/YooKassa-Model-Payment-Payment.md#method_setConfirmation) | | Устанавливает способ подтверждения платежа. | | public | [setCreatedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setCreatedAt) | | Устанавливает время создания заказа. | | public | [setDeal()](../classes/YooKassa-Model-Payment-Payment.md#method_setDeal) | | Устанавливает данные о сделке, в составе которой проходит платеж. | | public | [setDescription()](../classes/YooKassa-Model-Payment-Payment.md#method_setDescription) | | Устанавливает описание транзакции | | public | [setExpiresAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setExpiresAt) | | Устанавливает время до которого можно бесплатно отменить или подтвердить платеж. | | public | [setId()](../classes/YooKassa-Model-Payment-Payment.md#method_setId) | | Устанавливает идентификатор платежа. | | public | [setIncomeAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setIncomeAmount) | | Устанавливает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa | | public | [setMerchantCustomerId()](../classes/YooKassa-Model-Payment-Payment.md#method_setMerchantCustomerId) | | Устанавливает идентификатор покупателя в вашей системе. | | public | [setMetadata()](../classes/YooKassa-Model-Payment-Payment.md#method_setMetadata) | | Устанавливает метаданные платежа. | | public | [setPaid()](../classes/YooKassa-Model-Payment-Payment.md#method_setPaid) | | Устанавливает флаг оплаты заказа. | | public | [setPaymentMethod()](../classes/YooKassa-Model-Payment-Payment.md#method_setPaymentMethod) | | Устанавливает используемый способ проведения платежа. | | public | [setReceiptRegistration()](../classes/YooKassa-Model-Payment-Payment.md#method_setReceiptRegistration) | | Устанавливает состояние регистрации фискального чека | | public | [setRecipient()](../classes/YooKassa-Model-Payment-Payment.md#method_setRecipient) | | Устанавливает получателя платежа. | | public | [setRefundable()](../classes/YooKassa-Model-Payment-Payment.md#method_setRefundable) | | Устанавливает возможность провести возврат по API. | | public | [setRefundedAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setRefundedAmount) | | Устанавливает сумму возвращенных средств. | | public | [setStatus()](../classes/YooKassa-Model-Payment-Payment.md#method_setStatus) | | Устанавливает статус платежа | | public | [setTest()](../classes/YooKassa-Model-Payment-Payment.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [setTransfers()](../classes/YooKassa-Model-Payment-Payment.md#method_setTransfers) | | Устанавливает массив распределения денег между магазинами. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/AbstractPaymentResponse.php](../../lib/Request/Payments/AbstractPaymentResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) * \YooKassa\Request\Payments\AbstractPaymentResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Inherited from [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) Максимальная длина строки описания платежа ```php MAX_LENGTH_DESCRIPTION = 128 ``` ###### MAX_LENGTH_MERCHANT_CUSTOMER_ID Inherited from [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) Максимальная длина строки идентификатора покупателя в вашей системе ```php MAX_LENGTH_MERCHANT_CUSTOMER_ID = 200 ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма заказа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $authorization_details : \YooKassa\Model\Payment\AuthorizationDetailsInterface --- ***Description*** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $authorizationDetails : \YooKassa\Model\Payment\AuthorizationDetailsInterface --- ***Description*** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $cancellation_details : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене платежа **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $cancellationDetails : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене платежа **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $captured_at : \DateTime --- ***Description*** Время подтверждения платежа магазином **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $capturedAt : \DateTime --- ***Description*** Время подтверждения платежа магазином **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $confirmation : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation --- ***Description*** Способ подтверждения платежа **Type:** AbstractConfirmation **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $created_at : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $createdAt : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $deal : \YooKassa\Model\Deal\PaymentDealInfo --- ***Description*** Данные о сделке, в составе которой проходит платеж **Type:** PaymentDealInfo **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $description : string --- ***Description*** Описание транзакции **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $expires_at : \DateTime --- ***Description*** Время, до которого можно бесплатно отменить или подтвердить платеж **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $expiresAt : \DateTime --- ***Description*** Время, до которого можно бесплатно отменить или подтвердить платеж **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $id : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $income_amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма платежа, которую получит магазин **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $incomeAmount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма платежа, которую получит магазин **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $merchant_customer_id : string --- ***Description*** Идентификатор покупателя в вашей системе, например электронная почта или номер телефона **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $merchantCustomerId : string --- ***Description*** Идентификатор покупателя в вашей системе, например электронная почта или номер телефона **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные платежа указанные мерчантом **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $paid : bool --- ***Description*** Признак оплаты заказа **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $payment_method : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения платежа **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $paymentMethod : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения платежа **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $receipt_registration : string --- ***Description*** Состояние регистрации фискального чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $receiptRegistration : string --- ***Description*** Состояние регистрации фискального чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $recipient : \YooKassa\Model\Payment\RecipientInterface --- ***Description*** Получатель платежа **Type:** RecipientInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refundable : bool --- ***Description*** Возможность провести возврат по API **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refunded_amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возвращенных средств платежа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refundedAmount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возвращенных средств платежа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $status : string --- ***Description*** Текущее состояние платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $test : bool --- ***Description*** Признак тестовой операции **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $transfers : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Payment\TransferInterface[] --- ***Description*** Данные о распределении платежа между магазинами **Type:** TransferInterface[] **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_authorization_details : ?\YooKassa\Model\Payment\AuthorizationDetailsInterface --- **Summary** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_cancellation_details : ?\YooKassa\Model\CancellationDetailsInterface --- **Summary** Комментарий к статусу canceled: кто отменил платеж и по какой причине **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_captured_at : ?\DateTime --- **Type:** DateTime Время подтверждения платежа магазином **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_confirmation : ?\YooKassa\Model\Payment\Confirmation\AbstractConfirmation --- **Type:** AbstractConfirmation Способ подтверждения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_created_at : ?\DateTime --- **Type:** DateTime Время создания заказа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_deal : ?\YooKassa\Model\Deal\PaymentDealInfo --- **Type:** PaymentDealInfo Данные о сделке, в составе которой проходит платеж. Необходимо передавать, если вы проводите Безопасную сделку **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_description : ?string --- **Type:** ?string Описание платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_expires_at : ?\DateTime --- **Summary** Время, до которого можно бесплатно отменить или подтвердить платеж. В указанное время платеж в статусе `waiting_for_capture` будет автоматически отменен. **Type:** DateTime Время, до которого можно бесплатно отменить или подтвердить платеж **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_id : ?string --- **Type:** ?string Идентификатор платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_income_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_merchant_customer_id : ?string --- **Type:** ?string Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов. Присутствует, если вы хотите запомнить банковскую карту и отобразить ее при повторном платеже в виджете ЮKassa **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Type:** Metadata Метаданные платежа указанные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_paid : bool --- **Type:** bool Признак оплаты заказа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_payment_method : ?\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- **Type:** AbstractPaymentMethod Способ проведения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_receipt_registration : ?string --- **Type:** ?string Состояние регистрации фискального чека **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_recipient : ?\YooKassa\Model\Payment\RecipientInterface --- **Type:** RecipientInterface Получатель платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_refundable : bool --- **Type:** bool Возможность провести возврат по API **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_refunded_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface Сумма возвращенных средств платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_status : ?string --- **Type:** ?string Текущее состояние платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_test : bool --- **Summary** Признак тестовой операции. **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_transfers : ?\YooKassa\Common\ListObject --- **Type:** ListObject Данные о распределении платежа между магазинами **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма платежа #### public getAuthorizationDetails() : null|\YooKassa\Model\Payment\AuthorizationDetailsInterface ```php public getAuthorizationDetails() : null|\YooKassa\Model\Payment\AuthorizationDetailsInterface ``` **Summary** Возвращает данные об авторизации платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\Payment\AuthorizationDetailsInterface - Данные об авторизации платежа #### public getCancellationDetails() : null|\YooKassa\Model\CancellationDetailsInterface ```php public getCancellationDetails() : null|\YooKassa\Model\CancellationDetailsInterface ``` **Summary** Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\CancellationDetailsInterface - Комментарий к статусу canceled #### public getCapturedAt() : null|\DateTime ```php public getCapturedAt() : null|\DateTime ``` **Summary** Возвращает время подтверждения платежа магазином или null, если время не задано. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\DateTime - Время подтверждения платежа магазином #### public getConfirmation() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null ```php public getConfirmation() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null ``` **Summary** Возвращает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null - Способ подтверждения платежа #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \DateTime|null - Время создания заказа #### public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ``` **Summary** Возвращает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Deal\PaymentDealInfo|null - Данные о сделке, в составе которой проходит платеж #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - #### public getExpiresAt() : null|\DateTime ```php public getExpiresAt() : null|\DateTime ``` **Summary** Возвращает время до которого можно бесплатно отменить или подтвердить платеж, или null, если оно не задано. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\DateTime - Время, до которого можно бесплатно отменить или подтвердить платеж #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Идентификатор платежа #### public getIncomeAmount() : \YooKassa\Model\AmountInterface|null ```php public getIncomeAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма платежа, которую получит магазин #### public getMerchantCustomerId() : string|null ```php public getMerchantCustomerId() : string|null ``` **Summary** Возвращает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Идентификатор покупателя в вашей системе #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает метаданные платежа установленные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные платежа указанные мерчантом #### public getPaid() : bool ```php public getPaid() : bool ``` **Summary** Проверяет, был ли уже оплачен заказ. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Признак оплаты заказа, true если заказ оплачен, false если нет #### public getPaymentMethod() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null ```php public getPaymentMethod() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null ``` **Summary** Возвращает используемый способ проведения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null - Способ проведения платежа #### public getReceiptRegistration() : string|null ```php public getReceiptRegistration() : string|null ``` **Summary** Возвращает состояние регистрации фискального чека. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Состояние регистрации фискального чека #### public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ```php public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ``` **Summary** Возвращает получателя платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\Payment\RecipientInterface - Получатель платежа или null, если получатель не задан #### public getRefundable() : bool ```php public getRefundable() : bool ``` **Summary** Проверяет возможность провести возврат по API. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Возможность провести возврат по API, true если есть, false если нет #### public getRefundedAmount() : \YooKassa\Model\AmountInterface|null ```php public getRefundedAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму возвращенных средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма возвращенных средств платежа #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает состояние платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Текущее состояние платежа #### public getTest() : bool ```php public getTest() : bool ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Признак тестовой операции #### public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface ```php public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает массив распределения денег между магазинами. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface - Массив распределения денег #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма платежа | **Returns:** self - #### public setAuthorizationDetails() : self ```php public setAuthorizationDetails(\YooKassa\Model\Payment\AuthorizationDetailsInterface|array|null $authorization_details = null) : self ``` **Summary** Устанавливает данные об авторизации платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\AuthorizationDetailsInterface OR array OR null | authorization_details | Данные об авторизации платежа | **Returns:** self - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\CancellationDetailsInterface|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\CancellationDetailsInterface OR array OR null | cancellation_details | Комментарий к статусу canceled | **Returns:** self - #### public setCapturedAt() : self ```php public setCapturedAt(\DateTime|string|null $captured_at = null) : self ``` **Summary** Устанавливает время подтверждения платежа магазином **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | captured_at | Время подтверждения платежа магазином | **Returns:** self - #### public setConfirmation() : self ```php public setConfirmation(\YooKassa\Model\Payment\Confirmation\AbstractConfirmation|array|null $confirmation = null) : self ``` **Summary** Устанавливает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\Confirmation\AbstractConfirmation OR array OR null | confirmation | Способ подтверждения платежа | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания заказа | **Returns:** self - #### public setDeal() : self ```php public setDeal(null|array|\YooKassa\Model\Deal\PaymentDealInfo $deal = null) : self ``` **Summary** Устанавливает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\PaymentDealInfo | deal | Данные о сделке, в составе которой проходит платеж | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | | **Returns:** self - #### public setExpiresAt() : self ```php public setExpiresAt(\DateTime|string|null $expires_at = null) : self ``` **Summary** Устанавливает время до которого можно бесплатно отменить или подтвердить платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at | Время, до которого можно бесплатно отменить или подтвердить платеж | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор платежа | **Returns:** self - #### public setIncomeAmount() : self ```php public setIncomeAmount(\YooKassa\Model\AmountInterface|array|null $income_amount = null) : self ``` **Summary** Устанавливает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | income_amount | | **Returns:** self - #### public setMerchantCustomerId() : self ```php public setMerchantCustomerId(string|null $merchant_customer_id = null) : self ``` **Summary** Устанавливает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | merchant_customer_id | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает метаданные платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Метаданные платежа указанные мерчантом | **Returns:** self - #### public setPaid() : self ```php public setPaid(bool $paid) : self ``` **Summary** Устанавливает флаг оплаты заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | paid | Признак оплаты заказа | **Returns:** self - #### public setPaymentMethod() : self ```php public setPaymentMethod(\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|array|null $payment_method) : self ``` **Summary** Устанавливает используемый способ проведения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod OR array OR null | payment_method | Способ проведения платежа | **Returns:** self - #### public setReceiptRegistration() : self ```php public setReceiptRegistration(string|null $receipt_registration = null) : self ``` **Summary** Устанавливает состояние регистрации фискального чека **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | receipt_registration | Состояние регистрации фискального чека | **Returns:** self - #### public setRecipient() : self ```php public setRecipient(\YooKassa\Model\Payment\RecipientInterface|array|null $recipient = null) : self ``` **Summary** Устанавливает получателя платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\RecipientInterface OR array OR null | recipient | Объект с информацией о получателе платежа | **Returns:** self - #### public setRefundable() : self ```php public setRefundable(bool $refundable) : self ``` **Summary** Устанавливает возможность провести возврат по API. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | refundable | Возможность провести возврат по API | **Returns:** self - #### public setRefundedAmount() : self ```php public setRefundedAmount(\YooKassa\Model\AmountInterface|array|null $refunded_amount = null) : self ``` **Summary** Устанавливает сумму возвращенных средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | refunded_amount | Сумма возвращенных средств платежа | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус платежа | **Returns:** self - #### public setTest() : self ```php public setTest(bool $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | test | Признак тестовой операции | **Returns:** self - #### public setTransfers() : self ```php public setTransfers(\YooKassa\Common\ListObjectInterface|array|null $transfers = null) : self ``` **Summary** Устанавливает массив распределения денег между магазинами. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | transfers | Массив распределения денег | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md000064400000061060150364342670024371 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\SelfEmployed\SelfEmployedRequest ### Namespace: [\YooKassa\Request\SelfEmployed](../namespaces/yookassa-request-selfemployed.md) --- **Summary:** Класс, представляющий модель SelfEmployedRequest. **Description:** Запрос на создание объекта самозанятого. --- ### Examples Пример использования билдера ```php try { $selfEmployedBuilder = \YooKassa\Request\SelfEmployed\SelfEmployedRequest::builder(); $selfEmployedBuilder ->setItn('123456789012') ->setPhone('79001002030') ->setConfirmation(['type' => \YooKassa\Model\SelfEmployed\SelfEmployedConfirmationType::REDIRECT]) ; // Создаем объект запроса $request = $selfEmployedBuilder->build(); $idempotenceKey = uniqid('', true); $response = $client->createSelfEmployed($request, $idempotenceKey); } catch (Exception $e) { $response = $e; } var_dump($response); ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$confirmation](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md#property_confirmation) | | Сценарий подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. | | public | [$itn](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md#property_itn) | | ИНН самозанятого. Формат: 12 цифр без пробелов. Обязательный параметр, если не передан phone. | | public | [$phone](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md#property_phone) | | Телефон самозанятого, который привязан к личному кабинету в сервисе Мой налог. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [builder()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md#method_builder) | | Возвращает билдер объектов запросов создания платежа. | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getConfirmation()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md#method_getConfirmation) | | Возвращает сценарий подтверждения. | | public | [getItn()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md#method_getItn) | | Возвращает ИНН самозанятого. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [getPhone()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md#method_getPhone) | | Возвращает телефон самозанятого. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasConfirmation()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md#method_hasConfirmation) | | Проверяет наличие сценария подтверждения самозанятого в запросе. | | public | [hasItn()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md#method_hasItn) | | Проверяет наличие ИНН самозанятого в запросе. | | public | [hasPhone()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md#method_hasPhone) | | Проверяет наличие телефона самозанятого в запросе. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setConfirmation()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md#method_setConfirmation) | | Устанавливает сценарий подтверждения. | | public | [setItn()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md#method_setItn) | | Устанавливает ИНН самозанятого. | | public | [setPhone()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md#method_setPhone) | | Устанавливает телефон самозанятого. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | public | [validate()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md#method_validate) | | Проверяет на валидность текущий объект | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_setValidationError) | | Устанавливает ошибку валидации. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/SelfEmployed/SelfEmployedRequest.php](../../lib/Request/SelfEmployed/SelfEmployedRequest.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) * \YooKassa\Request\SelfEmployed\SelfEmployedRequest * Implements: * [\YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $confirmation : null|\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation --- ***Description*** Сценарий подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. **Type:** SelfEmployedRequestConfirmation **Details:** #### public $itn : null|string --- ***Description*** ИНН самозанятого. Формат: 12 цифр без пробелов. Обязательный параметр, если не передан phone. **Type:** null|string **Details:** #### public $phone : null|string --- ***Description*** Телефон самозанятого, который привязан к личному кабинету в сервисе Мой налог. **Type:** null|string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public builder() : \YooKassa\Request\SelfEmployed\SelfEmployedRequestBuilder ```php Static public builder() : \YooKassa\Request\SelfEmployed\SelfEmployedRequestBuilder ``` **Summary** Возвращает билдер объектов запросов создания платежа. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequest](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md) **Returns:** \YooKassa\Request\SelfEmployed\SelfEmployedRequestBuilder - #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getConfirmation() : \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation|null ```php public getConfirmation() : \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation|null ``` **Summary** Возвращает сценарий подтверждения. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequest](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md) **Returns:** \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation|null - Сценарий подтверждения #### public getItn() : string|null ```php public getItn() : string|null ``` **Summary** Возвращает ИНН самозанятого. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequest](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md) **Returns:** string|null - ИНН самозанятого #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string|null - Последняя произошедшая ошибка валидации #### public getPhone() : string|null ```php public getPhone() : string|null ``` **Summary** Возвращает телефон самозанятого. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequest](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md) **Returns:** string|null - Телефон самозанятого #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasConfirmation() : bool ```php public hasConfirmation() : bool ``` **Summary** Проверяет наличие сценария подтверждения самозанятого в запросе. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequest](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md) **Returns:** bool - True если сценарий подтверждения самозанятого задан, false если нет #### public hasItn() : bool ```php public hasItn() : bool ``` **Summary** Проверяет наличие ИНН самозанятого в запросе. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequest](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md) **Returns:** bool - True если ИНН самозанятого задан, false если нет #### public hasPhone() : bool ```php public hasPhone() : bool ``` **Summary** Проверяет наличие телефона самозанятого в запросе. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequest](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md) **Returns:** bool - True если телефон самозанятого задан, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setConfirmation() : $this ```php public setConfirmation(null|array|\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation $confirmation = null) : $this ``` **Summary** Устанавливает сценарий подтверждения. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequest](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation | confirmation | Сценарий подтверждения | **Returns:** $this - #### public setItn() : self ```php public setItn(string|null $itn = null) : self ``` **Summary** Устанавливает ИНН самозанятого. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequest](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | itn | ИНН самозанятого | **Returns:** self - #### public setPhone() : self ```php public setPhone(string|array|null $phone = null) : self ``` **Summary** Устанавливает телефон самозанятого. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequest](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR array OR null | phone | Телефон самозанятого | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public validate() : bool ```php public validate() : bool ``` **Summary** Проверяет на валидность текущий объект **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequest](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequest.md) **Returns:** bool - True если объект запроса валиден, false если нет #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setValidationError() : void ```php protected setValidationError(string $value) : void ``` **Summary** Устанавливает ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** void - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodFactory.md000064400000007600150364342670025747 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodFactory ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodFactory. **Description:** Фабрика создания объекта платежных методов из массива. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [YANDEX_MONEY](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodFactory.md#constant_YANDEX_MONEY) | *deprecated* | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [factory()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodFactory.md#method_factory) | | Фабричный метод создания объекта платежных данных по типу. | | public | [factoryFromArray()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodFactory.md#method_factoryFromArray) | | Фабричный метод создания объекта платежных данных из массива. | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodFactory.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodFactory.php) * Package: YooKassa\Model * Class Hierarchy: * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodFactory * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### ~~YANDEX_MONEY~~ ```php YANDEX_MONEY = 'yandex_money' ``` **deprecated** Для поддержки старых платежей --- ## Methods #### public factory() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod ```php public factory(string|null $type) : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod ``` **Summary** Фабричный метод создания объекта платежных данных по типу. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodFactory](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod - #### public factoryFromArray() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod ```php public factoryFromArray(array $data, null|string $type = null) : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod ``` **Summary** Фабричный метод создания объекта платежных данных из массива. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodFactory](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | data | Массив платежных данных | | null OR string | type | Тип платежного метода | **Returns:** \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyValueException.md000064400000005541150364342670025772 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\InvalidPropertyValueException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-InvalidPropertyValueException.md#method___construct) | | InvalidPropertyValueTypeException constructor. | | public | [getProperty()](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md#method_getProperty) | | | | public | [getValue()](../classes/YooKassa-Common-Exceptions-InvalidPropertyValueException.md#method_getValue) | | | --- ### Details * File: [lib/Common/Exceptions/InvalidPropertyValueException.php](../../lib/Common/Exceptions/InvalidPropertyValueException.php) * Package: Default * Class Hierarchy: * [\InvalidArgumentException](\InvalidArgumentException) * [\YooKassa\Common\Exceptions\InvalidPropertyException](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md) * \YooKassa\Common\Exceptions\InvalidPropertyValueException --- ## Methods #### public __construct() : mixed ```php public __construct(string $message = '', int $code, string $property = '', mixed|null $value = null) : mixed ``` **Summary** InvalidPropertyValueTypeException constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\InvalidPropertyValueException](../classes/YooKassa-Common-Exceptions-InvalidPropertyValueException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | message | | | int | code | | | string | property | | | mixed OR null | value | | **Returns:** mixed - #### public getProperty() : string ```php public getProperty() : string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\InvalidPropertyException](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md) **Returns:** string - #### public getValue() : mixed ```php public getValue() : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\InvalidPropertyValueException](../classes/YooKassa-Common-Exceptions-InvalidPropertyValueException.md) **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-ReceiptType.md000064400000010442150364342670021276 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\ReceiptType ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** ReceiptType - Тип чека в онлайн-кассе. **Description:** Возможные значения: - `payment` - Приход - `refund` - Возврат - `simple` - Простой --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [PAYMENT](../classes/YooKassa-Model-Receipt-ReceiptType.md#constant_PAYMENT) | | Тип чека: приход | | public | [REFUND](../classes/YooKassa-Model-Receipt-ReceiptType.md#constant_REFUND) | | Тип чека: возврат | | public | [SIMPLE](../classes/YooKassa-Model-Receipt-ReceiptType.md#constant_SIMPLE) | | Тип чека: простой | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Receipt-ReceiptType.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Receipt/ReceiptType.php](../../lib/Model/Receipt/ReceiptType.php) * Package: Default * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Receipt\ReceiptType --- ## Constants ###### PAYMENT Тип чека: приход ```php PAYMENT = 'payment' ``` ###### REFUND Тип чека: возврат ```php REFUND = 'refund' ``` ###### SIMPLE Тип чека: простой ```php SIMPLE = 'simple' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSbp.md000064400000054656150364342670025101 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodSbp ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodSbp. **Description:** Оплата через СБП (Система быстрых платежей ЦБ РФ). --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSbp.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodSbp.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodSbp.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodSbp * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodSbp](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodSbp.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Notification-NotificationWaitingForCapture.md000064400000057526150364342670026056 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Notification\NotificationWaitingForCapture ### Namespace: [\YooKassa\Model\Notification](../namespaces/yookassa-model-notification.md) --- **Summary:** Класс объекта, присылаемого API при изменении статуса платежа на "waiting_for_capture". --- ### Examples Пример скрипта обработки уведомления ```php require_once '../vendor/autoload.php'; try { $source = file_get_contents('php://input'); $data = json_decode($source, true); $factory = new \YooKassa\Model\Notification\NotificationFactory(); $notificationObject = $factory->factory($data); $responseObject = $notificationObject->getObject(); $client = new \YooKassa\Client(); if (!$client->isNotificationIPTrusted($_SERVER['REMOTE_ADDR'])) { header('HTTP/1.1 400 Something went wrong'); exit; } if (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_CANCELED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::REFUND_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'refundId' => $responseObject->getId(), 'refundStatus' => $responseObject->getStatus(), 'paymentId' => $responseObject->getPaymentId(), ]; // ... // Специфичная логика } else { header('HTTP/1.1 400 Something went wrong'); exit; } // Специфичная логика // ... $client->setAuth('xxxxxx', 'test_XXXXXXX'); // Получим актуальную информацию о платеже if ($paymentInfo = $client->getPaymentInfo($someData['paymentId'])) { $paymentStatus = $paymentInfo->getStatus(); // Специфичная логика // ... } else { header('HTTP/1.1 400 Something went wrong'); exit; } } catch (Exception $e) { header('HTTP/1.1 400 Something went wrong'); exit; } ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_event) | | Тип события | | public | [$object](../classes/YooKassa-Model-Notification-NotificationWaitingForCapture.md#property_object) | | Объект с информацией о платеже, который можно подтвердить или отменить | | public | [$type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_type) | | Тип уведомления в виде строки | | protected | [$_event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__event) | | | | protected | [$_type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Model-Notification-NotificationWaitingForCapture.md#method_fromArray) | | Конструктор объекта нотификации о возможности подтверждения платежа. | | public | [getEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getEvent) | | Возвращает тип события. | | public | [getObject()](../classes/YooKassa-Model-Notification-NotificationWaitingForCapture.md#method_getObject) | | Возвращает объект с информацией о платеже, уведомление о котором хранится в текущем объекте. | | public | [getType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getType) | | Возвращает тип уведомления. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setObject()](../classes/YooKassa-Model-Notification-NotificationWaitingForCapture.md#method_setObject) | | Устанавливает объект с информацией о платеже, уведомление о которой хранится в текущем объекте. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setEvent) | | Устанавливает тип события. | | protected | [setType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setType) | | Устанавливает тип уведомления. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Notification/NotificationWaitingForCapture.php](../../lib/Model/Notification/NotificationWaitingForCapture.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) * \YooKassa\Model\Notification\NotificationWaitingForCapture * See Also: * [При создании платежа с флагом "capture" равным false, после того как клиент проводит платёж, от API на эндпоинт, указанный в настройках API посылается уведомление о том, что платёж теперь может быть проведён. В классе описана структура такого объекта для магазинов, которые получают уведомления на HTTPS endpoint.](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $event : string --- ***Description*** Тип события **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### public $object : \YooKassa\Model\Payment\PaymentInterface --- ***Description*** Объект с информацией о платеже, который можно подтвердить или отменить **Type:** PaymentInterface **Details:** #### public $type : string --- ***Description*** Тип уведомления в виде строки **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### protected $_event : ?string --- **Type:** ?string Тип произошедшего события **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### protected $_type : ?string --- **Type:** ?string Тип уведомления **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array $sourceArray) : void ``` **Summary** Конструктор объекта нотификации о возможности подтверждения платежа. **Description** Инициализирует текущий объект из ассоциативного массива, который просто путём JSON десериализации получен из тела пришедшего запроса. При конструировании проверяется валидность типа передаваемого уведомления, если передать уведомление не того типа, будет сгенерировано исключение типа {@link} **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationWaitingForCapture](../classes/YooKassa-Model-Notification-NotificationWaitingForCapture.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | sourceArray | Ассоциативный массив с информацией об уведомлении | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если значение типа нотификации или события не равны "notification" и "payment.waiting_for_capture" соответственно, что может говорить о том, что переданные в конструктор данные не являются уведомлением нужного типа. | **Returns:** void - #### public getEvent() : string|null ```php public getEvent() : string|null ``` **Summary** Возвращает тип события. **Description** Тип события - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип события #### public getObject() : \YooKassa\Model\Payment\PaymentInterface ```php public getObject() : \YooKassa\Model\Payment\PaymentInterface ``` **Summary** Возвращает объект с информацией о платеже, уведомление о котором хранится в текущем объекте. **Description** Так как нотификация может быть сгенерирована и поставлена в очередь на отправку гораздо раньше, чем она будет получена на сайте, то опираться на статус пришедшего платежа не стоит, лучше запросить текущую информацию о платеже у API. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationWaitingForCapture](../classes/YooKassa-Model-Notification-NotificationWaitingForCapture.md) **Returns:** \YooKassa\Model\Payment\PaymentInterface - Объект с информацией о платеже, который можно подтвердить или отменить #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип уведомления. **Description** Тип уведомления - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип уведомления в виде строки #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setObject() : self ```php public setObject(\YooKassa\Model\Payment\PaymentInterface|array $object) : self ``` **Summary** Устанавливает объект с информацией о платеже, уведомление о которой хранится в текущем объекте. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationWaitingForCapture](../classes/YooKassa-Model-Notification-NotificationWaitingForCapture.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\PaymentInterface OR array | object | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setEvent() : self ```php protected setEvent(string|null $event) : self ``` **Summary** Устанавливает тип события. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | event | Тип события | **Returns:** self - #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип уведомления. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип уведомления | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-BadApiRequestException.md000064400000010703150364342670024327 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\BadApiRequestException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- **Summary:** Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [HTTP_CODE](../classes/YooKassa-Common-Exceptions-BadApiRequestException.md#constant_HTTP_CODE) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$retryAfter](../classes/YooKassa-Common-Exceptions-BadApiRequestException.md#property_retryAfter) | | | | public | [$type](../classes/YooKassa-Common-Exceptions-BadApiRequestException.md#property_type) | | | | protected | [$responseBody](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseBody) | | | | protected | [$responseHeaders](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseHeaders) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-BadApiRequestException.md#method___construct) | | Constructor. | | public | [getResponseBody()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseBody) | | | | public | [getResponseHeaders()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseHeaders) | | | --- ### Details * File: [lib/Common/Exceptions/BadApiRequestException.php](../../lib/Common/Exceptions/BadApiRequestException.php) * Package: Default * Class Hierarchy: * [\Exception](\Exception) * [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) * \YooKassa\Common\Exceptions\BadApiRequestException --- ## Constants ###### HTTP_CODE ```php HTTP_CODE = 400 ``` --- ## Properties #### public $retryAfter : mixed --- **Type:** mixed **Details:** #### public $type : mixed --- **Type:** mixed **Details:** #### protected $responseBody : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) #### protected $responseHeaders : array --- **Type:** array **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) --- ## Methods #### public __construct() : mixed ```php public __construct(mixed $responseHeaders = [], mixed $responseBody = '') : mixed ``` **Summary** Constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\BadApiRequestException](../classes/YooKassa-Common-Exceptions-BadApiRequestException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | responseHeaders | HTTP header | | mixed | responseBody | HTTP body | **Returns:** mixed - #### public getResponseBody() : ?string ```php public getResponseBody() : ?string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** ?string - #### public getResponseHeaders() : string[] ```php public getResponseHeaders() : string[] ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** string[] - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Client-ApiClientInterface.md000064400000015173150364342670021325 0ustar00# [YooKassa API SDK](../home.md) # Interface: ApiClientInterface ### Namespace: [\YooKassa\Client](../namespaces/yookassa-client.md) --- **Summary:** Interface ApiClientInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [call()](../classes/YooKassa-Client-ApiClientInterface.md#method_call) | | Создает CURL запрос, получает и возвращает обработанный ответ | | public | [getUserAgent()](../classes/YooKassa-Client-ApiClientInterface.md#method_getUserAgent) | | Возвращает UserAgent. | | public | [setAdvancedCurlOptions()](../classes/YooKassa-Client-ApiClientInterface.md#method_setAdvancedCurlOptions) | | Устанавливает дополнительные настройки curl. | | public | [setBearerToken()](../classes/YooKassa-Client-ApiClientInterface.md#method_setBearerToken) | | Устанавливает OAuth-токен магазина. | | public | [setConfig()](../classes/YooKassa-Client-ApiClientInterface.md#method_setConfig) | | Устанавливает настройки. | | public | [setLogger()](../classes/YooKassa-Client-ApiClientInterface.md#method_setLogger) | | Устанавливает объект для логирования. | | public | [setShopId()](../classes/YooKassa-Client-ApiClientInterface.md#method_setShopId) | | Устанавливает shopId магазина. | | public | [setShopPassword()](../classes/YooKassa-Client-ApiClientInterface.md#method_setShopPassword) | | Устанавливает секретный ключ магазина. | --- ### Details * File: [lib/Client/ApiClientInterface.php](../../lib/Client/ApiClientInterface.php) * Package: \YooKassa * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | --- ## Methods #### public call() : \YooKassa\Common\ResponseObject ```php public call(string $path, string $method, array $queryParams, null|string $httpBody = null, array $headers = []) : \YooKassa\Common\ResponseObject ``` **Summary** Создает CURL запрос, получает и возвращает обработанный ответ **Details:** * Inherited From: [\YooKassa\Client\ApiClientInterface](../classes/YooKassa-Client-ApiClientInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | path | URL запроса | | string | method | HTTP метод | | array | queryParams | Массив GET параметров запроса | | null OR string | httpBody | Тело запроса | | array | headers | Массив заголовков запроса | **Returns:** \YooKassa\Common\ResponseObject - #### public setLogger() : mixed ```php public setLogger(null|\Psr\Log\LoggerInterface $logger) : mixed ``` **Summary** Устанавливает объект для логирования. **Details:** * Inherited From: [\YooKassa\Client\ApiClientInterface](../classes/YooKassa-Client-ApiClientInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \Psr\Log\LoggerInterface | logger | Объект для логирования | **Returns:** mixed - #### public getUserAgent() : \YooKassa\Client\UserAgent ```php public getUserAgent() : \YooKassa\Client\UserAgent ``` **Summary** Возвращает UserAgent. **Details:** * Inherited From: [\YooKassa\Client\ApiClientInterface](../classes/YooKassa-Client-ApiClientInterface.md) **Returns:** \YooKassa\Client\UserAgent - #### public setShopId() : mixed ```php public setShopId(int|string|null $shopId) : mixed ``` **Summary** Устанавливает shopId магазина. **Details:** * Inherited From: [\YooKassa\Client\ApiClientInterface](../classes/YooKassa-Client-ApiClientInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR string OR null | shopId | shopId магазина | **Returns:** mixed - #### public setShopPassword() : mixed ```php public setShopPassword(?string $shopPassword) : mixed ``` **Summary** Устанавливает секретный ключ магазина. **Details:** * Inherited From: [\YooKassa\Client\ApiClientInterface](../classes/YooKassa-Client-ApiClientInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?string | shopPassword | | **Returns:** mixed - #### public setBearerToken() : mixed ```php public setBearerToken(?string $bearerToken) : mixed ``` **Summary** Устанавливает OAuth-токен магазина. **Details:** * Inherited From: [\YooKassa\Client\ApiClientInterface](../classes/YooKassa-Client-ApiClientInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?string | bearerToken | | **Returns:** mixed - #### public setConfig() : mixed ```php public setConfig(array $config) : mixed ``` **Summary** Устанавливает настройки. **Details:** * Inherited From: [\YooKassa\Client\ApiClientInterface](../classes/YooKassa-Client-ApiClientInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | config | | **Returns:** mixed - #### public setAdvancedCurlOptions() : void ```php public setAdvancedCurlOptions() : void ``` **Summary** Устанавливает дополнительные настройки curl. **Details:** * Inherited From: [\YooKassa\Client\ApiClientInterface](../classes/YooKassa-Client-ApiClientInterface.md) **Returns:** void - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md000064400000063365150364342670024707 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Refunds\CreateRefundRequestBuilder ### Namespace: [\YooKassa\Request\Refunds](../namespaces/yookassa-request-refunds.md) --- **Summary:** Класс, представляющий модель CreateRefundRequestBuilder. **Description:** Класс билдера запросов к API на создание возврата средств. --- ### Examples Пример использования билдера ```php try { $refundBuilder = \YooKassa\Request\Refunds\CreateRefundRequest::builder(); $refundBuilder ->setPaymentId('24b94598-000f-5000-9000-1b68e7b15f3f') ->setAmount(3500.00) ->setCurrency(\YooKassa\Model\CurrencyCode::RUB) ->setDescription('Не подошел цвет') ->setReceiptItems([ (new \YooKassa\Model\Receipt\ReceiptItem) ->setDescription('Платок Gucci Новый') ->setQuantity(1) ->setVatCode(2) ->setPrice(new \YooKassa\Model\Receipt\ReceiptItemAmount(3500.00)) ->setPaymentSubject(\YooKassa\Model\Receipt\PaymentSubject::COMMODITY) ->setPaymentMode(\YooKassa\Model\Receipt\PaymentMode::FULL_PAYMENT) ]) ->setReceiptEmail('john.doe@merchant.com') ->setTaxSystemCode(1) ; // Создаем объект запроса $request = $refundBuilder->build(); // Можно изменить данные, если нужно $request->setDescription('Не подошел цвет и размер'); $idempotenceKey = uniqid('', true); $response = $client->createRefund($request, $idempotenceKey); } catch (Exception $e) { $response = $e; } var_dump($response); ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$amount](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#property_amount) | | Сумма | | protected | [$currentObject](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md#property_currentObject) | | Собираемый объект запроса к API. | | protected | [$receipt](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#property_receipt) | | Объект с информацией о чеке | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. | | public | [addReceiptItem()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_addReceiptItem) | | Добавляет в чек товар | | public | [addReceiptShipping()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_addReceiptShipping) | | Добавляет в чек доставку товара. | | public | [addSource()](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md#method_addSource) | | Добавляет источник возврата. | | public | [addTransfer()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_addTransfer) | | Добавляет трансфер. | | public | [build()](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md#method_build) | | Строит объект запроса к API. | | public | [setAmount()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setAmount) | | Устанавливает сумму. | | public | [setCurrency()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setCurrency) | | Устанавливает валюту в которой будет происходить подтверждение оплаты заказа. | | public | [setDeal()](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md#method_setDeal) | | Устанавливает сделку. | | public | [setDescription()](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md#method_setDescription) | | Устанавливает комментарий к возврату. | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива. | | public | [setPaymentId()](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md#method_setPaymentId) | | Устанавливает айди платежа для которого создаётся возврат | | public | [setReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceipt) | | Устанавливает чек. | | public | [setReceiptEmail()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceiptEmail) | | Устанавливает адрес электронной почты получателя чека. | | public | [setReceiptItems()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceiptItems) | | Устанавливает список товаров для создания чека. | | public | [setReceiptPhone()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceiptPhone) | | Устанавливает телефон получателя чека. | | public | [setSources()](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md#method_setSources) | | Устанавливает источники возврата. | | public | [setTaxSystemCode()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setTaxSystemCode) | | Устанавливает код системы налогообложения. | | public | [setTransfers()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setTransfers) | | Устанавливает трансферы. | | protected | [initCurrentObject()](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md#method_initCurrentObject) | | Возвращает новый объект для сборки. | --- ### Details * File: [lib/Request/Refunds/CreateRefundRequestBuilder.php](../../lib/Request/Refunds/CreateRefundRequestBuilder.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) * [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) * \YooKassa\Request\Refunds\CreateRefundRequestBuilder * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### protected $amount : ?\YooKassa\Model\MonetaryAmount --- **Summary** Сумма **Type:** MonetaryAmount **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) #### protected $currentObject : ?\YooKassa\Common\AbstractRequestInterface --- **Summary** Собираемый объект запроса к API. **Type:** AbstractRequestInterface **Details:** #### protected $receipt : ?\YooKassa\Model\Receipt\Receipt --- **Summary** Объект с информацией о чеке **Type:** Receipt **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public addReceiptItem() : self ```php public addReceiptItem(string $title, string $price, float $quantity, int $vatCode, null|string $paymentMode = null, null|string $paymentSubject = null, null|mixed $productCode = null, null|mixed $countryOfOriginCode = null, null|mixed $customsDeclarationNumber = null, null|mixed $excise = null) : self ``` **Summary** Добавляет в чек товар **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) * See Also: * [](\YooKassa\Request\Payments\PaymentSubject) * [](\YooKassa\Request\Payments\PaymentMode) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | title | Название или описание товара | | string | price | Цена товара в валюте, заданной в заказе | | float | quantity | Количество товара | | int | vatCode | Ставка НДС | | null OR string | paymentMode | значение перечисления PaymentMode | | null OR string | paymentSubject | значение перечисления PaymentSubject | | null OR mixed | productCode | | | null OR mixed | countryOfOriginCode | | | null OR mixed | customsDeclarationNumber | | | null OR mixed | excise | | **Returns:** self - Инстанс билдера запросов #### public addReceiptShipping() : self ```php public addReceiptShipping(string $title, string $price, int $vatCode, null|string $paymentMode = null, null|string $paymentSubject = null) : self ``` **Summary** Добавляет в чек доставку товара. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) * See Also: * [](\YooKassa\Request\Payments\PaymentSubject) * [](\YooKassa\Request\Payments\PaymentMode) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | title | Название доставки в чеке | | string | price | Стоимость доставки | | int | vatCode | Ставка НДС | | null OR string | paymentMode | значение перечисления PaymentMode | | null OR string | paymentSubject | значение перечисления PaymentSubject | **Returns:** self - Инстанс билдера запросов #### public addSource() : self ```php public addSource(array|\YooKassa\Model\Refund\SourceInterface $value) : self ``` **Summary** Добавляет источник возврата. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestBuilder](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Refund\SourceInterface | value | Источник возврата | **Returns:** self - Инстанс билдера запросов #### public addTransfer() : self ```php public addTransfer(array|\YooKassa\Request\Payments\TransferDataInterface $value) : self ``` **Summary** Добавляет трансфер. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Payments\TransferDataInterface | value | Трансфер | **Returns:** self - Инстанс билдера запросов #### public build() : \YooKassa\Request\Refunds\CreateRefundRequest|\YooKassa\Common\AbstractRequestInterface ```php public build(null|array $options = null) : \YooKassa\Request\Refunds\CreateRefundRequest|\YooKassa\Common\AbstractRequestInterface ``` **Summary** Строит объект запроса к API. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestBuilder](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array | options | Устанавливаемые параметры запроса | **Returns:** \YooKassa\Request\Refunds\CreateRefundRequest|\YooKassa\Common\AbstractRequestInterface - Инстанс сгенерированного объекта запроса к API #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|\YooKassa\Request\Payments\numeric $value, string|null $currency = null) : self ``` **Summary** Устанавливает сумму. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR \YooKassa\Request\Payments\numeric | value | Сумма оплаты | | string OR null | currency | Валюта | **Returns:** self - Инстанс билдера запросов #### public setCurrency() : self ```php public setCurrency(string $value) : self ``` **Summary** Устанавливает валюту в которой будет происходить подтверждение оплаты заказа. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Валюта в которой подтверждается оплата | **Returns:** self - Инстанс билдера запросов #### public setDeal() : \YooKassa\Request\Refunds\CreateRefundRequestBuilder ```php public setDeal(null|array|\YooKassa\Model\Deal\RefundDealData $value) : \YooKassa\Request\Refunds\CreateRefundRequestBuilder ``` **Summary** Устанавливает сделку. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestBuilder](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\RefundDealData | value | Данные о сделке, в составе которой проходит возврат | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | | **Returns:** \YooKassa\Request\Refunds\CreateRefundRequestBuilder - Инстанс билдера запросов #### public setDescription() : \YooKassa\Request\Refunds\CreateRefundRequestBuilder ```php public setDescription(string|null $value) : \YooKassa\Request\Refunds\CreateRefundRequestBuilder ``` **Summary** Устанавливает комментарий к возврату. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestBuilder](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Комментарий к возврату | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если была передана не строка | **Returns:** \YooKassa\Request\Refunds\CreateRefundRequestBuilder - Инстанс текущего билдера #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(iterable|null $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable OR null | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### public setPaymentId() : \YooKassa\Request\Refunds\CreateRefundRequestBuilder ```php public setPaymentId(string|null $value) : \YooKassa\Request\Refunds\CreateRefundRequestBuilder ``` **Summary** Устанавливает айди платежа для которого создаётся возврат **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestBuilder](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Айди платежа | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\EmptyPropertyValueException | Выбрасывается если передано пустое значение айди платежа | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если переданное значение является строкой, но не является валидным значением айди платежа | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если передано значение не валидного типа | **Returns:** \YooKassa\Request\Refunds\CreateRefundRequestBuilder - Инстанс текущего билдера #### public setReceipt() : self ```php public setReceipt(array|\YooKassa\Model\Receipt\ReceiptInterface $value) : self ``` **Summary** Устанавливает чек. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\ReceiptInterface | value | Инстанс чека или ассоциативный массив с данными чека | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если было передано значение невалидного типа | **Returns:** self - Инстанс билдера запросов #### public setReceiptEmail() : self ```php public setReceiptEmail(string|null $value) : self ``` **Summary** Устанавливает адрес электронной почты получателя чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Email получателя чека | **Returns:** self - Инстанс билдера запросов #### public setReceiptItems() : self ```php public setReceiptItems(array $value = []) : self ``` **Summary** Устанавливает список товаров для создания чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | value | Массив товаров в заказе | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если хотя бы один из товаров имеет неверную структуру | **Returns:** self - Инстанс билдера запросов #### public setReceiptPhone() : self ```php public setReceiptPhone(string|null $value) : self ``` **Summary** Устанавливает телефон получателя чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Телефон получателя чека | **Returns:** self - Инстанс билдера запросов #### public setSources() : self ```php public setSources(array|\YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface $value) : self ``` **Summary** Устанавливает источники возврата. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestBuilder](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Refund\SourceInterface[] OR \YooKassa\Common\ListObjectInterface | value | Массив трансферов | **Returns:** self - Инстанс билдера запросов #### public setTaxSystemCode() : self ```php public setTaxSystemCode(int|null $value) : self ``` **Summary** Устанавливает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | value | Код системы налогообложения. Число 1-6. | **Returns:** self - Инстанс билдера запросов #### public setTransfers() : self ```php public setTransfers(array|\YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface $value) : self ``` **Summary** Устанавливает трансферы. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Payments\TransferDataInterface[] OR \YooKassa\Common\ListObjectInterface | value | Массив трансферов | **Returns:** self - Инстанс билдера запросов #### protected initCurrentObject() : \YooKassa\Request\Refunds\CreateRefundRequest ```php protected initCurrentObject() : \YooKassa\Request\Refunds\CreateRefundRequest ``` **Summary** Возвращает новый объект для сборки. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestBuilder](../classes/YooKassa-Request-Refunds-CreateRefundRequestBuilder.md) **Returns:** \YooKassa\Request\Refunds\CreateRefundRequest - Собираемый объект запроса к API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md000064400000041502150364342670026224 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\PersonalData\PersonalDataCancellationDetails ### Namespace: [\YooKassa\Model\PersonalData](../namespaces/yookassa-model-personaldata.md) --- **Summary:** Класс, представляющий модель PersonalDataCancellationDetails. **Description:** Комментарий к статусу ~`canceled`: кто и по какой причине аннулировал хранение данных. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$party](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md#property_party) | | Участник процесса, который принял решение о прекращении хранения персональных данных | | public | [$reason](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md#property_reason) | | Причина прекращения хранения персональных данных | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getParty()](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md#method_getParty) | | Возвращает участника процесса выплаты, который принял решение о прекращении хранения персональных данных. | | public | [getReason()](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md#method_getReason) | | Возвращает причину прекращения хранения персональных данных. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setParty()](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md#method_setParty) | | Устанавливает участника процесса выплаты, который принял решение о прекращении хранения персональных данных. | | public | [setReason()](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md#method_setReason) | | Устанавливает прекращения хранения персональных данных. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/PersonalData/PersonalDataCancellationDetails.php](../../lib/Model/PersonalData/PersonalDataCancellationDetails.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\PersonalData\PersonalDataCancellationDetails * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $party : string --- ***Description*** Участник процесса, который принял решение о прекращении хранения персональных данных **Type:** string **Details:** #### public $reason : string --- ***Description*** Причина прекращения хранения персональных данных **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getParty() : string|null ```php public getParty() : string|null ``` **Summary** Возвращает участника процесса выплаты, который принял решение о прекращении хранения персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataCancellationDetails](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md) **Returns:** string|null - Инициатор отмены о хранения персональных данных. #### public getReason() : string|null ```php public getReason() : string|null ``` **Summary** Возвращает причину прекращения хранения персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataCancellationDetails](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md) **Returns:** string|null - Причина прекращения хранения персональных данных. #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setParty() : self ```php public setParty(string|null $party = null) : self ``` **Summary** Устанавливает участника процесса выплаты, который принял решение о прекращении хранения персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataCancellationDetails](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | party | Участник процесса выплаты, который принял решение о прекращении хранения персональных данных. | **Returns:** self - #### public setReason() : self ```php public setReason(string|null $reason = null) : self ``` **Summary** Устанавливает прекращения хранения персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataCancellationDetails](../classes/YooKassa-Model-PersonalData-PersonalDataCancellationDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | reason | Причина прекращения хранения персональных данных | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-PayoutDestinationBankCard.md000064400000040466150364342670024011 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payout\PayoutDestinationBankCard ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель PayoutDestinationBankCard. **Description:** Оплата банковской картой. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$card](../classes/YooKassa-Model-Payout-PayoutDestinationBankCard.md#property_card) | | Данные банковской карты | | public | [$type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property__type) | | Тип метода оплаты | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payout-PayoutDestinationBankCard.md#method___construct) | | Конструктор PayoutDestinationBankCard. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCard()](../classes/YooKassa-Model-Payout-PayoutDestinationBankCard.md#method_getCard) | | Возвращает данные банковской карты. | | public | [getType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCard()](../classes/YooKassa-Model-Payout-PayoutDestinationBankCard.md#method_setCard) | | Устанавливает данные банковской карты. | | public | [setType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_setType) | | Устанавливает тип метода оплаты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payout/PayoutDestinationBankCard.php](../../lib/Model/Payout/PayoutDestinationBankCard.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) * \YooKassa\Model\Payout\PayoutDestinationBankCard * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $card : \YooKassa\Model\Payout\PayoutDestinationBankCardCard --- ***Description*** Данные банковской карты **Type:** PayoutDestinationBankCardCard **Details:** #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) #### protected $_type : ?string --- **Summary** Тип метода оплаты **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** Конструктор PayoutDestinationBankCard. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationBankCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCard() : \YooKassa\Model\Payout\PayoutDestinationBankCardCard|null ```php public getCard() : \YooKassa\Model\Payout\PayoutDestinationBankCardCard|null ``` **Summary** Возвращает данные банковской карты. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationBankCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCard.md) **Returns:** \YooKassa\Model\Payout\PayoutDestinationBankCardCard|null - Данные банковской карты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCard() : self ```php public setCard(\YooKassa\Model\Payout\PayoutDestinationBankCardCard|array|null $card = null) : self ``` **Summary** Устанавливает данные банковской карты. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationBankCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\PayoutDestinationBankCardCard OR array OR null | card | Данные банковской карты | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-Confirmation-ConfirmationFactory.md000064400000006707150364342670025502 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\Confirmation\ConfirmationFactory ### Namespace: [\YooKassa\Model\Payment\Confirmation](../namespaces/yookassa-model-payment-confirmation.md) --- **Summary:** Класс, представляющий фабрику ConfirmationFactory. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [factory()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationFactory.md#method_factory) | | Возвращает объект, соответствующий типу подтверждения платежа. | | public | [factoryFromArray()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationFactory.md#method_factoryFromArray) | | Возвращает объект, соответствующий типу подтверждения платежа, из массива данных. | --- ### Details * File: [lib/Model/Payment/Confirmation/ConfirmationFactory.php](../../lib/Model/Payment/Confirmation/ConfirmationFactory.php) * Package: YooKassa\Model * Class Hierarchy: * \YooKassa\Model\Payment\Confirmation\ConfirmationFactory * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public factory() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation ```php public factory(string $type) : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation ``` **Summary** Возвращает объект, соответствующий типу подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationFactory](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | type | Тип подтверждения платежа | **Returns:** \YooKassa\Model\Payment\Confirmation\AbstractConfirmation - #### public factoryFromArray() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation ```php public factoryFromArray(array $data, null|string $type = null) : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation ``` **Summary** Возвращает объект, соответствующий типу подтверждения платежа, из массива данных. **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationFactory](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | data | Массив данных подтверждения платежа | | null OR string | type | Тип подтверждения платежа | **Returns:** \YooKassa\Model\Payment\Confirmation\AbstractConfirmation - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-InternalServerError.md000064400000011357150364342670023742 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\InternalServerError ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- **Summary:** Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности. **Description:** Рекомендуется повторять запрос с периодичностью один раз в минуту до тех пор, пока ЮKassa не сообщит результат обработки операции. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [HTTP_CODE](../classes/YooKassa-Common-Exceptions-InternalServerError.md#constant_HTTP_CODE) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$retryAfter](../classes/YooKassa-Common-Exceptions-InternalServerError.md#property_retryAfter) | | | | public | [$type](../classes/YooKassa-Common-Exceptions-InternalServerError.md#property_type) | | | | protected | [$responseBody](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseBody) | | | | protected | [$responseHeaders](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseHeaders) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-InternalServerError.md#method___construct) | | Constructor. | | public | [getResponseBody()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseBody) | | | | public | [getResponseHeaders()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseHeaders) | | | --- ### Details * File: [lib/Common/Exceptions/InternalServerError.php](../../lib/Common/Exceptions/InternalServerError.php) * Package: Default * Class Hierarchy: * [\Exception](\Exception) * [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) * \YooKassa\Common\Exceptions\InternalServerError --- ## Constants ###### HTTP_CODE ```php HTTP_CODE = 500 ``` --- ## Properties #### public $retryAfter : mixed --- **Type:** mixed **Details:** #### public $type : mixed --- **Type:** mixed **Details:** #### protected $responseBody : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) #### protected $responseHeaders : array --- **Type:** array **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) --- ## Methods #### public __construct() : mixed ```php public __construct(mixed $responseHeaders = [], mixed $responseBody = '') : mixed ``` **Summary** Constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\InternalServerError](../classes/YooKassa-Common-Exceptions-InternalServerError.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | responseHeaders | HTTP header | | mixed | responseBody | HTTP body | **Returns:** mixed - #### public getResponseBody() : ?string ```php public getResponseBody() : ?string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** ?string - #### public getResponseHeaders() : string[] ```php public getResponseHeaders() : string[] ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** string[] - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestSerializer.md000064400000004776150364342670027534 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\PersonalData\CreatePersonalDataRequestSerializer ### Namespace: [\YooKassa\Request\PersonalData](../namespaces/yookassa-request-personaldata.md) --- **Summary:** Класс, представляющий модель CreatePersonalDataRequestSerializer. **Description:** Класс объекта осуществляющего сериализацию объекта запроса к API на создание персональных данных. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [serialize()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestSerializer.md#method_serialize) | | Формирует ассоциативный массив данных из объекта запроса. | --- ### Details * File: [lib/Request/PersonalData/CreatePersonalDataRequestSerializer.php](../../lib/Request/PersonalData/CreatePersonalDataRequestSerializer.php) * Package: YooKassa\Request * Class Hierarchy: * \YooKassa\Request\PersonalData\CreatePersonalDataRequestSerializer * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public serialize() : array ```php public serialize(\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface $request) : array ``` **Summary** Формирует ассоциативный массив данных из объекта запроса. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestSerializer](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestSerializer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface | request | Объект запроса | **Returns:** array - Массив данных для дальнейшего кодирования в JSON --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-ResponseObject.md000064400000010145150364342670020565 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\ResponseObject ### Namespace: [\YooKassa\Common](../namespaces/yookassa-common.md) --- **Summary:** Класс, представляющий модель ResponseObject. **Description:** Класс HTTP ответа. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$body](../classes/YooKassa-Common-ResponseObject.md#property_body) | | Тело ответа. | | protected | [$code](../classes/YooKassa-Common-ResponseObject.md#property_code) | | HTTP код ответа. | | protected | [$headers](../classes/YooKassa-Common-ResponseObject.md#property_headers) | | Массив заголовков ответа. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-ResponseObject.md#method___construct) | | | | public | [getBody()](../classes/YooKassa-Common-ResponseObject.md#method_getBody) | | Возвращает тело ответа. | | public | [getCode()](../classes/YooKassa-Common-ResponseObject.md#method_getCode) | | Возвращает HTTP код ответа. | | public | [getHeaders()](../classes/YooKassa-Common-ResponseObject.md#method_getHeaders) | | Возвращает массив заголовков ответа. | --- ### Details * File: [lib/Common/ResponseObject.php](../../lib/Common/ResponseObject.php) * Package: YooKassa * Class Hierarchy: * \YooKassa\Common\ResponseObject * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### protected $body : mixed --- **Summary** Тело ответа. **Type:** mixed **Details:** #### protected $code : int --- **Summary** HTTP код ответа. **Type:** int **Details:** #### protected $headers : array --- **Summary** Массив заголовков ответа. **Type:** array **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(mixed $config = null) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\ResponseObject](../classes/YooKassa-Common-ResponseObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | config | | **Returns:** mixed - #### public getBody() : mixed ```php public getBody() : mixed ``` **Summary** Возвращает тело ответа. **Details:** * Inherited From: [\YooKassa\Common\ResponseObject](../classes/YooKassa-Common-ResponseObject.md) **Returns:** mixed - Тело ответа #### public getCode() : int ```php public getCode() : int ``` **Summary** Возвращает HTTP код ответа. **Details:** * Inherited From: [\YooKassa\Common\ResponseObject](../classes/YooKassa-Common-ResponseObject.md) **Returns:** int - HTTP код ответа #### public getHeaders() : array ```php public getHeaders() : array ``` **Summary** Возвращает массив заголовков ответа. **Details:** * Inherited From: [\YooKassa\Common\ResponseObject](../classes/YooKassa-Common-ResponseObject.md) **Returns:** array - Массив заголовков ответа --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md000064400000061453150364342670026013 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\PaymentMethodBankCard ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель PaymentMethodBankCard. **Description:** Оплата банковской картой. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$card](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md#property_card) | | Данные банковской карты | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_card](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md#property__card) | | | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCard()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md#method_getCard) | | Возвращает данные банковской карты. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCard()](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md#method_setCard) | | Устанавливает данные банковской карты. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/PaymentMethodBankCard.php](../../lib/Model/Payment/PaymentMethod/PaymentMethodBankCard.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) * \YooKassa\Model\Payment\PaymentMethod\PaymentMethodBankCard * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $card : string --- ***Description*** Данные банковской карты **Type:** string **Details:** #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_card : ?\YooKassa\Model\Payment\PaymentMethod\BankCard --- **Type:** BankCard Данные банковской карты **Details:** #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodBankCard](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCard() : \YooKassa\Model\Payment\PaymentMethod\BankCard|null ```php public getCard() : \YooKassa\Model\Payment\PaymentMethod\BankCard|null ``` **Summary** Возвращает данные банковской карты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodBankCard](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md) **Returns:** \YooKassa\Model\Payment\PaymentMethod\BankCard|null - Данные банковской карты #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCard() : self ```php public setCard(\YooKassa\Model\Payment\PaymentMethod\BankCard|array|null $card) : self ``` **Summary** Устанавливает данные банковской карты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\PaymentMethodBankCard](../classes/YooKassa-Model-Payment-PaymentMethod-PaymentMethodBankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\PaymentMethod\BankCard OR array OR null | card | Данные банковской карты | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-DealInterface.md000064400000020605150364342670021003 0ustar00# [YooKassa API SDK](../home.md) # Interface: DealInterface ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Interface DealInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getBalance()](../classes/YooKassa-Model-Deal-DealInterface.md#method_getBalance) | | Возвращает баланс сделки. | | public | [getCreatedAt()](../classes/YooKassa-Model-Deal-DealInterface.md#method_getCreatedAt) | | Возвращает время создания сделки. | | public | [getDescription()](../classes/YooKassa-Model-Deal-DealInterface.md#method_getDescription) | | Возвращает описание сделки (не более 128 символов). | | public | [getExpiresAt()](../classes/YooKassa-Model-Deal-DealInterface.md#method_getExpiresAt) | | Возвращает время автоматического закрытия сделки. | | public | [getFeeMoment()](../classes/YooKassa-Model-Deal-DealInterface.md#method_getFeeMoment) | | Возвращает момент перечисления вам вознаграждения платформы. | | public | [getId()](../classes/YooKassa-Model-Deal-DealInterface.md#method_getId) | | Возвращает Id сделки. | | public | [getMetadata()](../classes/YooKassa-Model-Deal-DealInterface.md#method_getMetadata) | | Возвращает дополнительные данные сделки. | | public | [getPayoutBalance()](../classes/YooKassa-Model-Deal-DealInterface.md#method_getPayoutBalance) | | Возвращает сумму вознаграждения продавца. | | public | [getStatus()](../classes/YooKassa-Model-Deal-DealInterface.md#method_getStatus) | | Возвращает статус сделки. | | public | [getTest()](../classes/YooKassa-Model-Deal-DealInterface.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getType()](../classes/YooKassa-Model-Deal-DealInterface.md#method_getType) | | Возвращает тип сделки. | --- ### Details * File: [lib/Model/Deal/DealInterface.php](../../lib/Model/Deal/DealInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Идентификатор сделки | | property | | Статус сделки | | property | | Тип сделки | | property | | Момент перечисления вознаграждения | | property | | Момент перечисления вознаграждения | | property | | Описание сделки | | property | | Баланс сделки | | property | | Сумма вознаграждения продавца | | property | | Сумма вознаграждения продавца | | property | | Время создания сделки | | property | | Время создания сделки | | property | | Время автоматического закрытия сделки | | property | | Время автоматического закрытия сделки | | property | | Дополнительные данные сделки | | property | | Признак тестовой операции | --- ## Methods #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealInterface](../classes/YooKassa-Model-Deal-DealInterface.md) **Returns:** string|null - Id сделки #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealInterface](../classes/YooKassa-Model-Deal-DealInterface.md) **Returns:** string|null - Тип сделки #### public getFeeMoment() : string|null ```php public getFeeMoment() : string|null ``` **Summary** Возвращает момент перечисления вам вознаграждения платформы. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealInterface](../classes/YooKassa-Model-Deal-DealInterface.md) **Returns:** string|null - Момент перечисления вознаграждения #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание сделки (не более 128 символов). **Details:** * Inherited From: [\YooKassa\Model\Deal\DealInterface](../classes/YooKassa-Model-Deal-DealInterface.md) **Returns:** string|null - Описание сделки #### public getBalance() : \YooKassa\Model\AmountInterface|null ```php public getBalance() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает баланс сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealInterface](../classes/YooKassa-Model-Deal-DealInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Баланс сделки #### public getPayoutBalance() : \YooKassa\Model\AmountInterface|null ```php public getPayoutBalance() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму вознаграждения продавца. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealInterface](../classes/YooKassa-Model-Deal-DealInterface.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма вознаграждения продавца #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealInterface](../classes/YooKassa-Model-Deal-DealInterface.md) **Returns:** string|null - Статус сделки #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealInterface](../classes/YooKassa-Model-Deal-DealInterface.md) **Returns:** \DateTime|null - Время создания сделки #### public getExpiresAt() : \DateTime|null ```php public getExpiresAt() : \DateTime|null ``` **Summary** Возвращает время автоматического закрытия сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealInterface](../classes/YooKassa-Model-Deal-DealInterface.md) **Returns:** \DateTime|null - Время автоматического закрытия сделки #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает дополнительные данные сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealInterface](../classes/YooKassa-Model-Deal-DealInterface.md) **Returns:** \YooKassa\Model\Metadata|null - Дополнительные данные сделки #### public getTest() : bool|null ```php public getTest() : bool|null ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealInterface](../classes/YooKassa-Model-Deal-DealInterface.md) **Returns:** bool|null - Признак тестовой операции --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md000064400000024607150364342670023747 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Deals\CreateDealRequestBuilder ### Namespace: [\YooKassa\Request\Deals](../namespaces/yookassa-request-deals.md) --- **Summary:** Класс, представляющий модель CreateDealRequestBuilder. **Description:** Класс билдера объектов запросов к API на создание платежа. --- ### Examples Пример использования билдера ```php try { $dealBuilder = \YooKassa\Request\Deals\CreateDealRequest::builder(); $dealBuilder ->setType(\YooKassa\Model\Deal\DealType::SAFE_DEAL) ->setFeeMoment(\YooKassa\Model\Deal\FeeMoment::PAYMENT_SUCCEEDED) ->setDescription('SAFE_DEAL 123554642-2432FF344R') ->setMetadata(['order_id' => '37']) ; // Создаем объект запроса $request = $dealBuilder->build(); $idempotenceKey = uniqid('', true); $response = $client->createDeal($request, $idempotenceKey); } catch (Exception $e) { $response = $e; } var_dump($response); ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$currentObject](../classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md#property_currentObject) | | Собираемый объект запроса. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. | | public | [build()](../classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md#method_build) | | Осуществляет сборку объекта запроса к API. | | public | [setDescription()](../classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md#method_setDescription) | | Устанавливает описание транзакции. | | public | [setFeeMoment()](../classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md#method_setFeeMoment) | | Устанавливает момент перечисления вам вознаграждения платформы. | | public | [setMetadata()](../classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md#method_setMetadata) | | Устанавливает метаданные, привязанные к платежу. | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива. | | public | [setType()](../classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md#method_setType) | | Устанавливает тип сделки. | | protected | [initCurrentObject()](../classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md#method_initCurrentObject) | | Инициализирует объект запроса, который в дальнейшем будет собираться билдером | --- ### Details * File: [lib/Request/Deals/CreateDealRequestBuilder.php](../../lib/Request/Deals/CreateDealRequestBuilder.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) * \YooKassa\Request\Deals\CreateDealRequestBuilder * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### protected $currentObject : ?\YooKassa\Common\AbstractRequestInterface --- **Summary** Собираемый объект запроса. **Type:** AbstractRequestInterface **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public build() : \YooKassa\Request\Deals\CreateDealRequestInterface|\YooKassa\Common\AbstractRequestInterface ```php public build(array|null $options = null) : \YooKassa\Request\Deals\CreateDealRequestInterface|\YooKassa\Common\AbstractRequestInterface ``` **Summary** Осуществляет сборку объекта запроса к API. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestBuilder](../classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | options | | **Returns:** \YooKassa\Request\Deals\CreateDealRequestInterface|\YooKassa\Common\AbstractRequestInterface - #### public setDescription() : \YooKassa\Request\Deals\CreateDealRequestBuilder ```php public setDescription(string|null $value) : \YooKassa\Request\Deals\CreateDealRequestBuilder ``` **Summary** Устанавливает описание транзакции. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestBuilder](../classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Описание транзакции | **Returns:** \YooKassa\Request\Deals\CreateDealRequestBuilder - Инстанс текущего билдера #### public setFeeMoment() : \YooKassa\Request\Deals\CreateDealRequestBuilder ```php public setFeeMoment(string $value) : \YooKassa\Request\Deals\CreateDealRequestBuilder ``` **Summary** Устанавливает момент перечисления вам вознаграждения платформы. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestBuilder](../classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Момент перечисления вам вознаграждения платформы | **Returns:** \YooKassa\Request\Deals\CreateDealRequestBuilder - Инстанс текущего билдера #### public setMetadata() : \YooKassa\Request\Deals\CreateDealRequestBuilder ```php public setMetadata(null|array|\YooKassa\Model\Metadata $value) : \YooKassa\Request\Deals\CreateDealRequestBuilder ``` **Summary** Устанавливает метаданные, привязанные к платежу. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestBuilder](../classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Metadata | value | Метаданные платежа, устанавливаемые мерчантом | **Returns:** \YooKassa\Request\Deals\CreateDealRequestBuilder - Инстанс текущего билдера #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(iterable|null $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable OR null | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### public setType() : \YooKassa\Request\Deals\CreateDealRequestBuilder ```php public setType(string $value) : \YooKassa\Request\Deals\CreateDealRequestBuilder ``` **Summary** Устанавливает тип сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestBuilder](../classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Тип сделки | **Returns:** \YooKassa\Request\Deals\CreateDealRequestBuilder - Инстанс текущего билдера #### protected initCurrentObject() : \YooKassa\Request\Deals\CreateDealRequest ```php protected initCurrentObject() : \YooKassa\Request\Deals\CreateDealRequest ``` **Summary** Инициализирует объект запроса, который в дальнейшем будет собираться билдером **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestBuilder](../classes/YooKassa-Request-Deals-CreateDealRequestBuilder.md) **Returns:** \YooKassa\Request\Deals\CreateDealRequest - Инстанс собираемого объекта запроса к API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-AuthorizationDetailsInterface.md000064400000007747150364342670025070 0ustar00# [YooKassa API SDK](../home.md) # Interface: AuthorizationDetailsInterface ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Interface AuthorizationDetailsInterface - Данные об авторизации платежа. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAuthCode()](../classes/YooKassa-Model-Payment-AuthorizationDetailsInterface.md#method_getAuthCode) | | Возвращает код авторизации банковской карты. | | public | [getRrn()](../classes/YooKassa-Model-Payment-AuthorizationDetailsInterface.md#method_getRrn) | | Возвращает Retrieval Reference Number — уникальный идентификатор транзакции в системе эмитента. | | public | [getThreeDSecure()](../classes/YooKassa-Model-Payment-AuthorizationDetailsInterface.md#method_getThreeDSecure) | | Возвращает данные о прохождении пользователем аутентификации по 3‑D Secure. | --- ### Details * File: [lib/Model/Payment/AuthorizationDetailsInterface.php](../../lib/Model/Payment/AuthorizationDetailsInterface.php) * Package: \Default --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | property | | Retrieval Reference Number — уникальный идентификатор транзакции в системе эмитента | | property | | Код авторизации банковской карты | | property | | Код авторизации банковской карты | | property | | Данные о прохождении пользователем аутентификации по 3‑D Secure | | property | | Данные о прохождении пользователем аутентификации по 3‑D Secure | --- ## Methods #### public getRrn() : null|string ```php public getRrn() : null|string ``` **Summary** Возвращает Retrieval Reference Number — уникальный идентификатор транзакции в системе эмитента. **Details:** * Inherited From: [\YooKassa\Model\Payment\AuthorizationDetailsInterface](../classes/YooKassa-Model-Payment-AuthorizationDetailsInterface.md) **Returns:** null|string - Уникальный идентификатор транзакции #### public getAuthCode() : null|string ```php public getAuthCode() : null|string ``` **Summary** Возвращает код авторизации банковской карты. **Details:** * Inherited From: [\YooKassa\Model\Payment\AuthorizationDetailsInterface](../classes/YooKassa-Model-Payment-AuthorizationDetailsInterface.md) **Returns:** null|string - Код авторизации банковской карты #### public getThreeDSecure() : null|\YooKassa\Model\Payment\ThreeDSecure ```php public getThreeDSecure() : null|\YooKassa\Model\Payment\ThreeDSecure ``` **Summary** Возвращает данные о прохождении пользователем аутентификации по 3‑D Secure. **Details:** * Inherited From: [\YooKassa\Model\Payment\AuthorizationDetailsInterface](../classes/YooKassa-Model-Payment-AuthorizationDetailsInterface.md) **Returns:** null|\YooKassa\Model\Payment\ThreeDSecure - Объект с данными о прохождении пользователем аутентификации по 3‑D Secure --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-Transfer.md000064400000074246150364342670020663 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\Transfer ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Класс, представляющий модель Transfer. **Description:** Данные о распределении денег — сколько и в какой магазин нужно перевести. Присутствует, если вы используете [Сплитование платежей](/developers/solutions-for-platforms/split-payments/basics). --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Payment-Transfer.md#constant_MAX_LENGTH_DESCRIPTION) | | Максимальная длина строки описания транзакции | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$account_id](../classes/YooKassa-Model-Payment-Transfer.md#property_account_id) | | Идентификатор магазина, в пользу которого вы принимаете оплату | | public | [$accountId](../classes/YooKassa-Model-Payment-Transfer.md#property_accountId) | | Идентификатор магазина, в пользу которого вы принимаете оплату | | public | [$amount](../classes/YooKassa-Model-Payment-Transfer.md#property_amount) | | Сумма, которую необходимо перечислить магазину | | public | [$connected_account_id](../classes/YooKassa-Model-Payment-Transfer.md#property_connected_account_id) | | Идентификатор продавца, подключенного к вашей платформе | | public | [$connectedAccountId](../classes/YooKassa-Model-Payment-Transfer.md#property_connectedAccountId) | | Идентификатор продавца, подключенного к вашей платформе | | public | [$description](../classes/YooKassa-Model-Payment-Transfer.md#property_description) | | Описание транзакции, которое продавец увидит в личном кабинете ЮKassa. (например: «Заказ маркетплейса №72») | | public | [$metadata](../classes/YooKassa-Model-Payment-Transfer.md#property_metadata) | | Любые дополнительные данные, которые нужны вам для работы с платежами (например, ваш внутренний идентификатор заказа) | | public | [$platform_fee_amount](../classes/YooKassa-Model-Payment-Transfer.md#property_platform_fee_amount) | | Комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу | | public | [$platformFeeAmount](../classes/YooKassa-Model-Payment-Transfer.md#property_platformFeeAmount) | | Комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу | | public | [$release_funds](../classes/YooKassa-Model-Payment-Transfer.md#property_release_funds) | | Порядок перевода денег продавцам: ~`true` — перевести сразу, ~`false` — сначала захолдировать | | public | [$releaseFunds](../classes/YooKassa-Model-Payment-Transfer.md#property_releaseFunds) | | Порядок перевода денег продавцам: ~`true` — перевести сразу, ~`false` — сначала захолдировать | | public | [$status](../classes/YooKassa-Model-Payment-Transfer.md#property_status) | | Статус распределения денег между магазинами. Возможные значения: `pending`, `waiting_for_capture`, `succeeded`, `canceled` | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAccountId()](../classes/YooKassa-Model-Payment-Transfer.md#method_getAccountId) | | Возвращает account_id. | | public | [getAmount()](../classes/YooKassa-Model-Payment-Transfer.md#method_getAmount) | | Возвращает amount. | | public | [getConnectedAccountId()](../classes/YooKassa-Model-Payment-Transfer.md#method_getConnectedAccountId) | | Возвращает идентификатор продавца. | | public | [getDescription()](../classes/YooKassa-Model-Payment-Transfer.md#method_getDescription) | | Возвращает description. | | public | [getMetadata()](../classes/YooKassa-Model-Payment-Transfer.md#method_getMetadata) | | Возвращает metadata. | | public | [getPlatformFeeAmount()](../classes/YooKassa-Model-Payment-Transfer.md#method_getPlatformFeeAmount) | | Возвращает platform_fee_amount. | | public | [getReleaseFunds()](../classes/YooKassa-Model-Payment-Transfer.md#method_getReleaseFunds) | | Возвращает порядок перевода денег продавцам. | | public | [getStatus()](../classes/YooKassa-Model-Payment-Transfer.md#method_getStatus) | | Возвращает status. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAccountId()](../classes/YooKassa-Model-Payment-Transfer.md#method_setAccountId) | | Устанавливает account_id. | | public | [setAmount()](../classes/YooKassa-Model-Payment-Transfer.md#method_setAmount) | | Устанавливает amount. | | public | [setConnectedAccountId()](../classes/YooKassa-Model-Payment-Transfer.md#method_setConnectedAccountId) | | Устанавливает идентификатор продавца. | | public | [setDescription()](../classes/YooKassa-Model-Payment-Transfer.md#method_setDescription) | | Устанавливает description. | | public | [setMetadata()](../classes/YooKassa-Model-Payment-Transfer.md#method_setMetadata) | | Устанавливает metadata. | | public | [setPlatformFeeAmount()](../classes/YooKassa-Model-Payment-Transfer.md#method_setPlatformFeeAmount) | | Устанавливает platform_fee_amount. | | public | [setReleaseFunds()](../classes/YooKassa-Model-Payment-Transfer.md#method_setReleaseFunds) | | Устанавливает порядок перевода денег продавцам. | | public | [setStatus()](../classes/YooKassa-Model-Payment-Transfer.md#method_setStatus) | | Устанавливает status. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/Transfer.php](../../lib/Model/Payment/Transfer.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payment\Transfer * Implements: * [\YooKassa\Model\Payment\TransferInterface](../classes/YooKassa-Model-Payment-TransferInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Максимальная длина строки описания транзакции ```php MAX_LENGTH_DESCRIPTION = 128 ``` --- ## Properties #### public $account_id : string --- ***Description*** Идентификатор магазина, в пользу которого вы принимаете оплату **Type:** string **Details:** #### public $accountId : string --- ***Description*** Идентификатор магазина, в пользу которого вы принимаете оплату **Type:** string **Details:** #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма, которую необходимо перечислить магазину **Type:** AmountInterface **Details:** #### public $connected_account_id : string --- ***Description*** Идентификатор продавца, подключенного к вашей платформе **Type:** string **Details:** #### public $connectedAccountId : string --- ***Description*** Идентификатор продавца, подключенного к вашей платформе **Type:** string **Details:** #### public $description : string --- ***Description*** Описание транзакции, которое продавец увидит в личном кабинете ЮKassa. (например: «Заказ маркетплейса №72») **Type:** string **Details:** #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Любые дополнительные данные, которые нужны вам для работы с платежами (например, ваш внутренний идентификатор заказа) **Type:** Metadata **Details:** #### public $platform_fee_amount : \YooKassa\Model\AmountInterface --- ***Description*** Комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу **Type:** AmountInterface **Details:** #### public $platformFeeAmount : \YooKassa\Model\AmountInterface --- ***Description*** Комиссия за проданные товары и услуги, которая удерживается с магазина в вашу пользу **Type:** AmountInterface **Details:** #### public $release_funds : bool --- ***Description*** Порядок перевода денег продавцам: ~`true` — перевести сразу, ~`false` — сначала захолдировать **Type:** bool **Details:** #### public $releaseFunds : bool --- ***Description*** Порядок перевода денег продавцам: ~`true` — перевести сразу, ~`false` — сначала захолдировать **Type:** bool **Details:** #### public $status : string --- ***Description*** Статус распределения денег между магазинами. Возможные значения: `pending`, `waiting_for_capture`, `succeeded`, `canceled` **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAccountId() : string|null ```php public getAccountId() : string|null ``` **Summary** Возвращает account_id. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) **Returns:** string|null - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает amount. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) **Returns:** \YooKassa\Model\AmountInterface|null - #### public getConnectedAccountId() : string|null ```php public getConnectedAccountId() : string|null ``` **Summary** Возвращает идентификатор продавца. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) **Returns:** string|null - Идентификатор продавца #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает description. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) **Returns:** string|null - #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает metadata. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) **Returns:** \YooKassa\Model\Metadata|null - #### public getPlatformFeeAmount() : \YooKassa\Model\AmountInterface|null ```php public getPlatformFeeAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает platform_fee_amount. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) **Returns:** \YooKassa\Model\AmountInterface|null - #### public getReleaseFunds() : bool|null ```php public getReleaseFunds() : bool|null ``` **Summary** Возвращает порядок перевода денег продавцам. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) **Returns:** bool|null - Порядок перевода денег продавцам #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает status. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAccountId() : self ```php public setAccountId(string|null $value = null) : self ``` **Summary** Устанавливает account_id. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | | **Returns:** self - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $value = null) : self ``` **Summary** Устанавливает amount. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | value | | **Returns:** self - #### public setConnectedAccountId() : self ```php public setConnectedAccountId(string|null $value = null) : self ``` **Summary** Устанавливает идентификатор продавца. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Идентификатор продавца, подключенного к вашей платформе. | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $value = null) : self ``` **Summary** Устанавливает description. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Описание транзакции (не более 128 символов), которое продавец увидит в личном кабинете ЮKassa. Например: «Заказ маркетплейса №72». | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(string|array|null $value = null) : self ``` **Summary** Устанавливает metadata. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR array OR null | value | Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). Передаются в виде набора пар «ключ-значение» и возвращаются в ответе от ЮKassa. Ограничения: максимум 16 ключей, имя ключа не больше 32 символов, значение ключа не больше 512 символов, тип данных — строка в формате UTF-8. | **Returns:** self - #### public setPlatformFeeAmount() : self ```php public setPlatformFeeAmount(\YooKassa\Model\AmountInterface|array|null $value = null) : self ``` **Summary** Устанавливает platform_fee_amount. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | value | | **Returns:** self - #### public setReleaseFunds() : self ```php public setReleaseFunds(bool|array|null $value = null) : self ``` **Summary** Устанавливает порядок перевода денег продавцам. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | value | Порядок перевода денег продавцам: ~`true` — перевести сразу, ~`false` — сначала захолдировать. | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $value = null) : self ``` **Summary** Устанавливает status. **Details:** * Inherited From: [\YooKassa\Model\Payment\Transfer](../classes/YooKassa-Model-Payment-Transfer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Refund-RefundStatus.md000064400000010730150364342670021320 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Refund\RefundStatus ### Namespace: [\YooKassa\Model\Refund](../namespaces/yookassa-model-refund.md) --- **Summary:** Класс, представляющий модель RefundStatus. **Description:** Статус возврата платежа. Возможные значения: - `pending` - Ожидает обработки - `succeeded` - Успешно возвращен - `canceled` - В проведении возврата отказано --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [PENDING](../classes/YooKassa-Model-Refund-RefundStatus.md#constant_PENDING) | | | | public | [SUCCEEDED](../classes/YooKassa-Model-Refund-RefundStatus.md#constant_SUCCEEDED) | | | | public | [CANCELED](../classes/YooKassa-Model-Refund-RefundStatus.md#constant_CANCELED) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Refund-RefundStatus.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Refund/RefundStatus.php](../../lib/Model/Refund/RefundStatus.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Refund\RefundStatus * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### PENDING ```php PENDING = 'pending' ``` ###### SUCCEEDED ```php SUCCEEDED = 'succeeded' ``` ###### CANCELED ```php CANCELED = 'canceled' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md000064400000030204150364342670024245 0ustar00# [YooKassa API SDK](../home.md) # Interface: SelfEmployedInterface ### Namespace: [\YooKassa\Model\SelfEmployed](../namespaces/yookassa-model-selfemployed.md) --- **Summary:** Interface SelfEmployedInterface. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | * [public MIN_LENGTH_ID](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#constant_MIN_LENGTH_ID) * [public MAX_LENGTH_ID](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#constant_MAX_LENGTH_ID) --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getConfirmation()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#method_getConfirmation) | | Возвращает сценарий подтверждения. | | public | [getCreatedAt()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#method_getCreatedAt) | | Возвращает время создания объекта самозанятого. | | public | [getId()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#method_getId) | | Возвращает идентификатор самозанятого. | | public | [getItn()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#method_getItn) | | Возвращает ИНН самозанятого. | | public | [getPhone()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#method_getPhone) | | Возвращает телефон самозанятого. | | public | [getStatus()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#method_getStatus) | | Возвращает статус самозанятого. | | public | [getTest()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [setConfirmation()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#method_setConfirmation) | | Устанавливает сценарий подтверждения. | | public | [setCreatedAt()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#method_setCreatedAt) | | Устанавливает время создания объекта самозанятого. | | public | [setId()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#method_setId) | | Устанавливает идентификатор самозанятого. | | public | [setItn()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#method_setItn) | | Устанавливает ИНН самозанятого. | | public | [setPhone()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#method_setPhone) | | Устанавливает телефон самозанятого. | | public | [setStatus()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#method_setStatus) | | Устанавливает статус самозанятого. | | public | [setTest()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md#method_setTest) | | Устанавливает признак тестовой операции. | --- ### Details * File: [lib/Model/SelfEmployed/SelfEmployedInterface.php](../../lib/Model/SelfEmployed/SelfEmployedInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Идентификатор самозанятого в ЮKassa. | | property | | Статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков. | | property | | Время создания объекта самозанятого. | | property | | Время создания объекта самозанятого. | | property | | ИНН самозанятого. | | property | | Телефон самозанятого, который привязан к личному кабинету в сервисе Мой налог. | | property | | Сценарий подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. | | property | | Идентификатор самозанятого в ЮKassa. | --- ## Constants ###### MIN_LENGTH_ID ```php MIN_LENGTH_ID = 36 : int ``` ###### MAX_LENGTH_ID ```php MAX_LENGTH_ID = 50 : int ``` --- ## Methods #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) **Returns:** string|null - Идентификатор самозанятого #### public setId() : self ```php public setId(string $id) : self ``` **Summary** Устанавливает идентификатор самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | id | Идентификатор самозанятого в ЮKassa | **Returns:** self - #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) **Returns:** string|null - Статус самозанятого #### public setStatus() : $this ```php public setStatus(string $status) : $this ``` **Summary** Устанавливает статус самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | status | Статус самозанятого | **Returns:** $this - #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания объекта самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) **Returns:** \DateTime|null - Время создания объекта самозанятого #### public setCreatedAt() : $this ```php public setCreatedAt(\DateTime|string|null $created_at) : $this ``` **Summary** Устанавливает время создания объекта самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания объекта самозанятого | **Returns:** $this - #### public getItn() : null|string ```php public getItn() : null|string ``` **Summary** Возвращает ИНН самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) **Returns:** null|string - ИНН самозанятого #### public setItn() : self ```php public setItn(null|string $itn = null) : self ``` **Summary** Устанавливает ИНН самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | itn | ИНН самозанятого | **Returns:** self - #### public getPhone() : null|string ```php public getPhone() : null|string ``` **Summary** Возвращает телефон самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) **Returns:** null|string - Телефон самозанятого #### public setPhone() : self ```php public setPhone(null|string $phone = null) : self ``` **Summary** Устанавливает телефон самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | phone | Телефон самозанятого | **Returns:** self - #### public getConfirmation() : ?\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation ```php public getConfirmation() : ?\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation ``` **Summary** Возвращает сценарий подтверждения. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) **Returns:** ?\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation - #### public setConfirmation() : self ```php public setConfirmation(array|\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation|null $confirmation = null) : self ``` **Summary** Устанавливает сценарий подтверждения. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation OR null | confirmation | Сценарий подтверждения | **Returns:** self - #### public getTest() : bool ```php public getTest() : bool ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) **Returns:** bool - Признак тестовой операции #### public setTest() : self ```php public setTest(bool $test) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | test | Признак тестовой операции | **Returns:** self - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-Payout.md000064400000126667150364342670020231 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payout\Payout ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель Payout. **Description:** Объект выплаты. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Payout-Payout.md#constant_MAX_LENGTH_DESCRIPTION) | | | | public | [MAX_LENGTH_ID](../classes/YooKassa-Model-Payout-Payout.md#constant_MAX_LENGTH_ID) | | | | public | [MIN_LENGTH_ID](../classes/YooKassa-Model-Payout-Payout.md#constant_MIN_LENGTH_ID) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Payout-Payout.md#property_amount) | | Сумма выплаты | | public | [$cancellation_details](../classes/YooKassa-Model-Payout-Payout.md#property_cancellation_details) | | Комментарий к отмене выплаты | | public | [$cancellationDetails](../classes/YooKassa-Model-Payout-Payout.md#property_cancellationDetails) | | Комментарий к отмене выплаты | | public | [$created_at](../classes/YooKassa-Model-Payout-Payout.md#property_created_at) | | Время создания заказа | | public | [$createdAt](../classes/YooKassa-Model-Payout-Payout.md#property_createdAt) | | Время создания заказа | | public | [$deal](../classes/YooKassa-Model-Payout-Payout.md#property_deal) | | Сделка, в рамках которой нужно провести выплату | | public | [$description](../classes/YooKassa-Model-Payout-Payout.md#property_description) | | Описание транзакции | | public | [$id](../classes/YooKassa-Model-Payout-Payout.md#property_id) | | Идентификатор выплаты | | public | [$metadata](../classes/YooKassa-Model-Payout-Payout.md#property_metadata) | | Метаданные выплаты указанные мерчантом | | public | [$payout_destination](../classes/YooKassa-Model-Payout-Payout.md#property_payout_destination) | | Способ проведения выплаты | | public | [$payoutDestination](../classes/YooKassa-Model-Payout-Payout.md#property_payoutDestination) | | Способ проведения выплаты | | public | [$receipt](../classes/YooKassa-Model-Payout-Payout.md#property_receipt) | | Данные чека, зарегистрированного в ФНС | | public | [$self_employed](../classes/YooKassa-Model-Payout-Payout.md#property_self_employed) | | Данные самозанятого, который получит выплату | | public | [$selfEmployed](../classes/YooKassa-Model-Payout-Payout.md#property_selfEmployed) | | Данные самозанятого, который получит выплату | | public | [$status](../classes/YooKassa-Model-Payout-Payout.md#property_status) | | Текущее состояние выплаты | | public | [$test](../classes/YooKassa-Model-Payout-Payout.md#property_test) | | Признак тестовой операции | | protected | [$_amount](../classes/YooKassa-Model-Payout-Payout.md#property__amount) | | Сумма выплаты | | protected | [$_cancellation_details](../classes/YooKassa-Model-Payout-Payout.md#property__cancellation_details) | | Комментарий к статусу canceled: кто отменил выплаты и по какой причине | | protected | [$_created_at](../classes/YooKassa-Model-Payout-Payout.md#property__created_at) | | Время создания выплаты. Пример: ~`2017-11-03T11:52:31.827Z` | | protected | [$_deal](../classes/YooKassa-Model-Payout-Payout.md#property__deal) | | Сделка, в рамках которой нужно провести выплату. Присутствует, если вы проводите Безопасную сделку | | protected | [$_description](../classes/YooKassa-Model-Payout-Payout.md#property__description) | | Описание транзакции (не более 128 символов). Например: «Выплата по договору 37». | | protected | [$_id](../classes/YooKassa-Model-Payout-Payout.md#property__id) | | Идентификатор выплаты. | | protected | [$_metadata](../classes/YooKassa-Model-Payout-Payout.md#property__metadata) | | Метаданные выплаты указанные мерчантом | | protected | [$_payout_destination](../classes/YooKassa-Model-Payout-Payout.md#property__payout_destination) | | Способ проведения выплаты | | protected | [$_receipt](../classes/YooKassa-Model-Payout-Payout.md#property__receipt) | | Данные чека, зарегистрированного в ФНС. Присутствует, если вы делаете выплату самозанятому. | | protected | [$_self_employed](../classes/YooKassa-Model-Payout-Payout.md#property__self_employed) | | Данные самозанятого, который получит выплату. Присутствует, если вы делаете выплату самозанятому | | protected | [$_status](../classes/YooKassa-Model-Payout-Payout.md#property__status) | | Текущее состояние выплаты | | protected | [$_test](../classes/YooKassa-Model-Payout-Payout.md#property__test) | | Признак тестовой операции | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Payout-Payout.md#method_getAmount) | | Возвращает сумму. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Payout-Payout.md#method_getCancellationDetails) | | Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [getCreatedAt()](../classes/YooKassa-Model-Payout-Payout.md#method_getCreatedAt) | | Возвращает время создания заказа. | | public | [getDeal()](../classes/YooKassa-Model-Payout-Payout.md#method_getDeal) | | Возвращает сделку, в рамках которой нужно провести выплату. | | public | [getDescription()](../classes/YooKassa-Model-Payout-Payout.md#method_getDescription) | | Возвращает описание транзакции. | | public | [getId()](../classes/YooKassa-Model-Payout-Payout.md#method_getId) | | Возвращает идентификатор выплаты. | | public | [getMetadata()](../classes/YooKassa-Model-Payout-Payout.md#method_getMetadata) | | Возвращает метаданные выплаты установленные мерчантом | | public | [getPayoutDestination()](../classes/YooKassa-Model-Payout-Payout.md#method_getPayoutDestination) | | Возвращает используемый способ проведения выплаты. | | public | [getReceipt()](../classes/YooKassa-Model-Payout-Payout.md#method_getReceipt) | | Возвращает данные чека, зарегистрированного в ФНС. | | public | [getSelfEmployed()](../classes/YooKassa-Model-Payout-Payout.md#method_getSelfEmployed) | | Возвращает данные самозанятого, который получит выплату. | | public | [getStatus()](../classes/YooKassa-Model-Payout-Payout.md#method_getStatus) | | Возвращает состояние выплаты. | | public | [getTest()](../classes/YooKassa-Model-Payout-Payout.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Payout-Payout.md#method_setAmount) | | Устанавливает сумму выплаты. | | public | [setCancellationDetails()](../classes/YooKassa-Model-Payout-Payout.md#method_setCancellationDetails) | | Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [setCreatedAt()](../classes/YooKassa-Model-Payout-Payout.md#method_setCreatedAt) | | Устанавливает время создания заказа. | | public | [setDeal()](../classes/YooKassa-Model-Payout-Payout.md#method_setDeal) | | Устанавливает сделку, в рамках которой нужно провести выплату. | | public | [setDescription()](../classes/YooKassa-Model-Payout-Payout.md#method_setDescription) | | Устанавливает описание транзакции | | public | [setId()](../classes/YooKassa-Model-Payout-Payout.md#method_setId) | | Устанавливает идентификатор выплаты. | | public | [setMetadata()](../classes/YooKassa-Model-Payout-Payout.md#method_setMetadata) | | Устанавливает метаданные выплаты. | | public | [setPayoutDestination()](../classes/YooKassa-Model-Payout-Payout.md#method_setPayoutDestination) | | Устанавливает используемый способ проведения выплаты. | | public | [setReceipt()](../classes/YooKassa-Model-Payout-Payout.md#method_setReceipt) | | Устанавливает данные чека, зарегистрированного в ФНС. | | public | [setSelfEmployed()](../classes/YooKassa-Model-Payout-Payout.md#method_setSelfEmployed) | | Устанавливает данные самозанятого, который получит выплату. | | public | [setStatus()](../classes/YooKassa-Model-Payout-Payout.md#method_setStatus) | | Устанавливает статус выплаты | | public | [setTest()](../classes/YooKassa-Model-Payout-Payout.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payout/Payout.php](../../lib/Model/Payout/Payout.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payout\Payout * Implements: * [\YooKassa\Model\Payout\PayoutInterface](../classes/YooKassa-Model-Payout-PayoutInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION ```php MAX_LENGTH_DESCRIPTION = 128 : int ``` ###### MAX_LENGTH_ID ```php MAX_LENGTH_ID = 50 : int ``` ###### MIN_LENGTH_ID ```php MIN_LENGTH_ID = 36 : int ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма выплаты **Type:** AmountInterface **Details:** #### public $cancellation_details : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене выплаты **Type:** CancellationDetailsInterface **Details:** #### public $cancellationDetails : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене выплаты **Type:** CancellationDetailsInterface **Details:** #### public $created_at : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** #### public $createdAt : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** #### public $deal : \YooKassa\Model\Deal\PayoutDealInfo --- ***Description*** Сделка, в рамках которой нужно провести выплату **Type:** PayoutDealInfo **Details:** #### public $description : string --- ***Description*** Описание транзакции **Type:** string **Details:** #### public $id : string --- ***Description*** Идентификатор выплаты **Type:** string **Details:** #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные выплаты указанные мерчантом **Type:** Metadata **Details:** #### public $payout_destination : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения выплаты **Type:** AbstractPaymentMethod **Details:** #### public $payoutDestination : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения выплаты **Type:** AbstractPaymentMethod **Details:** #### public $receipt : \YooKassa\Model\Payout\IncomeReceipt --- ***Description*** Данные чека, зарегистрированного в ФНС **Type:** IncomeReceipt **Details:** #### public $self_employed : \YooKassa\Model\Payout\PayoutSelfEmployed --- ***Description*** Данные самозанятого, который получит выплату **Type:** PayoutSelfEmployed **Details:** #### public $selfEmployed : \YooKassa\Model\Payout\PayoutSelfEmployed --- ***Description*** Данные самозанятого, который получит выплату **Type:** PayoutSelfEmployed **Details:** #### public $status : string --- ***Description*** Текущее состояние выплаты **Type:** string **Details:** #### public $test : bool --- ***Description*** Признак тестовой операции **Type:** bool **Details:** #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Summary** Сумма выплаты **Type:** AmountInterface **Details:** #### protected $_cancellation_details : ?\YooKassa\Model\Payout\PayoutCancellationDetails --- **Summary** Комментарий к статусу canceled: кто отменил выплаты и по какой причине **Type:** PayoutCancellationDetails **Details:** #### protected $_created_at : ?\DateTime --- **Summary** Время создания выплаты. Пример: ~`2017-11-03T11:52:31.827Z` **Type:** DateTime **Details:** #### protected $_deal : ?\YooKassa\Model\Deal\PayoutDealInfo --- **Summary** Сделка, в рамках которой нужно провести выплату. Присутствует, если вы проводите Безопасную сделку **Type:** PayoutDealInfo **Details:** #### protected $_description : ?string --- **Summary** Описание транзакции (не более 128 символов). Например: «Выплата по договору 37». **Type:** ?string **Details:** #### protected $_id : ?string --- **Summary** Идентификатор выплаты. **Type:** ?string **Details:** #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Summary** Метаданные выплаты указанные мерчантом **Type:** Metadata **Details:** #### protected $_payout_destination : ?\YooKassa\Model\Payout\AbstractPayoutDestination --- **Summary** Способ проведения выплаты **Type:** AbstractPayoutDestination **Details:** #### protected $_receipt : ?\YooKassa\Model\Payout\IncomeReceipt --- **Summary** Данные чека, зарегистрированного в ФНС. Присутствует, если вы делаете выплату самозанятому. **Type:** IncomeReceipt **Details:** #### protected $_self_employed : ?\YooKassa\Model\Payout\PayoutSelfEmployed --- **Summary** Данные самозанятого, который получит выплату. Присутствует, если вы делаете выплату самозанятому **Type:** PayoutSelfEmployed **Details:** #### protected $_status : ?string --- **Summary** Текущее состояние выплаты **Type:** ?string **Details:** #### protected $_test : ?bool --- **Summary** Признак тестовой операции **Type:** ?bool **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма выплаты #### public getCancellationDetails() : \YooKassa\Model\Payout\PayoutCancellationDetails|null ```php public getCancellationDetails() : \YooKassa\Model\Payout\PayoutCancellationDetails|null ``` **Summary** Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\PayoutCancellationDetails|null - Комментарий к статусу canceled #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \DateTime|null - Время создания заказа #### public getDeal() : \YooKassa\Model\Deal\PayoutDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PayoutDealInfo|null ``` **Summary** Возвращает сделку, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Deal\PayoutDealInfo|null - Сделка, в рамках которой нужно провести выплату #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** string|null - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** string|null - Идентификатор выплаты #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает метаданные выплаты установленные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные выплаты указанные мерчантом #### public getPayoutDestination() : \YooKassa\Model\Payout\AbstractPayoutDestination|null ```php public getPayoutDestination() : \YooKassa\Model\Payout\AbstractPayoutDestination|null ``` **Summary** Возвращает используемый способ проведения выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\AbstractPayoutDestination|null - Способ проведения выплаты #### public getReceipt() : \YooKassa\Model\Payout\IncomeReceipt|null ```php public getReceipt() : \YooKassa\Model\Payout\IncomeReceipt|null ``` **Summary** Возвращает данные чека, зарегистрированного в ФНС. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\IncomeReceipt|null - Данные чека, зарегистрированного в ФНС #### public getSelfEmployed() : \YooKassa\Model\Payout\PayoutSelfEmployed|null ```php public getSelfEmployed() : \YooKassa\Model\Payout\PayoutSelfEmployed|null ``` **Summary** Возвращает данные самозанятого, который получит выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\PayoutSelfEmployed|null - Данные самозанятого, который получит выплату #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает состояние выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** string|null - Текущее состояние выплаты #### public getTest() : bool|null ```php public getTest() : bool|null ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** bool|null - Признак тестовой операции #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма выплаты | **Returns:** self - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\Payout\PayoutCancellationDetails|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\PayoutCancellationDetails OR array OR null | cancellation_details | Комментарий к статусу canceled | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания выплаты. Пример: ~`2017-11-03T11:52:31.827Z` | **Returns:** self - #### public setDeal() : self ```php public setDeal(\YooKassa\Model\Deal\PayoutDealInfo|array|null $deal = null) : self ``` **Summary** Устанавливает сделку, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Deal\PayoutDealInfo OR array OR null | deal | Сделка, в рамках которой нужно провести выплату | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Описание транзакции (не более 128 символов). Например: «Выплата по договору 37». | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор выплаты | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает метаданные выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Метаданные выплаты указанные мерчантом | **Returns:** self - #### public setPayoutDestination() : $this ```php public setPayoutDestination(\YooKassa\Model\Payout\AbstractPayoutDestination|array|null $payout_destination) : $this ``` **Summary** Устанавливает используемый способ проведения выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\AbstractPayoutDestination OR array OR null | payout_destination | Способ проведения выплаты | **Returns:** $this - #### public setReceipt() : self ```php public setReceipt(\YooKassa\Model\Payout\IncomeReceipt|array|null $receipt = null) : self ``` **Summary** Устанавливает данные чека, зарегистрированного в ФНС. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\IncomeReceipt OR array OR null | receipt | Данные чека, зарегистрированного в ФНС | **Returns:** self - #### public setSelfEmployed() : self ```php public setSelfEmployed(\YooKassa\Model\Payout\PayoutSelfEmployed|array|null $self_employed = null) : self ``` **Summary** Устанавливает данные самозанятого, который получит выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\PayoutSelfEmployed OR array OR null | self_employed | Данные самозанятого, который получит выплату | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус выплаты **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус выплаты | **Returns:** self - #### public setTest() : self ```php public setTest(bool|null $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | test | Признак тестовой операции | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-AbstractPaymentRequest.md000064400000067601150364342670024321 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\AbstractPaymentRequest ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель AbstractPaymentRequest. **Description:** Базовый класс объекта запроса к API. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$airline](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property_airline) | | Объект с данными для продажи авиабилетов | | public | [$amount](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property_amount) | | Сумма | | public | [$receipt](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property_receipt) | | Данные фискального чека 54-ФЗ | | public | [$transfers](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property_transfers) | | Данные о распределении платежа между магазинами | | protected | [$_airline](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property__airline) | | | | protected | [$_amount](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property__amount) | | | | protected | [$_receipt](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property__receipt) | | | | protected | [$_transfers](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property__transfers) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAirline()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_getAirline) | | Возвращает данные авиабилетов. | | public | [getAmount()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_getAmount) | | Возвращает сумму оплаты. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [getReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_getReceipt) | | Возвращает чек, если он есть. | | public | [getTransfers()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_getTransfers) | | Возвращает данные о распределении денег — сколько и в какой магазин нужно перевести. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasAirline()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_hasAirline) | | Проверяет, были ли установлены данные авиабилетов. | | public | [hasAmount()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_hasAmount) | | Проверяет, была ли установлена сумма оплаты. | | public | [hasReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_hasReceipt) | | Проверяет наличие чека. | | public | [hasTransfers()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_hasTransfers) | | Проверяет наличие данных о распределении денег. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [removeReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_removeReceipt) | | Удаляет чек из запроса. | | public | [setAirline()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_setAirline) | | Устанавливает данные авиабилетов. | | public | [setAmount()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_setAmount) | | Устанавливает сумму оплаты. | | public | [setReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_setReceipt) | | Устанавливает чек. | | public | [setTransfers()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_setTransfers) | | Устанавливает transfers (массив распределения денег между магазинами). | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | public | [validate()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_validate) | | Валидирует объект запроса. | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_setValidationError) | | Устанавливает ошибку валидации. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/AbstractPaymentRequest.php](../../lib/Request/Payments/AbstractPaymentRequest.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) * \YooKassa\Request\Payments\AbstractPaymentRequest * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $airline : \YooKassa\Request\Payments\AirlineInterface|null --- ***Description*** Объект с данными для продажи авиабилетов **Type:** AirlineInterface|null **Details:** #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма **Type:** AmountInterface **Details:** #### public $receipt : \YooKassa\Model\Receipt\ReceiptInterface|null --- ***Description*** Данные фискального чека 54-ФЗ **Type:** ReceiptInterface|null **Details:** #### public $transfers : \YooKassa\Common\ListObjectInterface|\YooKassa\Request\Payments\TransferDataInterface[]|null --- ***Description*** Данные о распределении платежа между магазинами **Type:** TransferDataInterface[]|null **Details:** #### protected $_airline : ?\YooKassa\Request\Payments\AirlineInterface --- **Type:** AirlineInterface Объект с данными для продажи авиабилетов **Details:** #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface Сумма оплаты **Details:** #### protected $_receipt : ?\YooKassa\Model\Receipt\ReceiptInterface --- **Type:** ReceiptInterface Данные фискального чека 54-ФЗ **Details:** #### protected $_transfers : ?\YooKassa\Common\ListObject --- **Type:** ListObject **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAirline() : null|\YooKassa\Request\Payments\AirlineInterface ```php public getAirline() : null|\YooKassa\Request\Payments\AirlineInterface ``` **Summary** Возвращает данные авиабилетов. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** null|\YooKassa\Request\Payments\AirlineInterface - Данные авиабилетов #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма оплаты #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string|null - Последняя произошедшая ошибка валидации #### public getReceipt() : null|\YooKassa\Model\Receipt\ReceiptInterface ```php public getReceipt() : null|\YooKassa\Model\Receipt\ReceiptInterface ``` **Summary** Возвращает чек, если он есть. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** null|\YooKassa\Model\Receipt\ReceiptInterface - Данные фискального чека 54-ФЗ или null, если чека нет #### public getTransfers() : \YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface ```php public getTransfers() : \YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает данные о распределении денег — сколько и в какой магазин нужно перевести. **Description** Присутствует, если вы используете решение ЮKassa для платформ. (https://yookassa.ru/developers/special-solutions/checkout-for-platforms/basics). **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** \YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface - Данные о распределении денег #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasAirline() : bool ```php public hasAirline() : bool ``` **Summary** Проверяет, были ли установлены данные авиабилетов. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** bool - #### public hasAmount() : bool ```php public hasAmount() : bool ``` **Summary** Проверяет, была ли установлена сумма оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** bool - True если сумма оплаты была установлена, false если нет #### public hasReceipt() : bool ```php public hasReceipt() : bool ``` **Summary** Проверяет наличие чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** bool - True если чек есть, false если нет #### public hasTransfers() : bool ```php public hasTransfers() : bool ``` **Summary** Проверяет наличие данных о распределении денег. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** bool - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public removeReceipt() : self ```php public removeReceipt() : self ``` **Summary** Удаляет чек из запроса. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** self - #### public setAirline() : \YooKassa\Common\AbstractRequestInterface ```php public setAirline(\YooKassa\Request\Payments\AirlineInterface|array|null $airline) : \YooKassa\Common\AbstractRequestInterface ``` **Summary** Устанавливает данные авиабилетов. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Payments\AirlineInterface OR array OR null | airline | Данные авиабилетов | **Returns:** \YooKassa\Common\AbstractRequestInterface - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|string $amount = null) : self ``` **Summary** Устанавливает сумму оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR string | amount | Сумма оплаты | **Returns:** self - #### public setReceipt() : self ```php public setReceipt(null|array|\YooKassa\Model\Receipt\ReceiptInterface $receipt) : self ``` **Summary** Устанавливает чек. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Receipt\ReceiptInterface | receipt | Инстанс чека или null для удаления информации о чеке | **Returns:** self - #### public setTransfers() : self ```php public setTransfers(\YooKassa\Common\ListObjectInterface|array|null $transfers = null) : self ``` **Summary** Устанавливает transfers (массив распределения денег между магазинами). **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | transfers | Массив распределения денег | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public validate() : bool ```php public validate() : bool ``` **Summary** Валидирует объект запроса. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** bool - True если запрос валиден и его можно отправить в API, false если нет #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setValidationError() : void ```php protected setValidationError(string $value) : void ``` **Summary** Устанавливает ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** void - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Deals-CreateDealRequest.md000064400000064540150364342670022440 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Deals\CreateDealRequest ### Namespace: [\YooKassa\Request\Deals](../namespaces/yookassa-request-deals.md) --- **Summary:** Класс, представляющий модель SafeDealRequest. **Description:** Класс объекта запроса к API на проведение новой сделки. --- ### Examples Пример использования билдера ```php try { $dealBuilder = \YooKassa\Request\Deals\CreateDealRequest::builder(); $dealBuilder ->setType(\YooKassa\Model\Deal\DealType::SAFE_DEAL) ->setFeeMoment(\YooKassa\Model\Deal\FeeMoment::PAYMENT_SUCCEEDED) ->setDescription('SAFE_DEAL 123554642-2432FF344R') ->setMetadata(['order_id' => '37']) ; // Создаем объект запроса $request = $dealBuilder->build(); $idempotenceKey = uniqid('', true); $response = $client->createDeal($request, $idempotenceKey); } catch (Exception $e) { $response = $e; } var_dump($response); ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$description](../classes/YooKassa-Request-Deals-CreateDealRequest.md#property_description) | | Описание сделки | | public | [$fee_moment](../classes/YooKassa-Request-Deals-CreateDealRequest.md#property_fee_moment) | | Момент перечисления вам вознаграждения платформы | | public | [$feeMoment](../classes/YooKassa-Request-Deals-CreateDealRequest.md#property_feeMoment) | | Момент перечисления вам вознаграждения платформы | | public | [$metadata](../classes/YooKassa-Request-Deals-CreateDealRequest.md#property_metadata) | | Метаданные привязанные к сделке | | public | [$type](../classes/YooKassa-Request-Deals-CreateDealRequest.md#property_type) | | Тип сделки | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [builder()](../classes/YooKassa-Request-Deals-CreateDealRequest.md#method_builder) | | Возвращает билдер объектов запросов создания сделки. | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getDescription()](../classes/YooKassa-Request-Deals-CreateDealRequest.md#method_getDescription) | | Возвращает описание сделки. | | public | [getFeeMoment()](../classes/YooKassa-Request-Deals-CreateDealRequest.md#method_getFeeMoment) | | Возвращает момент перечисления вам вознаграждения платформы. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [getMetadata()](../classes/YooKassa-Request-Deals-CreateDealRequest.md#method_getMetadata) | | Возвращает данные оплаты установленные мерчантом | | public | [getType()](../classes/YooKassa-Request-Deals-CreateDealRequest.md#method_getType) | | Возвращает тип сделки. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasDescription()](../classes/YooKassa-Request-Deals-CreateDealRequest.md#method_hasDescription) | | Проверяет наличие описания в создаваемой сделке. | | public | [hasFeeMoment()](../classes/YooKassa-Request-Deals-CreateDealRequest.md#method_hasFeeMoment) | | Проверяет, был ли установлен момент перечисления вознаграждения. | | public | [hasMetadata()](../classes/YooKassa-Request-Deals-CreateDealRequest.md#method_hasMetadata) | | Проверяет, были ли установлены метаданные заказа. | | public | [hasType()](../classes/YooKassa-Request-Deals-CreateDealRequest.md#method_hasType) | | Проверяет наличие типа в создаваемой сделке. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setDescription()](../classes/YooKassa-Request-Deals-CreateDealRequest.md#method_setDescription) | | Устанавливает описание сделки. | | public | [setFeeMoment()](../classes/YooKassa-Request-Deals-CreateDealRequest.md#method_setFeeMoment) | | Устанавливает момент перечисления вам вознаграждения платформы. | | public | [setMetadata()](../classes/YooKassa-Request-Deals-CreateDealRequest.md#method_setMetadata) | | Устанавливает метаданные, привязанные к платежу. | | public | [setType()](../classes/YooKassa-Request-Deals-CreateDealRequest.md#method_setType) | | Устанавливает тип сделки. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | public | [validate()](../classes/YooKassa-Request-Deals-CreateDealRequest.md#method_validate) | | Проверяет на валидность текущий объект | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_setValidationError) | | Устанавливает ошибку валидации. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Deals/CreateDealRequest.php](../../lib/Request/Deals/CreateDealRequest.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) * \YooKassa\Request\Deals\CreateDealRequest * Implements: * [\YooKassa\Request\Deals\CreateDealRequestInterface](../classes/YooKassa-Request-Deals-CreateDealRequestInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $description : string --- ***Description*** Описание сделки **Type:** string **Details:** #### public $fee_moment : string --- ***Description*** Момент перечисления вам вознаграждения платформы **Type:** string **Details:** #### public $feeMoment : string --- ***Description*** Момент перечисления вам вознаграждения платформы **Type:** string **Details:** #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные привязанные к сделке **Type:** Metadata **Details:** #### public $type : string --- ***Description*** Тип сделки **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public builder() : \YooKassa\Request\Deals\CreateDealRequestBuilder ```php Static public builder() : \YooKassa\Request\Deals\CreateDealRequestBuilder ``` **Summary** Возвращает билдер объектов запросов создания сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) **Returns:** \YooKassa\Request\Deals\CreateDealRequestBuilder - Инстанс билдера объектов запросов #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) **Returns:** string|null - Описание сделки. #### public getFeeMoment() : string|null ```php public getFeeMoment() : string|null ``` **Summary** Возвращает момент перечисления вам вознаграждения платформы. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) **Returns:** string|null - Момент перечисления вам вознаграждения платформы #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string|null - Последняя произошедшая ошибка валидации #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает данные оплаты установленные мерчантом **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные, привязанные к платежу #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) **Returns:** string|null - Тип сделки #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasDescription() : bool ```php public hasDescription() : bool ``` **Summary** Проверяет наличие описания в создаваемой сделке. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) **Returns:** bool - True если описание сделки есть, false если нет #### public hasFeeMoment() : bool ```php public hasFeeMoment() : bool ``` **Summary** Проверяет, был ли установлен момент перечисления вознаграждения. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) **Returns:** bool - True если момент перечисления был установлен, false если нет #### public hasMetadata() : bool ```php public hasMetadata() : bool ``` **Summary** Проверяет, были ли установлены метаданные заказа. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) **Returns:** bool - True если метаданные были установлены, false если нет #### public hasType() : bool ```php public hasType() : bool ``` **Summary** Проверяет наличие типа в создаваемой сделке. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) **Returns:** bool - True если тип сделки есть, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Описание сделки (не более 128 символов) | **Returns:** self - #### public setFeeMoment() : self ```php public setFeeMoment(string|null $fee_moment = null) : self ``` **Summary** Устанавливает момент перечисления вам вознаграждения платформы. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fee_moment | Момент перечисления вам вознаграждения платформы | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(string|array|null $metadata = null) : self ``` **Summary** Устанавливает метаданные, привязанные к платежу. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR array OR null | metadata | Любые дополнительные данные, которые нужны вам для работы. | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип сделки. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип сделки | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public validate() : bool ```php public validate() : bool ``` **Summary** Проверяет на валидность текущий объект **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequest](../classes/YooKassa-Request-Deals-CreateDealRequest.md) **Returns:** bool - True если объект запроса валиден, false если нет #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setValidationError() : void ```php protected setValidationError(string $value) : void ``` **Summary** Устанавливает ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** void - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-InvalidPropertyException.md000064400000004257150364342670025000 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\InvalidPropertyException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md#method___construct) | | InvalidValueException constructor. | | public | [getProperty()](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md#method_getProperty) | | | --- ### Details * File: [lib/Common/Exceptions/InvalidPropertyException.php](../../lib/Common/Exceptions/InvalidPropertyException.php) * Package: Default * Class Hierarchy: * [\InvalidArgumentException](\InvalidArgumentException) * \YooKassa\Common\Exceptions\InvalidPropertyException --- ## Methods #### public __construct() : mixed ```php public __construct(string $message = '', int $code, string $property = '') : mixed ``` **Summary** InvalidValueException constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\InvalidPropertyException](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | message | | | int | code | | | string | property | | **Returns:** mixed - #### public getProperty() : string ```php public getProperty() : string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\InvalidPropertyException](../classes/YooKassa-Common-Exceptions-InvalidPropertyException.md) **Returns:** string - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationRedirect.md000064400000035545150364342670030356 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmationRedirect ### Namespace: [\YooKassa\Request\SelfEmployed](../namespaces/yookassa-request-selfemployed.md) --- **Summary:** Класс, представляющий модель SelfEmployedRequestConfirmationRedirect. **Description:** Перенаправление пользователя на сайт сервиса Мой налог для выдачи прав ЮMoney. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md#property_type) | | Тип сценария подтверждения. | | protected | [$_type](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md#property__type) | | Тип сценария подтверждения. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationRedirect.md#method___construct) | | Конструктор SelfEmployedRequestConfirmationRedirect. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getType()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md#method_getType) | | Возвращает тип сценария подтверждения. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setType()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md#method_setType) | | Устанавливает тип сценария подтверждения. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/SelfEmployed/SelfEmployedRequestConfirmationRedirect.php](../../lib/Request/SelfEmployed/SelfEmployedRequestConfirmationRedirect.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md) * \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmationRedirect * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип сценария подтверждения. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md) #### protected $_type : ?string --- **Summary** Тип сценария подтверждения. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** Конструктор SelfEmployedRequestConfirmationRedirect. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmationRedirect](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmationRedirect.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип сценария подтверждения. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип сценария подтверждения. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип сценария подтверждения | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payouts-AbstractPayoutResponse.md000064400000134674150364342670024204 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Request\Payouts\AbstractPayoutResponse ### Namespace: [\YooKassa\Request\Payouts](../namespaces/yookassa-request-payouts.md) --- **Summary:** Класс, представляющий AbstractPayoutResponse. **Description:** Абстрактный класс ответа от API, возвращающего информацию о выплате. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Payout-Payout.md#constant_MAX_LENGTH_DESCRIPTION) | | | | public | [MAX_LENGTH_ID](../classes/YooKassa-Model-Payout-Payout.md#constant_MAX_LENGTH_ID) | | | | public | [MIN_LENGTH_ID](../classes/YooKassa-Model-Payout-Payout.md#constant_MIN_LENGTH_ID) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Payout-Payout.md#property_amount) | | Сумма выплаты | | public | [$cancellation_details](../classes/YooKassa-Model-Payout-Payout.md#property_cancellation_details) | | Комментарий к отмене выплаты | | public | [$cancellationDetails](../classes/YooKassa-Model-Payout-Payout.md#property_cancellationDetails) | | Комментарий к отмене выплаты | | public | [$created_at](../classes/YooKassa-Model-Payout-Payout.md#property_created_at) | | Время создания заказа | | public | [$createdAt](../classes/YooKassa-Model-Payout-Payout.md#property_createdAt) | | Время создания заказа | | public | [$deal](../classes/YooKassa-Model-Payout-Payout.md#property_deal) | | Сделка, в рамках которой нужно провести выплату | | public | [$description](../classes/YooKassa-Model-Payout-Payout.md#property_description) | | Описание транзакции | | public | [$id](../classes/YooKassa-Model-Payout-Payout.md#property_id) | | Идентификатор выплаты | | public | [$metadata](../classes/YooKassa-Model-Payout-Payout.md#property_metadata) | | Метаданные выплаты указанные мерчантом | | public | [$payout_destination](../classes/YooKassa-Model-Payout-Payout.md#property_payout_destination) | | Способ проведения выплаты | | public | [$payoutDestination](../classes/YooKassa-Model-Payout-Payout.md#property_payoutDestination) | | Способ проведения выплаты | | public | [$receipt](../classes/YooKassa-Model-Payout-Payout.md#property_receipt) | | Данные чека, зарегистрированного в ФНС | | public | [$self_employed](../classes/YooKassa-Model-Payout-Payout.md#property_self_employed) | | Данные самозанятого, который получит выплату | | public | [$selfEmployed](../classes/YooKassa-Model-Payout-Payout.md#property_selfEmployed) | | Данные самозанятого, который получит выплату | | public | [$status](../classes/YooKassa-Model-Payout-Payout.md#property_status) | | Текущее состояние выплаты | | public | [$test](../classes/YooKassa-Model-Payout-Payout.md#property_test) | | Признак тестовой операции | | protected | [$_amount](../classes/YooKassa-Model-Payout-Payout.md#property__amount) | | Сумма выплаты | | protected | [$_cancellation_details](../classes/YooKassa-Model-Payout-Payout.md#property__cancellation_details) | | Комментарий к статусу canceled: кто отменил выплаты и по какой причине | | protected | [$_created_at](../classes/YooKassa-Model-Payout-Payout.md#property__created_at) | | Время создания выплаты. Пример: ~`2017-11-03T11:52:31.827Z` | | protected | [$_deal](../classes/YooKassa-Model-Payout-Payout.md#property__deal) | | Сделка, в рамках которой нужно провести выплату. Присутствует, если вы проводите Безопасную сделку | | protected | [$_description](../classes/YooKassa-Model-Payout-Payout.md#property__description) | | Описание транзакции (не более 128 символов). Например: «Выплата по договору 37». | | protected | [$_id](../classes/YooKassa-Model-Payout-Payout.md#property__id) | | Идентификатор выплаты. | | protected | [$_metadata](../classes/YooKassa-Model-Payout-Payout.md#property__metadata) | | Метаданные выплаты указанные мерчантом | | protected | [$_payout_destination](../classes/YooKassa-Model-Payout-Payout.md#property__payout_destination) | | Способ проведения выплаты | | protected | [$_receipt](../classes/YooKassa-Model-Payout-Payout.md#property__receipt) | | Данные чека, зарегистрированного в ФНС. Присутствует, если вы делаете выплату самозанятому. | | protected | [$_self_employed](../classes/YooKassa-Model-Payout-Payout.md#property__self_employed) | | Данные самозанятого, который получит выплату. Присутствует, если вы делаете выплату самозанятому | | protected | [$_status](../classes/YooKassa-Model-Payout-Payout.md#property__status) | | Текущее состояние выплаты | | protected | [$_test](../classes/YooKassa-Model-Payout-Payout.md#property__test) | | Признак тестовой операции | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Payout-Payout.md#method_getAmount) | | Возвращает сумму. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Payout-Payout.md#method_getCancellationDetails) | | Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [getCreatedAt()](../classes/YooKassa-Model-Payout-Payout.md#method_getCreatedAt) | | Возвращает время создания заказа. | | public | [getDeal()](../classes/YooKassa-Model-Payout-Payout.md#method_getDeal) | | Возвращает сделку, в рамках которой нужно провести выплату. | | public | [getDescription()](../classes/YooKassa-Model-Payout-Payout.md#method_getDescription) | | Возвращает описание транзакции. | | public | [getId()](../classes/YooKassa-Model-Payout-Payout.md#method_getId) | | Возвращает идентификатор выплаты. | | public | [getMetadata()](../classes/YooKassa-Model-Payout-Payout.md#method_getMetadata) | | Возвращает метаданные выплаты установленные мерчантом | | public | [getPayoutDestination()](../classes/YooKassa-Model-Payout-Payout.md#method_getPayoutDestination) | | Возвращает используемый способ проведения выплаты. | | public | [getReceipt()](../classes/YooKassa-Model-Payout-Payout.md#method_getReceipt) | | Возвращает данные чека, зарегистрированного в ФНС. | | public | [getSelfEmployed()](../classes/YooKassa-Model-Payout-Payout.md#method_getSelfEmployed) | | Возвращает данные самозанятого, который получит выплату. | | public | [getStatus()](../classes/YooKassa-Model-Payout-Payout.md#method_getStatus) | | Возвращает состояние выплаты. | | public | [getTest()](../classes/YooKassa-Model-Payout-Payout.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Payout-Payout.md#method_setAmount) | | Устанавливает сумму выплаты. | | public | [setCancellationDetails()](../classes/YooKassa-Model-Payout-Payout.md#method_setCancellationDetails) | | Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [setCreatedAt()](../classes/YooKassa-Model-Payout-Payout.md#method_setCreatedAt) | | Устанавливает время создания заказа. | | public | [setDeal()](../classes/YooKassa-Model-Payout-Payout.md#method_setDeal) | | Устанавливает сделку, в рамках которой нужно провести выплату. | | public | [setDescription()](../classes/YooKassa-Model-Payout-Payout.md#method_setDescription) | | Устанавливает описание транзакции | | public | [setId()](../classes/YooKassa-Model-Payout-Payout.md#method_setId) | | Устанавливает идентификатор выплаты. | | public | [setMetadata()](../classes/YooKassa-Model-Payout-Payout.md#method_setMetadata) | | Устанавливает метаданные выплаты. | | public | [setPayoutDestination()](../classes/YooKassa-Model-Payout-Payout.md#method_setPayoutDestination) | | Устанавливает используемый способ проведения выплаты. | | public | [setReceipt()](../classes/YooKassa-Model-Payout-Payout.md#method_setReceipt) | | Устанавливает данные чека, зарегистрированного в ФНС. | | public | [setSelfEmployed()](../classes/YooKassa-Model-Payout-Payout.md#method_setSelfEmployed) | | Устанавливает данные самозанятого, который получит выплату. | | public | [setStatus()](../classes/YooKassa-Model-Payout-Payout.md#method_setStatus) | | Устанавливает статус выплаты | | public | [setTest()](../classes/YooKassa-Model-Payout-Payout.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payouts/AbstractPayoutResponse.php](../../lib/Request/Payouts/AbstractPayoutResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) * \YooKassa\Request\Payouts\AbstractPayoutResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Abstract Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Inherited from [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ```php MAX_LENGTH_DESCRIPTION = 128 : int ``` ###### MAX_LENGTH_ID Inherited from [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ```php MAX_LENGTH_ID = 50 : int ``` ###### MIN_LENGTH_ID Inherited from [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ```php MIN_LENGTH_ID = 36 : int ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма выплаты **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $cancellation_details : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене выплаты **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $cancellationDetails : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене выплаты **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $created_at : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $createdAt : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $deal : \YooKassa\Model\Deal\PayoutDealInfo --- ***Description*** Сделка, в рамках которой нужно провести выплату **Type:** PayoutDealInfo **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $description : string --- ***Description*** Описание транзакции **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $id : string --- ***Description*** Идентификатор выплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные выплаты указанные мерчантом **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $payout_destination : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения выплаты **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $payoutDestination : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения выплаты **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $receipt : \YooKassa\Model\Payout\IncomeReceipt --- ***Description*** Данные чека, зарегистрированного в ФНС **Type:** IncomeReceipt **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $self_employed : \YooKassa\Model\Payout\PayoutSelfEmployed --- ***Description*** Данные самозанятого, который получит выплату **Type:** PayoutSelfEmployed **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $selfEmployed : \YooKassa\Model\Payout\PayoutSelfEmployed --- ***Description*** Данные самозанятого, который получит выплату **Type:** PayoutSelfEmployed **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $status : string --- ***Description*** Текущее состояние выплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $test : bool --- ***Description*** Признак тестовой операции **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Summary** Сумма выплаты **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_cancellation_details : ?\YooKassa\Model\Payout\PayoutCancellationDetails --- **Summary** Комментарий к статусу canceled: кто отменил выплаты и по какой причине **Type:** PayoutCancellationDetails **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_created_at : ?\DateTime --- **Summary** Время создания выплаты. Пример: ~`2017-11-03T11:52:31.827Z` **Type:** DateTime **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_deal : ?\YooKassa\Model\Deal\PayoutDealInfo --- **Summary** Сделка, в рамках которой нужно провести выплату. Присутствует, если вы проводите Безопасную сделку **Type:** PayoutDealInfo **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_description : ?string --- **Summary** Описание транзакции (не более 128 символов). Например: «Выплата по договору 37». **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_id : ?string --- **Summary** Идентификатор выплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Summary** Метаданные выплаты указанные мерчантом **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_payout_destination : ?\YooKassa\Model\Payout\AbstractPayoutDestination --- **Summary** Способ проведения выплаты **Type:** AbstractPayoutDestination **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_receipt : ?\YooKassa\Model\Payout\IncomeReceipt --- **Summary** Данные чека, зарегистрированного в ФНС. Присутствует, если вы делаете выплату самозанятому. **Type:** IncomeReceipt **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_self_employed : ?\YooKassa\Model\Payout\PayoutSelfEmployed --- **Summary** Данные самозанятого, который получит выплату. Присутствует, если вы делаете выплату самозанятому **Type:** PayoutSelfEmployed **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_status : ?string --- **Summary** Текущее состояние выплаты **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_test : ?bool --- **Summary** Признак тестовой операции **Type:** ?bool **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма выплаты #### public getCancellationDetails() : \YooKassa\Model\Payout\PayoutCancellationDetails|null ```php public getCancellationDetails() : \YooKassa\Model\Payout\PayoutCancellationDetails|null ``` **Summary** Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\PayoutCancellationDetails|null - Комментарий к статусу canceled #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \DateTime|null - Время создания заказа #### public getDeal() : \YooKassa\Model\Deal\PayoutDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PayoutDealInfo|null ``` **Summary** Возвращает сделку, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Deal\PayoutDealInfo|null - Сделка, в рамках которой нужно провести выплату #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** string|null - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** string|null - Идентификатор выплаты #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает метаданные выплаты установленные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные выплаты указанные мерчантом #### public getPayoutDestination() : \YooKassa\Model\Payout\AbstractPayoutDestination|null ```php public getPayoutDestination() : \YooKassa\Model\Payout\AbstractPayoutDestination|null ``` **Summary** Возвращает используемый способ проведения выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\AbstractPayoutDestination|null - Способ проведения выплаты #### public getReceipt() : \YooKassa\Model\Payout\IncomeReceipt|null ```php public getReceipt() : \YooKassa\Model\Payout\IncomeReceipt|null ``` **Summary** Возвращает данные чека, зарегистрированного в ФНС. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\IncomeReceipt|null - Данные чека, зарегистрированного в ФНС #### public getSelfEmployed() : \YooKassa\Model\Payout\PayoutSelfEmployed|null ```php public getSelfEmployed() : \YooKassa\Model\Payout\PayoutSelfEmployed|null ``` **Summary** Возвращает данные самозанятого, который получит выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\PayoutSelfEmployed|null - Данные самозанятого, который получит выплату #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает состояние выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** string|null - Текущее состояние выплаты #### public getTest() : bool|null ```php public getTest() : bool|null ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** bool|null - Признак тестовой операции #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма выплаты | **Returns:** self - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\Payout\PayoutCancellationDetails|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\PayoutCancellationDetails OR array OR null | cancellation_details | Комментарий к статусу canceled | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания выплаты. Пример: ~`2017-11-03T11:52:31.827Z` | **Returns:** self - #### public setDeal() : self ```php public setDeal(\YooKassa\Model\Deal\PayoutDealInfo|array|null $deal = null) : self ``` **Summary** Устанавливает сделку, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Deal\PayoutDealInfo OR array OR null | deal | Сделка, в рамках которой нужно провести выплату | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Описание транзакции (не более 128 символов). Например: «Выплата по договору 37». | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор выплаты | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает метаданные выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Метаданные выплаты указанные мерчантом | **Returns:** self - #### public setPayoutDestination() : $this ```php public setPayoutDestination(\YooKassa\Model\Payout\AbstractPayoutDestination|array|null $payout_destination) : $this ``` **Summary** Устанавливает используемый способ проведения выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\AbstractPayoutDestination OR array OR null | payout_destination | Способ проведения выплаты | **Returns:** $this - #### public setReceipt() : self ```php public setReceipt(\YooKassa\Model\Payout\IncomeReceipt|array|null $receipt = null) : self ``` **Summary** Устанавливает данные чека, зарегистрированного в ФНС. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\IncomeReceipt OR array OR null | receipt | Данные чека, зарегистрированного в ФНС | **Returns:** self - #### public setSelfEmployed() : self ```php public setSelfEmployed(\YooKassa\Model\Payout\PayoutSelfEmployed|array|null $self_employed = null) : self ``` **Summary** Устанавливает данные самозанятого, который получит выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\PayoutSelfEmployed OR array OR null | self_employed | Данные самозанятого, который получит выплату | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус выплаты **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус выплаты | **Returns:** self - #### public setTest() : self ```php public setTest(bool|null $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | test | Признак тестовой операции | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Refund-RefundCancellationDetails.md000064400000037273150364342670023752 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Refund\RefundCancellationDetails ### Namespace: [\YooKassa\Model\Refund](../namespaces/yookassa-model-refund.md) --- **Summary:** Класс, представляющий модель RefundCancellationDetails. **Description:** Комментарий к статусу `canceled`: кто отменил возврат и по какой причине. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$party](../classes/YooKassa-Model-Refund-RefundCancellationDetails.md#property_party) | | Инициатор отмены возврата | | public | [$reason](../classes/YooKassa-Model-Refund-RefundCancellationDetails.md#property_reason) | | Причина отмены возврата | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getParty()](../classes/YooKassa-Model-Refund-RefundCancellationDetails.md#method_getParty) | | Возвращает участника процесса возврата, который принял решение об отмене транзакции. | | public | [getReason()](../classes/YooKassa-Model-Refund-RefundCancellationDetails.md#method_getReason) | | Возвращает причину отмены возврата. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setParty()](../classes/YooKassa-Model-Refund-RefundCancellationDetails.md#method_setParty) | | Устанавливает участника процесса возврата, который принял решение об отмене транзакции. | | public | [setReason()](../classes/YooKassa-Model-Refund-RefundCancellationDetails.md#method_setReason) | | Устанавливает причину отмены возврата. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Refund/RefundCancellationDetails.php](../../lib/Model/Refund/RefundCancellationDetails.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Refund\RefundCancellationDetails * Implements: * [\YooKassa\Model\CancellationDetailsInterface](../classes/YooKassa-Model-CancellationDetailsInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $party : string --- ***Description*** Инициатор отмены возврата **Type:** string **Details:** #### public $reason : string --- ***Description*** Причина отмены возврата **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getParty() : string ```php public getParty() : string ``` **Summary** Возвращает участника процесса возврата, который принял решение об отмене транзакции. **Details:** * Inherited From: [\YooKassa\Model\Refund\RefundCancellationDetails](../classes/YooKassa-Model-Refund-RefundCancellationDetails.md) **Returns:** string - Инициатор отмены возврата #### public getReason() : string ```php public getReason() : string ``` **Summary** Возвращает причину отмены возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\RefundCancellationDetails](../classes/YooKassa-Model-Refund-RefundCancellationDetails.md) **Returns:** string - Причина отмены возврата #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setParty() : self ```php public setParty(string|null $party = null) : self ``` **Summary** Устанавливает участника процесса возврата, который принял решение об отмене транзакции. **Details:** * Inherited From: [\YooKassa\Model\Refund\RefundCancellationDetails](../classes/YooKassa-Model-Refund-RefundCancellationDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | party | | **Returns:** self - #### public setReason() : self ```php public setReason(string|null $reason = null) : self ``` **Summary** Устанавливает причину отмены возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\RefundCancellationDetails](../classes/YooKassa-Model-Refund-RefundCancellationDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | reason | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-CurrencyCode.md000064400000014767150364342670020053 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\CurrencyCode ### Namespace: [\YooKassa\Model](../namespaces/yookassa-model.md) --- **Summary:** Класс, представляющий модель CurrencyCode. **Description:** Трехбуквенный код валюты в формате [ISO-4217](https://www.iso.org/iso-4217-currency-codes.md). Пример: ~`RUB`. Должен соответствовать валюте субаккаунта (`recipient.gateway_id`), если вы разделяете потоки платежей, и валюте аккаунта (shopId в [личном кабинете](https://yookassa.ru/my)), если не разделяете. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [RUB](../classes/YooKassa-Model-CurrencyCode.md#constant_RUB) | | Российский рубль | | public | [USD](../classes/YooKassa-Model-CurrencyCode.md#constant_USD) | | Доллар США | | public | [EUR](../classes/YooKassa-Model-CurrencyCode.md#constant_EUR) | | Евро | | public | [BYN](../classes/YooKassa-Model-CurrencyCode.md#constant_BYN) | | Белорусский рубль | | public | [CNY](../classes/YooKassa-Model-CurrencyCode.md#constant_CNY) | | Китайская йена | | public | [KZT](../classes/YooKassa-Model-CurrencyCode.md#constant_KZT) | | Казахский тенге | | public | [UAH](../classes/YooKassa-Model-CurrencyCode.md#constant_UAH) | | Украинская гривна | | public | [UZS](../classes/YooKassa-Model-CurrencyCode.md#constant_UZS) | | Узбекский сум | | public | [_TRY](../classes/YooKassa-Model-CurrencyCode.md#constant__TRY) | | Турецкая лира | | public | [INR](../classes/YooKassa-Model-CurrencyCode.md#constant_INR) | | Индийская рупия | | public | [MDL](../classes/YooKassa-Model-CurrencyCode.md#constant_MDL) | | Молдавский лей | | public | [AZN](../classes/YooKassa-Model-CurrencyCode.md#constant_AZN) | | Азербайджанский манат | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-CurrencyCode.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/CurrencyCode.php](../../lib/Model/CurrencyCode.php) * Package: Default * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\CurrencyCode --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | author | | cms@yoomoney.ru | --- ## Constants ###### RUB Российский рубль ```php RUB = 'RUB' ``` ###### USD Доллар США ```php USD = 'USD' ``` ###### EUR Евро ```php EUR = 'EUR' ``` ###### BYN Белорусский рубль ```php BYN = 'BYN' ``` ###### CNY Китайская йена ```php CNY = 'CNY' ``` ###### KZT Казахский тенге ```php KZT = 'KZT' ``` ###### UAH Украинская гривна ```php UAH = 'UAH' ``` ###### UZS Узбекский сум ```php UZS = 'UZS' ``` ###### _TRY Турецкая лира ```php _TRY = 'TRY' ``` ###### INR Индийская рупия ```php INR = 'INR' ``` ###### MDL Молдавский лей ```php MDL = 'MDL' ``` ###### AZN Азербайджанский манат ```php AZN = 'AZN' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Client.md000064400000364751150364342670015647 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Client ### Namespace: [\YooKassa](../namespaces/yookassa.md) --- **Summary:** Класс клиента API. --- ### Examples Создание клиента ```php require_once '../vendor/autoload.php'; $client = new \YooKassa\Client(); // по логин/паролю $client->setAuth('xxxxxx', 'test_XXXXXXX'); // или по oauth токену $client->setAuthToken('token_XXXXXXX'); ``` --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [ME_PATH](../classes/YooKassa-Client-BaseClient.md#constant_ME_PATH) | | Точка входа для запроса к API по магазину | | public | [PAYMENTS_PATH](../classes/YooKassa-Client-BaseClient.md#constant_PAYMENTS_PATH) | | Точка входа для запросов к API по платежам | | public | [REFUNDS_PATH](../classes/YooKassa-Client-BaseClient.md#constant_REFUNDS_PATH) | | Точка входа для запросов к API по возвратам | | public | [WEBHOOKS_PATH](../classes/YooKassa-Client-BaseClient.md#constant_WEBHOOKS_PATH) | | Точка входа для запросов к API по вебхукам | | public | [RECEIPTS_PATH](../classes/YooKassa-Client-BaseClient.md#constant_RECEIPTS_PATH) | | Точка входа для запросов к API по чекам | | public | [DEALS_PATH](../classes/YooKassa-Client-BaseClient.md#constant_DEALS_PATH) | | Точка входа для запросов к API по сделкам | | public | [PAYOUTS_PATH](../classes/YooKassa-Client-BaseClient.md#constant_PAYOUTS_PATH) | | Точка входа для запросов к API по выплатам | | public | [PERSONAL_DATA_PATH](../classes/YooKassa-Client-BaseClient.md#constant_PERSONAL_DATA_PATH) | | Точка входа для запросов к API по персональным данным | | public | [SBP_BANKS_PATH](../classes/YooKassa-Client-BaseClient.md#constant_SBP_BANKS_PATH) | | Точка входа для запросов к API по участникам СБП | | public | [SELF_EMPLOYED_PATH](../classes/YooKassa-Client-BaseClient.md#constant_SELF_EMPLOYED_PATH) | | Точка входа для запросов к API по самозанятым | | public | [IDEMPOTENCY_KEY_HEADER](../classes/YooKassa-Client-BaseClient.md#constant_IDEMPOTENCY_KEY_HEADER) | | Имя HTTP заголовка, используемого для передачи idempotence key | | public | [DEFAULT_DELAY](../classes/YooKassa-Client-BaseClient.md#constant_DEFAULT_DELAY) | | Значение по умолчанию времени ожидания между запросами при отправке повторного запроса в случае получения ответа с HTTP статусом 202. | | public | [DEFAULT_TRIES_COUNT](../classes/YooKassa-Client-BaseClient.md#constant_DEFAULT_TRIES_COUNT) | | Значение по умолчанию количества попыток получения информации от API если пришёл ответ с HTTP статусом 202 | | public | [DEFAULT_ATTEMPTS_COUNT](../classes/YooKassa-Client-BaseClient.md#constant_DEFAULT_ATTEMPTS_COUNT) | | Значение по умолчанию количества попыток получения информации от API если пришёл ответ с HTTP статусом 202 | | public | [SDK_VERSION](../classes/YooKassa-Client.md#constant_SDK_VERSION) | | Текущая версия библиотеки. | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$apiClient](../classes/YooKassa-Client-BaseClient.md#property_apiClient) | | CURL клиент | | protected | [$attempts](../classes/YooKassa-Client-BaseClient.md#property_attempts) | | Количество повторных запросов при ответе API статусом 202. | | protected | [$config](../classes/YooKassa-Client-BaseClient.md#property_config) | | Настройки для CURL клиента. | | protected | [$logger](../classes/YooKassa-Client-BaseClient.md#property_logger) | | Объект для логирования работы SDK. | | protected | [$login](../classes/YooKassa-Client-BaseClient.md#property_login) | | shopId магазина. | | protected | [$password](../classes/YooKassa-Client-BaseClient.md#property_password) | | Секретный ключ магазина. | | protected | [$timeout](../classes/YooKassa-Client-BaseClient.md#property_timeout) | | Время через которое будут осуществляться повторные запросы. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Client-BaseClient.md#method___construct) | | Constructor. | | public | [addWebhook()](../classes/YooKassa-Client.md#method_addWebhook) | | Создание Webhook. | | public | [cancelPayment()](../classes/YooKassa-Client.md#method_cancelPayment) | | Отменить незавершенную оплату заказа. | | public | [capturePayment()](../classes/YooKassa-Client.md#method_capturePayment) | | Подтверждение платежа. | | public | [createDeal()](../classes/YooKassa-Client.md#method_createDeal) | | Создание сделки. | | public | [createPayment()](../classes/YooKassa-Client.md#method_createPayment) | | Создание платежа. | | public | [createPayout()](../classes/YooKassa-Client.md#method_createPayout) | | Создание выплаты. | | public | [createPersonalData()](../classes/YooKassa-Client.md#method_createPersonalData) | | Создание персональных данных. | | public | [createReceipt()](../classes/YooKassa-Client.md#method_createReceipt) | | Отправка чека в облачную кассу. | | public | [createRefund()](../classes/YooKassa-Client.md#method_createRefund) | | Проведение возврата платежа. | | public | [createSelfEmployed()](../classes/YooKassa-Client.md#method_createSelfEmployed) | | Создание самозанятого. | | public | [getApiClient()](../classes/YooKassa-Client-BaseClient.md#method_getApiClient) | | Возвращает CURL клиента для работы с API. | | public | [getConfig()](../classes/YooKassa-Client-BaseClient.md#method_getConfig) | | Возвращает настройки клиента. | | public | [getDealInfo()](../classes/YooKassa-Client.md#method_getDealInfo) | | Получить информацию о сделке. | | public | [getDeals()](../classes/YooKassa-Client.md#method_getDeals) | | Получить список сделок магазина. | | public | [getPaymentInfo()](../classes/YooKassa-Client.md#method_getPaymentInfo) | | Получить информацию о платеже. | | public | [getPayments()](../classes/YooKassa-Client.md#method_getPayments) | | Получить список платежей магазина. | | public | [getPayoutInfo()](../classes/YooKassa-Client.md#method_getPayoutInfo) | | Получить информацию о выплате. | | public | [getPersonalDataInfo()](../classes/YooKassa-Client.md#method_getPersonalDataInfo) | | Получить информацию о персональных данных. | | public | [getReceiptInfo()](../classes/YooKassa-Client.md#method_getReceiptInfo) | | Получить информацию о чеке. | | public | [getReceipts()](../classes/YooKassa-Client.md#method_getReceipts) | | Получить список чеков магазина. | | public | [getRefundInfo()](../classes/YooKassa-Client.md#method_getRefundInfo) | | Получить информацию о возврате. | | public | [getRefunds()](../classes/YooKassa-Client.md#method_getRefunds) | | Получить список возвратов платежей. | | public | [getSbpBanks()](../classes/YooKassa-Client.md#method_getSbpBanks) | | Получить список участников СБП | | public | [getSelfEmployedInfo()](../classes/YooKassa-Client.md#method_getSelfEmployedInfo) | | Получить информацию о самозанятом | | public | [getWebhooks()](../classes/YooKassa-Client.md#method_getWebhooks) | | Список созданных Webhook. | | public | [isNotificationIPTrusted()](../classes/YooKassa-Client-BaseClient.md#method_isNotificationIPTrusted) | | Метод проверяет, находится ли IP адрес среди IP адресов Юkassa, с которых отправляются уведомления. | | public | [me()](../classes/YooKassa-Client.md#method_me) | | Информация о магазине. | | public | [removeWebhook()](../classes/YooKassa-Client.md#method_removeWebhook) | | Удаление Webhook. | | public | [setApiClient()](../classes/YooKassa-Client-BaseClient.md#method_setApiClient) | | Устанавливает CURL клиента для работы с API. | | public | [setAuth()](../classes/YooKassa-Client-BaseClient.md#method_setAuth) | | Устанавливает авторизацию по логин/паролю. | | public | [setAuthToken()](../classes/YooKassa-Client-BaseClient.md#method_setAuthToken) | | Устанавливает авторизацию по Oauth-токену. | | public | [setConfig()](../classes/YooKassa-Client-BaseClient.md#method_setConfig) | | Устанавливает настройки клиента. | | public | [setLogger()](../classes/YooKassa-Client-BaseClient.md#method_setLogger) | | Устанавливает логгер приложения. | | public | [setMaxRequestAttempts()](../classes/YooKassa-Client-BaseClient.md#method_setMaxRequestAttempts) | | Установка значения количества попыток повторных запросов при статусе 202. | | public | [setRetryTimeout()](../classes/YooKassa-Client-BaseClient.md#method_setRetryTimeout) | | Установка значения задержки между повторными запросами. | | protected | [decodeData()](../classes/YooKassa-Client-BaseClient.md#method_decodeData) | | Декодирует JSON строку в массив данных. | | protected | [delay()](../classes/YooKassa-Client-BaseClient.md#method_delay) | | Задержка между повторными запросами. | | protected | [encodeData()](../classes/YooKassa-Client-BaseClient.md#method_encodeData) | | Кодирует массив данных в JSON строку. | | protected | [execute()](../classes/YooKassa-Client-BaseClient.md#method_execute) | | Выполнение запроса и обработка 202 статуса. | | protected | [handleError()](../classes/YooKassa-Client-BaseClient.md#method_handleError) | | Выбрасывает исключение по коду ошибки. | --- ### Details * File: [lib/Client.php](../../lib/Client.php) * Package: Default * Class Hierarchy: * [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) * \YooKassa\Client --- ## Constants ###### ME_PATH Inherited from [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) Точка входа для запроса к API по магазину ```php ME_PATH = '/me' ``` ###### PAYMENTS_PATH Inherited from [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) Точка входа для запросов к API по платежам ```php PAYMENTS_PATH = '/payments' ``` ###### REFUNDS_PATH Inherited from [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) Точка входа для запросов к API по возвратам ```php REFUNDS_PATH = '/refunds' ``` ###### WEBHOOKS_PATH Inherited from [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) Точка входа для запросов к API по вебхукам ```php WEBHOOKS_PATH = '/webhooks' ``` ###### RECEIPTS_PATH Inherited from [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) Точка входа для запросов к API по чекам ```php RECEIPTS_PATH = '/receipts' ``` ###### DEALS_PATH Inherited from [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) Точка входа для запросов к API по сделкам ```php DEALS_PATH = '/deals' ``` ###### PAYOUTS_PATH Inherited from [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) Точка входа для запросов к API по выплатам ```php PAYOUTS_PATH = '/payouts' ``` ###### PERSONAL_DATA_PATH Inherited from [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) Точка входа для запросов к API по персональным данным ```php PERSONAL_DATA_PATH = '/personal_data' ``` ###### SBP_BANKS_PATH Inherited from [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) Точка входа для запросов к API по участникам СБП ```php SBP_BANKS_PATH = '/sbp_banks' ``` ###### SELF_EMPLOYED_PATH Inherited from [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) Точка входа для запросов к API по самозанятым ```php SELF_EMPLOYED_PATH = '/self_employed' ``` ###### IDEMPOTENCY_KEY_HEADER Inherited from [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) Имя HTTP заголовка, используемого для передачи idempotence key ```php IDEMPOTENCY_KEY_HEADER = 'Idempotence-Key' ``` ###### DEFAULT_DELAY Inherited from [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) Значение по умолчанию времени ожидания между запросами при отправке повторного запроса в случае получения ответа с HTTP статусом 202. ```php DEFAULT_DELAY = 1800 ``` ###### DEFAULT_TRIES_COUNT Inherited from [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) Значение по умолчанию количества попыток получения информации от API если пришёл ответ с HTTP статусом 202 ```php DEFAULT_TRIES_COUNT = 3 ``` ###### DEFAULT_ATTEMPTS_COUNT Inherited from [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) Значение по умолчанию количества попыток получения информации от API если пришёл ответ с HTTP статусом 202 ```php DEFAULT_ATTEMPTS_COUNT = 3 ``` ###### SDK_VERSION Текущая версия библиотеки. ```php SDK_VERSION = '3.1.1' ``` --- ## Properties #### protected $apiClient : ?\YooKassa\Client\ApiClientInterface --- **Summary** CURL клиент **Type:** ApiClientInterface **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) #### protected $attempts : int --- **Summary** Количество повторных запросов при ответе API статусом 202. ***Description*** Значение по умолчанию 3 **Type:** int **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) #### protected $config : array --- **Summary** Настройки для CURL клиента. **Type:** array **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) #### protected $logger : ?\Psr\Log\LoggerInterface --- **Summary** Объект для логирования работы SDK. **Type:** LoggerInterface **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) #### protected $login : ?int --- **Summary** shopId магазина. **Type:** ?int **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) #### protected $password : ?string --- **Summary** Секретный ключ магазина. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) #### protected $timeout : int --- **Summary** Время через которое будут осуществляться повторные запросы. ***Description*** Значение по умолчанию - 1800 миллисекунд. **Type:** int Значение в миллисекундах **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) --- ## Methods #### public __construct() : mixed ```php public __construct(\YooKassa\Client\ApiClientInterface $apiClient = null, \YooKassa\Helpers\Config\ConfigurationLoaderInterface $configLoader = null) : mixed ``` **Summary** Constructor. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Client\ApiClientInterface | apiClient | | | \YooKassa\Helpers\Config\ConfigurationLoaderInterface | configLoader | | **Returns:** mixed - #### public addWebhook() : ?\YooKassa\Model\Webhook\Webhook ```php public addWebhook(array|\YooKassa\Model\Webhook\Webhook $request, null|string $idempotencyKey = null) : ?\YooKassa\Model\Webhook\Webhook ``` **Summary** Создание Webhook. **Description** Запрос позволяет подписаться на уведомления о событии (например, на переход платежа в статус successed). **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Webhook\Webhook | request | Запрос на создание вебхука | | null OR string | idempotencyKey | [Ключ идемпотентности](https://yookassa.ru/developers/using-api/basics?lang=php#idempotence) | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \Exception | | **Returns:** ?\YooKassa\Model\Webhook\Webhook - ##### Examples: Создание Webhook: ```php // Работа с Webhook // В данном примере мы устанавливаем вебхуки для succeeded и canceled уведомлений. // А так же проверяем, не установлены ли уже вебхуки. И если установлены на неверный адрес, удаляем. $client->setAuthToken('token_XXXXXXX'); try { $webHookUrl = 'https://merchant-site.ru/payment-notification'; $needWebHookList = [ \YooKassa\Model\Notification\NotificationEventType::PAYMENT_SUCCEEDED, \YooKassa\Model\Notification\NotificationEventType::PAYMENT_CANCELED, ]; $currentWebHookList = $client->getWebhooks()->getItems(); foreach ($needWebHookList as $event) { $hookIsSet = false; foreach ($currentWebHookList as $webHook) { if ($webHook->getEvent() !== $event) { continue; } if ($webHook->getUrl() !== $webHookUrl) { $client->removeWebhook($webHook->getId()); } else { $hookIsSet = true; } break; } if (!$hookIsSet) { $client->addWebhook(['event' => $event, 'url' => $webHookUrl]); } } $response = 'SUCCESS'; } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public cancelPayment() : ?\YooKassa\Request\Payments\CancelResponse ```php public cancelPayment(string $paymentId, null|string $idempotencyKey = null) : ?\YooKassa\Request\Payments\CancelResponse ``` **Summary** Отменить незавершенную оплату заказа. **Description** Отменяет платеж, находящийся в статусе `waiting_for_capture`. Отмена платежа значит, что вы не готовы выдать пользователю товар или оказать услугу. Как только вы отменяете платеж, мы начинаем возвращать деньги на счет плательщика. Для платежей банковскими картами отмена происходит мгновенно. Для остальных способов оплаты возврат может занимать до нескольких дней. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | paymentId | Идентификатор платежа | | null OR string | idempotencyKey | [Ключ идемпотентности](https://yookassa.ru/developers/using-api/basics?lang=php#idempotence) | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов. | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \Exception | | **Returns:** ?\YooKassa\Request\Payments\CancelResponse - ##### Examples: Отменить незавершенную оплату заказа: ```php $paymentId = '24e89cb0-000f-5000-9000-1de77fa0d6df'; try { $response = $client->cancelPayment($paymentId, uniqid('', true)); echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public capturePayment() : ?\YooKassa\Request\Payments\CreateCaptureResponse ```php public capturePayment(array|\YooKassa\Request\Payments\CreateCaptureRequestInterface $captureRequest, string $paymentId, null|string $idempotencyKey = null) : ?\YooKassa\Request\Payments\CreateCaptureResponse ``` **Summary** Подтверждение платежа. **Description** Подтверждает вашу готовность принять платеж. Платеж можно подтвердить, только если он находится в статусе `waiting_for_capture`. Если платеж подтвержден успешно — значит, оплата прошла, и вы можете выдать товар или оказать услугу пользователю. На следующий день после подтверждения платеж попадет в реестр, и ЮKassa переведет деньги на ваш расчетный счет. Если вы не подтверждаете платеж до момента, указанного в `expire_at`, по умолчанию он отменяется, а деньги возвращаются пользователю. При оплате банковской картой у вас есть 7 дней на подтверждение платежа. Для остальных способов оплаты платеж необходимо подтвердить в течение 6 часов. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Payments\CreateCaptureRequestInterface | captureRequest | Запрос на создание подтверждения платежа | | string | paymentId | Идентификатор платежа | | null OR string | idempotencyKey | [Ключ идемпотентности](https://yookassa.ru/developers/using-api/basics?lang=php#idempotence) | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \Exception | | **Returns:** ?\YooKassa\Request\Payments\CreateCaptureResponse - ##### Examples: Подтверждение платежа: ```php $paymentId = '24e89cb0-000f-5000-9000-1de77fa0d6df'; try { $response = $client->capturePayment( [ 'amount' => [ 'value' => '1500.00', 'currency' => 'RUB', ], 'transfers' => [ [ 'account_id' => '123', 'amount' => [ 'value' => '1000.00', 'currency' => 'RUB', ], ], [ 'account_id' => '456', 'amount' => [ 'value' => '500.00', 'currency' => 'RUB', ], ], ], ], $paymentId, uniqid('', true) ); echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public createDeal() : ?\YooKassa\Request\Deals\CreateDealResponse ```php public createDeal(array|\YooKassa\Request\Deals\CreateDealRequestInterface $deal, null|string $idempotenceKey = null) : ?\YooKassa\Request\Deals\CreateDealResponse ``` **Summary** Создание сделки. **Description** Запрос позволяет создать сделку, в рамках которой необходимо принять оплату от покупателя и перечислить ее продавцу. Необходимо указать следующие параметры: Дополнительные параметры: **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Deals\CreateDealRequestInterface | deal | Запрос на создание сделки | | null OR string | idempotenceKey | [Ключ идемпотентности](https://yookassa.ru/developers/using-api/basics?lang=php#idempotence) | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | **Returns:** ?\YooKassa\Request\Deals\CreateDealResponse - ##### Examples: Запрос на создание сделки: ```php try { $response = $client->createDeal( [ 'type' => \YooKassa\Model\Deal\DealType::SAFE_DEAL, 'fee_moment' => \YooKassa\Model\Deal\FeeMoment::PAYMENT_SUCCEEDED, 'metadata' => [ 'order_id' => '37', ], 'description' => 'SAFE_DEAL 123554642-2432FF344R', ], uniqid('', true) ); echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public createPayment() : \YooKassa\Request\Payments\CreatePaymentResponse|null ```php public createPayment(array|\YooKassa\Request\Payments\CreatePaymentRequestInterface $payment, null|string $idempotenceKey = null) : \YooKassa\Request\Payments\CreatePaymentResponse|null ``` **Summary** Создание платежа. **Description** Чтобы принять оплату, необходимо создать объект платежа — `Payment`. Он содержит всю необходимую информацию для проведения оплаты (сумму, валюту и статус). У платежа линейный жизненный цикл, он последовательно переходит из статуса в статус. Необходимо указать один из параметров: Если не указан ни один параметр и `confirmation.type = redirect`, то в качестве `confirmation_url` возвращается ссылка, по которой пользователь сможет самостоятельно выбрать подходящий способ оплаты. Дополнительные параметры: **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Payments\CreatePaymentRequestInterface | payment | Запрос на создание платежа | | null OR string | idempotenceKey | [Ключ идемпотентности](https://yookassa.ru/developers/using-api/basics?lang=php#idempotence) | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\AuthorizeException | | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ApiConnectionException | | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | **Returns:** \YooKassa\Request\Payments\CreatePaymentResponse|null - ##### Examples: Запрос на создание платежа: ```php try { $idempotenceKey = uniqid('', true); $response = $client->createPayment( [ 'amount' => [ 'value' => '1.00', 'currency' => 'RUB', ], 'confirmation' => [ 'type' => 'redirect', 'return_url' => 'https://merchant-site.ru/payment-notification', ], 'description' => 'Оплата заказа на сумму 1 руб', 'metadata' => [ 'orderNumber' => 1001, ], 'capture' => true, ], $idempotenceKey ); $confirmation = $response->getConfirmation(); $redirectUrl = $confirmation->getConfirmationUrl(); // Далее производим редирект на полученный URL } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public createPayout() : ?\YooKassa\Request\Payouts\CreatePayoutResponse ```php public createPayout(array|\YooKassa\Request\Payouts\CreatePayoutRequestInterface $payout, null|string $idempotenceKey = null) : ?\YooKassa\Request\Payouts\CreatePayoutResponse ``` **Summary** Создание выплаты. **Description** Запрос позволяет перечислить продавцу оплату за выполненную услугу или проданный товар в рамках Безопасной сделки. Выплату можно сделать на банковскую карту или на кошелек ЮMoney. Обязательный параметр: Необходимо указать один из параметров: Дополнительные параметры: **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Payouts\CreatePayoutRequestInterface | payout | Запрос на создание выплаты | | null OR string | idempotenceKey | [Ключ идемпотентности](https://yookassa.ru/developers/using-api/basics?lang=php#idempotence) | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности * @throws NotFoundException Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \Exception | | **Returns:** ?\YooKassa\Request\Payouts\CreatePayoutResponse - ##### Examples: Запрос на создание выплаты: ```php $request = [ 'amount' => [ 'value' => '80.00', 'currency' => 'RUB', ], 'payout_destination_data' => [ 'type' => \YooKassa\Model\Payment\PaymentMethodType::YOO_MONEY, 'accountNumber' => '4100116075156746', ], 'description' => 'Выплата по заказу №37', 'metadata' => [ 'order_id' => '37', ], 'deal' => [ 'id' => 'dl-2909e77d-0022-5000-8000-0c37205b3208', ], ]; try { $idempotenceKey = uniqid('', true); $result = $client->createPayout($request, $idempotenceKey); } catch (\Exception $e) { $result = $e; } var_dump($result); ``` #### public createPersonalData() : null|\YooKassa\Request\PersonalData\PersonalDataResponse ```php public createPersonalData(array|\YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface $request, null|string $idempotencyKey = null) : null|\YooKassa\Request\PersonalData\PersonalDataResponse ``` **Summary** Создание персональных данных. **Description** Используйте этот запрос, чтобы создать в ЮKassa [объект персональных данных](#personal_data_object). В запросе необходимо передать фамилию, имя, отчество пользователя и указать, с какой целью эти данные будут использоваться. Идентификатор созданного объекта персональных данных необходимо использовать в запросе на проведение выплаты через СБП с проверкой получателя. [Подробнее о выплатах с проверкой получателя](/developers/payouts/scenario-extensions/recipient-check) **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface | request | Запрос на создание персональных данных | | null OR string | idempotencyKey | [Ключ идемпотентности](https://yookassa.ru/developers/using-api/basics?lang=php#idempotence) | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \Exception | | **Returns:** null|\YooKassa\Request\PersonalData\PersonalDataResponse - Объект персональных данных ##### Examples: Запрос на создание персональных данных: ```php $request = [ 'type' => 'sbp_payout_recipient', 'last_name' => 'Иванов', 'first_name' => 'Иван', 'middle_name' => 'Иванович', 'metadata' => ['recipient_id' => '37'], ]; $idempotenceKey = uniqid('', true); try { $idempotenceKey = uniqid('', true); $result = $client->createPersonalData($request, $idempotenceKey); } catch (\Exception $e) { $result = $e; } var_dump($result); ``` #### public createReceipt() : ?\YooKassa\Request\Receipts\AbstractReceiptResponse ```php public createReceipt(array|\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface $receipt, null|string $idempotenceKey = null) : ?\YooKassa\Request\Receipts\AbstractReceiptResponse ``` **Summary** Отправка чека в облачную кассу. **Description** Создает объект чека — `Receipt`. Возвращает успешно созданный чек по уникальному идентификатору платежа или возврата. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface | receipt | Запрос на создание чека | | null OR string | idempotenceKey | [Ключ идемпотентности](https://yookassa.ru/developers/using-api/basics?lang=php#idempotence) | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \YooKassa\Common\Exceptions\AuthorizeException | Ошибка авторизации. Не установлен заголовок | | \Exception | | **Returns:** ?\YooKassa\Request\Receipts\AbstractReceiptResponse - ##### Examples: Запрос на создание чека: ```php try { $response = $client->createReceipt( [ 'customer' => [ 'email' => 'johndoe@yoomoney.ru', 'phone' => '79000000000', ], 'type' => 'payment', 'payment_id' => '24e89cb0-000f-5000-9000-1de77fa0d6df', 'on_behalf_of' => '123', 'send' => true, 'items' => [ [ 'description' => 'Платок Gucci', 'quantity' => '1.00', 'amount' => [ 'value' => '3000.00', 'currency' => 'RUB', ], 'vat_code' => 2, 'payment_mode' => 'full_payment', 'payment_subject' => 'commodity', ], ], 'settlements' => [ [ 'type' => 'prepayment', 'amount' => [ 'value' => '3000.00', 'currency' => 'RUB', ], ], ], 'tax_system_code' => 1, ], uniqid('', true) ); echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public createRefund() : \YooKassa\Request\Refunds\CreateRefundResponse|null ```php public createRefund(array|\YooKassa\Request\Refunds\CreateRefundRequestInterface $request, null|string $idempotencyKey = null) : \YooKassa\Request\Refunds\CreateRefundResponse|null ``` **Summary** Проведение возврата платежа. **Description** Создает объект возврата — `Refund`. Возвращает успешно завершенный платеж по уникальному идентификатору этого платежа. Создание возврата возможно только для платежей в статусе `succeeded`. Комиссии за проведение возврата нет. Комиссия, которую ЮKassa берёт за проведение исходного платежа, не возвращается. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Refunds\CreateRefundRequestInterface | request | Запрос на создание возврата | | null OR string | idempotencyKey | [Ключ идемпотентности](https://yookassa.ru/developers/using-api/basics?lang=php#idempotence) | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiConnectionException | | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\AuthorizeException | | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \Exception | | **Returns:** \YooKassa\Request\Refunds\CreateRefundResponse|null - ##### Examples: Запрос на создание возврата: ```php try { $response = $client->createRefund( [ 'payment_id' => '24e89cb0-000f-5000-9000-1de77fa0d6df', 'amount' => [ 'value' => '1000.00', 'currency' => 'RUB', ], 'sources' => [ [ 'account_id' => '456', 'amount' => [ 'value' => '1000.00', 'currency' => 'RUB', ], ], ], ], uniqid('', true) ); echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public createSelfEmployed() : ?\YooKassa\Request\SelfEmployed\SelfEmployedResponse ```php public createSelfEmployed(array|\YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface $selfEmployed, null|string $idempotenceKey = null) : ?\YooKassa\Request\SelfEmployed\SelfEmployedResponse ``` **Summary** Создание самозанятого. **Description** Используйте этот запрос, чтобы создать в ЮKassa [объект самозанятого](https://yookassa.ru/developers/api?codeLang=bash#self_employed_object). В запросе необходимо передать ИНН или телефон самозанятого для идентификации в сервисе Мой налог, сценарий подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков и описание самозанятого. Идентификатор созданного объекта самозанятого необходимо использовать в запросе на проведение выплаты. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\SelfEmployed\SelfEmployedRequestInterface | selfEmployed | Запрос на создание самозанятого | | null OR string | idempotenceKey | [Ключ идемпотентности](https://yookassa.ru/developers/using-api/basics?lang=php#idempotence) | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | **Returns:** ?\YooKassa\Request\SelfEmployed\SelfEmployedResponse - ##### Examples: Запрос на создание самозанятого: ```php $request = [ 'itn' => '123456789012', 'phone' => '79001002030', 'confirmation' => ['type' => 'redirect'], ]; $idempotenceKey = uniqid('', true); try { $idempotenceKey = uniqid('', true); $result = $client->createSelfEmployed($request, $idempotenceKey); } catch (\Exception $e) { $result = $e; } var_dump($result); ``` #### public getApiClient() : \YooKassa\Client\ApiClientInterface ```php public getApiClient() : \YooKassa\Client\ApiClientInterface ``` **Summary** Возвращает CURL клиента для работы с API. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) **Returns:** \YooKassa\Client\ApiClientInterface - #### public getConfig() : array ```php public getConfig() : array ``` **Summary** Возвращает настройки клиента. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) **Returns:** array - #### public getDealInfo() : ?\YooKassa\Model\Deal\DealInterface ```php public getDealInfo(string $dealId) : ?\YooKassa\Model\Deal\DealInterface ``` **Summary** Получить информацию о сделке. **Description** Запрос позволяет получить информацию о текущем состоянии сделки по её уникальному идентификатору. Выдает объект чека {@link} в актуальном статусе. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | dealId | Идентификатор сделки | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | **Returns:** ?\YooKassa\Model\Deal\DealInterface - ##### Examples: Получить информацию о сделке: ```php try { $response = $client->getDealInfo('dl-2909e77d-1022-5003-8004-0c37205b3208'); echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public getDeals() : ?\YooKassa\Request\Deals\DealsResponse ```php public getDeals(null|array|\YooKassa\Request\Deals\DealsRequestInterface $filter = null) : ?\YooKassa\Request\Deals\DealsResponse ``` **Summary** Получить список сделок магазина. **Description** Запрос позволяет получить список сделок, отфильтрованный по заданным критериям. В ответ на запрос вернется список сделок с учетом переданных параметров. В списке будет информация о сделках, созданных за последние 3 года. Список будет отсортирован по времени создания сделок в порядке убывания. Если результатов больше, чем задано в `limit`, список будет выводиться фрагментами. В этом случае в ответе на запрос вернется фрагмент списка и параметр `next_cursor` с указателем на следующий фрагмент. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Deals\DealsRequestInterface | filter | Параметры фильтрации | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \Exception | | **Returns:** ?\YooKassa\Request\Deals\DealsResponse - ##### Examples: Получить список сделок с фильтрацией: ```php $cursor = null; $params = [ 'limit' => 30, 'status' => \YooKassa\Model\Deal\DealStatus::OPENED, 'full_text_search' => 'DEAL', 'created_at_gte' => '2023-10-01T00:00:00.000Z', 'created_at_lt' => '2023-11-01T23:59:59.999Z', ]; try { do { $params['cursor'] = $cursor; $deals = $client->getDeals($params); foreach ($deals->getItems() as $deal) { $res = [ $deal->getCreatedAt()->format('Y-m-d H:i:s'), $deal->getBalance()->getValue() . ' ' . $deal->getBalance()->getCurrency(), $deal->getPayoutBalance()->getValue() . ' ' . $deal->getBalance()->getCurrency(), $deal->getStatus(), $deal->getId(), ]; echo implode(' - ', $res) . "\n"; } } while ($cursor = $deals->getNextCursor()); } catch (\Exception $e) { $response = $e; var_dump($response); } ``` #### public getPaymentInfo() : null|\YooKassa\Model\Payment\PaymentInterface ```php public getPaymentInfo(string $paymentId) : null|\YooKassa\Model\Payment\PaymentInterface ``` **Summary** Получить информацию о платеже. **Description** Запрос позволяет получить информацию о текущем состоянии платежа по его уникальному идентификатору. Выдает объект платежа {@link} в актуальном статусе. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | paymentId | Идентификатор платежа | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API. | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов. | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \Exception | | **Returns:** null|\YooKassa\Model\Payment\PaymentInterface - Объект платежа ##### Examples: Получить информацию о платеже: ```php try { $response = $client->getPaymentInfo('24e89cb0-000f-5000-9000-1de77fa0d6df'); echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public getPayments() : ?\YooKassa\Request\Payments\PaymentsResponse ```php public getPayments(array|\YooKassa\Request\Payments\PaymentsRequestInterface|null $filter = null) : ?\YooKassa\Request\Payments\PaymentsResponse ``` **Summary** Получить список платежей магазина. **Description** Запрос позволяет получить список платежей, отфильтрованный по заданным критериям. В ответ на запрос вернется список платежей с учетом переданных параметров. В списке будет информация о платежах, созданных за последние 3 года. Список будет отсортирован по времени создания платежей в порядке убывания. Если результатов больше, чем задано в `limit`, список будет выводиться фрагментами. В этом случае в ответе на запрос вернется фрагмент списка и параметр `next_cursor` с указателем на следующий фрагмент. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Payments\PaymentsRequestInterface OR null | filter | Параметры фильтрации | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \Exception | | **Returns:** ?\YooKassa\Request\Payments\PaymentsResponse - ##### Examples: Получить список платежей магазина с фильтрацией: ```php $cursor = null; $params = [ 'limit' => 30, 'status' => \YooKassa\Model\Payment\PaymentStatus::CANCELED, 'payment_method' => \YooKassa\Model\Payment\PaymentMethodType::BANK_CARD, 'created_at_gte' => '2023-01-01T00:00:00.000Z', 'created_at_lt' => '2023-03-30T23:59:59.999Z', ]; try { do { $params['cursor'] = $cursor; $payments = $client->getPayments($params); foreach ($payments->getItems() as $payment) { echo $payment->getCreatedAt()->format('Y-m-d H:i:s') . ' - ' . $payment->getStatus() . ' - ' . $payment->getId() . "\n"; } } while ($cursor = $payments->getNextCursor()); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public getPayoutInfo() : null|\YooKassa\Model\Payout\PayoutInterface ```php public getPayoutInfo(string $payoutId) : null|\YooKassa\Model\Payout\PayoutInterface ``` **Summary** Получить информацию о выплате. **Description** Запрос позволяет получить информацию о текущем состоянии выплаты по ее уникальному идентификатору. Выдает объект выплаты {@link} в актуальном статусе. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | payoutId | Идентификатор выплаты | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | **Returns:** null|\YooKassa\Model\Payout\PayoutInterface - Объект выплаты ##### Examples: Получить информацию о выплате: ```php $payoutId = 'po-285c0ab7-0003-5000-9000-0e1166498fda'; try { $response = $client->getPayoutInfo($payoutId); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public getPersonalDataInfo() : null|\YooKassa\Model\PersonalData\PersonalDataInterface ```php public getPersonalDataInfo(string $personalDataId) : null|\YooKassa\Model\PersonalData\PersonalDataInterface ``` **Summary** Получить информацию о персональных данных. **Description** Запрос позволяет получить информацию о текущем состоянии персональных данных по их уникальному идентификатору. Выдает объект платежа {@link} в актуальном статусе. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | personalDataId | Идентификатор персональных данных | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | **Returns:** null|\YooKassa\Model\PersonalData\PersonalDataInterface - Объект персональных данных ##### Examples: Получить информацию о персональных данных: ```php $payoutId = 'pd-285c0ab7-0003-5000-9000-0e1166498fda'; try { $response = $client->getPersonalDataInfo($payoutId); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public getReceiptInfo() : ?\YooKassa\Request\Receipts\ReceiptResponseInterface ```php public getReceiptInfo(string $receiptId) : ?\YooKassa\Request\Receipts\ReceiptResponseInterface ``` **Summary** Получить информацию о чеке. **Description** Запрос позволяет получить информацию о текущем состоянии чека по его уникальному идентификатору. Выдает объект чека {@link} в актуальном статусе. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | receiptId | Идентификатор чека | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | **Returns:** ?\YooKassa\Request\Receipts\ReceiptResponseInterface - ##### Examples: Получить информацию о чеке: ```php try { $response = $client->getPaymentInfo('24e89cb0-000f-5000-9000-1de77fa0d6df'); echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public getReceipts() : \YooKassa\Request\Receipts\ReceiptsResponse ```php public getReceipts(null|array|\YooKassa\Request\Receipts\ReceiptsRequestInterface $filter = null) : \YooKassa\Request\Receipts\ReceiptsResponse ``` **Summary** Получить список чеков магазина. **Description** Запрос позволяет получить список чеков, отфильтрованный по заданным критериям. Можно запросить чеки по конкретному платежу, чеки по конкретному возврату или все чеки магазина. В ответ на запрос вернется список чеков с учетом переданных параметров. В списке будет информация о чеках, созданных за последние 3 года. Список будет отсортирован по времени создания чеков в порядке убывания. Если результатов больше, чем задано в `limit`, список будет выводиться фрагментами. В этом случае в ответе на запрос вернется фрагмент списка и параметр `next_cursor` с указателем на следующий фрагмент. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Receipts\ReceiptsRequestInterface | filter | Параметры фильтрации | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \Exception | | **Returns:** \YooKassa\Request\Receipts\ReceiptsResponse - ##### Examples: Получить список чеков магазина с фильтрацией: ```php $cursor = null; $params = [ 'limit' => 30, 'status' => \YooKassa\Model\Payment\PaymentStatus::CANCELED, 'payment_method' => \YooKassa\Model\Payment\PaymentMethodType::BANK_CARD, 'created_at_gte' => '2023-01-01T00:00:00.000Z', 'created_at_lt' => '2023-03-30T23:59:59.999Z', ]; try { do { $params['cursor'] = $cursor; $payments = $client->getPayments($params); foreach ($payments->getItems() as $payment) { echo $payment->getCreatedAt()->format('Y-m-d H:i:s') . ' - ' . $payment->getStatus() . ' - ' . $payment->getId() . "\n"; } } while ($cursor = $payments->getNextCursor()); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public getRefundInfo() : ?\YooKassa\Request\Refunds\RefundResponse ```php public getRefundInfo(string $refundId) : ?\YooKassa\Request\Refunds\RefundResponse ``` **Summary** Получить информацию о возврате. **Description** Запрос позволяет получить информацию о текущем состоянии возврата по его уникальному идентификатору. В ответ на запрос придет объект возврата {@link} в актуальном статусе. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | refundId | Идентификатор возврата | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \Exception | | **Returns:** ?\YooKassa\Request\Refunds\RefundResponse - ##### Examples: Получить информацию о возврате: ```php try { $response = $client->getReceiptInfo('ra-27ed1660-0001-0050-7a5e-10f80e0f0f29'); echo $response->getStatus(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public getRefunds() : ?\YooKassa\Request\Refunds\RefundsResponse ```php public getRefunds(null|array|\YooKassa\Request\Refunds\RefundsRequestInterface $filter = null) : ?\YooKassa\Request\Refunds\RefundsResponse ``` **Summary** Получить список возвратов платежей. **Description** Запрос позволяет получить список возвратов, отфильтрованный по заданным критериям. В ответ на запрос вернется список возвратов с учетом переданных параметров. В списке будет информация о возвратах, созданных за последние 3 года. Список будет отсортирован по времени создания возвратов в порядке убывания. Если результатов больше, чем задано в `limit`, список будет выводиться фрагментами. В этом случае в ответе на запрос вернется фрагмент списка и параметр `next_cursor` с указателем на следующий фрагмент. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Refunds\RefundsRequestInterface | filter | Параметры фильтрации | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности. | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов. | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \Exception | | **Returns:** ?\YooKassa\Request\Refunds\RefundsResponse - ##### Examples: Получить список возвратов платежей магазина с фильтрацией: ```php $cursor = null; $params = [ 'limit' => 30, 'status' => \YooKassa\Model\Refund\RefundStatus::SUCCEEDED, 'payment_id' => '1da5c87d-0984-50e8-a7f3-8de646dd9ec9', 'created_at_gte' => '2023-01-01T00:00:00.000Z', 'created_at_lt' => '2023-03-30T23:59:59.999Z', ]; try { do { $params['cursor'] = $cursor; $refunds = $client->getRefunds($params); foreach ($refunds->getItems() as $refund) { echo $refund->getCreatedAt()->format('Y-m-d H:i:s') . ' - ' . $refund->getStatus() . ' - ' . $refund->getId() . "\n"; } } while ($cursor = $refunds->getNextCursor()); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public getSbpBanks() : ?\YooKassa\Request\Payouts\SbpBanksResponse ```php public getSbpBanks() : ?\YooKassa\Request\Payouts\SbpBanksResponse ``` **Summary** Получить список участников СБП **Description** С помощью этого запроса вы можете получить актуальный список всех участников СБП. Список нужно вывести получателю выплаты, идентификатор выбранного участника СБП необходимо использовать в запросе на создание выплаты. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | **Returns:** ?\YooKassa\Request\Payouts\SbpBanksResponse - ##### Examples: Получить список участников СБП: ```php try { $response = $client->getSbpBanks(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public getSelfEmployedInfo() : ?\YooKassa\Model\SelfEmployed\SelfEmployedInterface ```php public getSelfEmployedInfo(string $selfEmployedId) : ?\YooKassa\Model\SelfEmployed\SelfEmployedInterface ``` **Summary** Получить информацию о самозанятом **Description** С помощью этого запроса вы можете получить информацию о текущем статусе самозанятого по его уникальному идентификатору. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | selfEmployedId | Идентификатор самозанятого | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | **Returns:** ?\YooKassa\Model\SelfEmployed\SelfEmployedInterface - ##### Examples: Получить информацию о самозанятом: ```php $payoutId = 'se-285c0ab7-0003-5000-9000-0e1166498fda'; try { $response = $client->getSelfEmployedInfo($payoutId); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public getWebhooks() : ?\YooKassa\Request\Webhook\WebhookListResponse ```php public getWebhooks() : ?\YooKassa\Request\Webhook\WebhookListResponse ``` **Summary** Список созданных Webhook. **Description** Запрос позволяет узнать, какие webhook есть для переданного OAuth-токена. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API. | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \YooKassa\Common\Exceptions\AuthorizeException | Ошибка авторизации. Не установлен заголовок | **Returns:** ?\YooKassa\Request\Webhook\WebhookListResponse - ##### Examples: Список созданных Webhook: ```php // Работа с Webhook // В данном примере мы устанавливаем вебхуки для succeeded и canceled уведомлений. // А так же проверяем, не установлены ли уже вебхуки. И если установлены на неверный адрес, удаляем. $client->setAuthToken('token_XXXXXXX'); try { $webHookUrl = 'https://merchant-site.ru/payment-notification'; $needWebHookList = [ \YooKassa\Model\Notification\NotificationEventType::PAYMENT_SUCCEEDED, \YooKassa\Model\Notification\NotificationEventType::PAYMENT_CANCELED, ]; $currentWebHookList = $client->getWebhooks()->getItems(); foreach ($needWebHookList as $event) { $hookIsSet = false; foreach ($currentWebHookList as $webHook) { if ($webHook->getEvent() !== $event) { continue; } if ($webHook->getUrl() !== $webHookUrl) { $client->removeWebhook($webHook->getId()); } else { $hookIsSet = true; } break; } if (!$hookIsSet) { $client->addWebhook(['event' => $event, 'url' => $webHookUrl]); } } $response = 'SUCCESS'; } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public isNotificationIPTrusted() : bool ```php public isNotificationIPTrusted(string $ip) : bool ``` **Summary** Метод проверяет, находится ли IP адрес среди IP адресов Юkassa, с которых отправляются уведомления. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | ip | IPv4 или IPv6 адрес webhook уведомления | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | Выбрасывается, если будет передан IP адрес неверного формата | **Returns:** bool - #### public me() : null|array ```php public me(null|array|int|string $filter = null) : null|array ``` **Summary** Информация о магазине. **Description** Запрос позволяет получить информацию о магазине для переданного OAuth-токена. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR int OR string | filter | Параметры поиска. В настоящее время доступен только `on_behalf_of` | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов. | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \YooKassa\Common\Exceptions\AuthorizeException | Ошибка авторизации. Не установлен заголовок | **Returns:** null|array - Массив с информацией о магазине ##### Examples: Информация о магазине: ```php try { $response = $client->me(); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public removeWebhook() : ?\YooKassa\Model\Webhook\Webhook ```php public removeWebhook(string $webhookId, null|string $idempotencyKey = null) : ?\YooKassa\Model\Webhook\Webhook ``` **Summary** Удаление Webhook. **Description** Запрос позволяет отписаться от уведомлений о событии для переданного OAuth-токена. Чтобы удалить webhook, вам нужно передать в запросе его идентификатор. **Details:** * Inherited From: [\YooKassa\Client](../classes/YooKassa-Client.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | webhookId | Идентификатор Webhook | | null OR string | idempotencyKey | [Ключ идемпотентности](https://yookassa.ru/developers/using-api/basics?lang=php#idempotence) | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | Неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API | | \YooKassa\Common\Exceptions\ForbiddenException | Секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности | | \YooKassa\Common\Exceptions\NotFoundException | Ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | Запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов | | \YooKassa\Common\Exceptions\UnauthorizedException | Неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | Требуемое PHP расширение не установлено | | \Exception | | **Returns:** ?\YooKassa\Model\Webhook\Webhook - ##### Examples: Удаление Webhook: ```php // Работа с Webhook // В данном примере мы устанавливаем вебхуки для succeeded и canceled уведомлений. // А так же проверяем, не установлены ли уже вебхуки. И если установлены на неверный адрес, удаляем. $client->setAuthToken('token_XXXXXXX'); try { $webHookUrl = 'https://merchant-site.ru/payment-notification'; $needWebHookList = [ \YooKassa\Model\Notification\NotificationEventType::PAYMENT_SUCCEEDED, \YooKassa\Model\Notification\NotificationEventType::PAYMENT_CANCELED, ]; $currentWebHookList = $client->getWebhooks()->getItems(); foreach ($needWebHookList as $event) { $hookIsSet = false; foreach ($currentWebHookList as $webHook) { if ($webHook->getEvent() !== $event) { continue; } if ($webHook->getUrl() !== $webHookUrl) { $client->removeWebhook($webHook->getId()); } else { $hookIsSet = true; } break; } if (!$hookIsSet) { $client->addWebhook(['event' => $event, 'url' => $webHookUrl]); } } $response = 'SUCCESS'; } catch (\Exception $e) { $response = $e; } var_dump($response); ``` #### public setApiClient() : $this ```php public setApiClient(\YooKassa\Client\ApiClientInterface $apiClient) : $this ``` **Summary** Устанавливает CURL клиента для работы с API. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Client\ApiClientInterface | apiClient | | **Returns:** $this - #### public setAuth() : $this ```php public setAuth(string|int $login, string $password) : $this ``` **Summary** Устанавливает авторизацию по логин/паролю. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR int | login | | | string | password | | **Returns:** $this - ##### Examples: Пример авторизации: ```php $client->setAuth('xxxxxx', 'test_XXXXXXX'); ``` #### public setAuthToken() : $this ```php public setAuthToken(string $token) : $this ``` **Summary** Устанавливает авторизацию по Oauth-токену. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | token | | **Returns:** $this - ##### Examples: Пример авторизации: ```php $client->setAuthToken('token_XXXXXXX'); ``` #### public setConfig() : void ```php public setConfig(array $config) : void ``` **Summary** Устанавливает настройки клиента. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | config | | **Returns:** void - #### public setLogger() : self ```php public setLogger(null|callable|\Psr\Log\LoggerInterface|object $value) : self ``` **Summary** Устанавливает логгер приложения. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR callable OR \Psr\Log\LoggerInterface OR object | value | Инстанс логгера | **Returns:** self - #### public setMaxRequestAttempts() : $this ```php public setMaxRequestAttempts(int $attempts = self::DEFAULT_ATTEMPTS_COUNT) : $this ``` **Summary** Установка значения количества попыток повторных запросов при статусе 202. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | attempts | | **Returns:** $this - #### public setRetryTimeout() : $this ```php public setRetryTimeout(int $timeout = self::DEFAULT_DELAY) : $this ``` **Summary** Установка значения задержки между повторными запросами. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | timeout | | **Returns:** $this - #### protected decodeData() : array ```php protected decodeData(\YooKassa\Common\ResponseObject $response) : array ``` **Summary** Декодирует JSON строку в массив данных. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ResponseObject | response | Объект ответа на запрос к API | ##### Throws: | Type | Description | | ---- | ----------- | | \JsonException | | **Returns:** array - Массив данных #### protected delay() : void ```php protected delay(\YooKassa\Common\ResponseObject $response) : void ``` **Summary** Задержка между повторными запросами. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ResponseObject | response | Объект ответа на запрос к API | ##### Throws: | Type | Description | | ---- | ----------- | | \JsonException | | **Returns:** void - #### protected encodeData() : string ```php protected encodeData(array $serializedData) : string ``` **Summary** Кодирует массив данных в JSON строку. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | serializedData | Массив данных для кодировки | ##### Throws: | Type | Description | | ---- | ----------- | | \JsonException | Выбрасывается, если не удалось конвертировать данные в строку JSON | **Returns:** string - Строка JSON #### protected execute() : mixed|\YooKassa\Common\ResponseObject ```php protected execute(string $path, string $method, array $queryParams, null|string $httpBody = null, array $headers = []) : mixed|\YooKassa\Common\ResponseObject ``` **Summary** Выполнение запроса и обработка 202 статуса. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | path | URL запроса | | string | method | HTTP метод | | array | queryParams | Массив GET параметров запроса | | null OR string | httpBody | Тело запроса | | array | headers | Массив заголовков запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | | | \YooKassa\Common\Exceptions\AuthorizeException | | | \YooKassa\Common\Exceptions\ApiConnectionException | | | \YooKassa\Common\Exceptions\ExtensionNotFoundException | | **Returns:** mixed|\YooKassa\Common\ResponseObject - #### protected handleError() : void ```php protected handleError(\YooKassa\Common\ResponseObject $response) : void ``` **Summary** Выбрасывает исключение по коду ошибки. **Details:** * Inherited From: [\YooKassa\Client\BaseClient](../classes/YooKassa-Client-BaseClient.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ResponseObject | response | | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\ApiException | неожиданный код ошибки | | \YooKassa\Common\Exceptions\BadApiRequestException | Неправильный запрос. Чаще всего этот статус выдается из-за нарушения правил взаимодействия с API. | | \YooKassa\Common\Exceptions\ForbiddenException | секретный ключ или OAuth-токен верный, но не хватает прав для совершения операции | | \YooKassa\Common\Exceptions\InternalServerError | Технические неполадки на стороне ЮKassa. Результат обработки запроса неизвестен. Повторите запрос позднее с тем же ключом идемпотентности. | | \YooKassa\Common\Exceptions\NotFoundException | ресурс не найден | | \YooKassa\Common\Exceptions\ResponseProcessingException | запрос был принят на обработку, но она не завершена | | \YooKassa\Common\Exceptions\TooManyRequestsException | Превышен лимит запросов в единицу времени. Попробуйте снизить интенсивность запросов. | | \YooKassa\Common\Exceptions\UnauthorizedException | неверное имя пользователя или пароль или невалидный OAuth-токен при аутентификации | | \YooKassa\Common\Exceptions\AuthorizeException | Ошибка авторизации. Не установлен заголовок. | **Returns:** void - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Deals-DealsResponse.md000064400000044600150364342670021640 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Deals\DealsResponse ### Namespace: [\YooKassa\Request\Deals](../namespaces/yookassa-request-deals.md) --- **Summary:** Класс, представляющий модель DealsResponse. **Description:** Класс объекта ответа от API со списком сделок магазина. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$items](../classes/YooKassa-Request-Deals-DealsResponse.md#property_items) | | Массив сделок | | public | [$nextCursor](../classes/YooKassa-Request-AbstractListResponse.md#property_nextCursor) | | Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. | | public | [$type](../classes/YooKassa-Request-AbstractListResponse.md#property_type) | | Формат выдачи результатов запроса. Возможное значение: `list` (список). | | protected | [$_items](../classes/YooKassa-Request-Deals-DealsResponse.md#property__items) | | | | protected | [$_next_cursor](../classes/YooKassa-Request-AbstractListResponse.md#property__next_cursor) | | Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. | | protected | [$_type](../classes/YooKassa-Request-AbstractListResponse.md#property__type) | | Формат выдачи результатов запроса. Возможное значение: `list` (список). | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getItems()](../classes/YooKassa-Request-Deals-DealsResponse.md#method_getItems) | | Возвращает массив сделок. | | public | [getNextCursor()](../classes/YooKassa-Request-AbstractListResponse.md#method_getNextCursor) | | Возвращает токен следующей страницы, если он задан, или null. | | public | [getType()](../classes/YooKassa-Request-AbstractListResponse.md#method_getType) | | Возвращает формат выдачи результатов запроса. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasNextCursor()](../classes/YooKassa-Request-AbstractListResponse.md#method_hasNextCursor) | | Проверяет, имеется ли в ответе токен следующей страницы. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Deals/DealsResponse.php](../../lib/Request/Deals/DealsResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) * \YooKassa\Request\Deals\DealsResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $items : \YooKassa\Model\Deal\SafeDeal[]|\YooKassa\Common\ListObjectInterface|null --- ***Description*** Массив сделок **Type:** ListObjectInterface|null **Details:** #### public $nextCursor : string --- ***Description*** Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### public $type : string --- ***Description*** Формат выдачи результатов запроса. Возможное значение: `list` (список). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### protected $_items : ?\YooKassa\Common\ListObject --- **Type:** ListObject Массив сделок **Details:** #### protected $_next_cursor : ?string --- **Summary** Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### protected $_type : string --- **Summary** Формат выдачи результатов запроса. Возможное значение: `list` (список). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getItems() : \YooKassa\Model\Deal\SafeDeal[]|\YooKassa\Common\ListObjectInterface ```php public getItems() : \YooKassa\Model\Deal\SafeDeal[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает массив сделок. **Details:** * Inherited From: [\YooKassa\Request\Deals\DealsResponse](../classes/YooKassa-Request-Deals-DealsResponse.md) **Returns:** \YooKassa\Model\Deal\SafeDeal[]|\YooKassa\Common\ListObjectInterface - Список сделок #### public getNextCursor() : null|string ```php public getNextCursor() : null|string ``` **Summary** Возвращает токен следующей страницы, если он задан, или null. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** null|string - Токен следующей страницы #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает формат выдачи результатов запроса. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasNextCursor() : bool ```php public hasNextCursor() : bool ``` **Summary** Проверяет, имеется ли в ответе токен следующей страницы. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** bool - True если токен следующей страницы есть, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-SimpleReceiptResponse.md000064400000177603150364342670024115 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Receipts\SimpleReceiptResponse ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Класс описывающий чек, не привязанный ни к платежу ни к возврату. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [LENGTH_RECEIPT_ID](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#constant_LENGTH_RECEIPT_ID) | | Длина идентификатора чека | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$fiscal_attribute](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_attribute) | | Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. | | public | [$fiscal_document_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_document_number) | | Номер фискального документа. | | public | [$fiscal_provider_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_provider_id) | | Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. | | public | [$fiscal_storage_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscal_storage_number) | | Номер фискального накопителя в кассовом аппарате. | | public | [$fiscalAttribute](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalAttribute) | | Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. | | public | [$fiscalDocumentNumber](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalDocumentNumber) | | Номер фискального документа. | | public | [$fiscalProviderId](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalProviderId) | | Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. | | public | [$fiscalStorageNumber](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_fiscalStorageNumber) | | Номер фискального накопителя в кассовом аппарате. | | public | [$id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_id) | | Идентификатор чека в ЮKassa. | | public | [$items](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_items) | | Список товаров в заказе. | | public | [$object_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_object_id) | | Идентификатор объекта чека. | | public | [$objectId](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_objectId) | | Идентификатор объекта чека. | | public | [$on_behalf_of](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_on_behalf_of) | | Идентификатор магазина. | | public | [$onBehalfOf](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_onBehalfOf) | | Идентификатор магазина. | | public | [$receipt_industry_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receipt_industry_details) | | Отраслевой реквизит чека. | | public | [$receipt_operational_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receipt_operational_details) | | Операционный реквизит чека. | | public | [$receiptIndustryDetails](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receiptIndustryDetails) | | Отраслевой реквизит чека. | | public | [$receiptOperationalDetails](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_receiptOperationalDetails) | | Операционный реквизит чека. | | public | [$registered_at](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_registered_at) | | Дата и время формирования чека в фискальном накопителе. | | public | [$registeredAt](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_registeredAt) | | Дата и время формирования чека в фискальном накопителе. | | public | [$settlements](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_settlements) | | Перечень совершенных расчетов. | | public | [$status](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_status) | | Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled"). | | public | [$tax_system_code](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_tax_system_code) | | Код системы налогообложения. Число 1-6. | | public | [$taxSystemCode](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_taxSystemCode) | | Код системы налогообложения. Число 1-6. | | public | [$type](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property_type) | | Тип чека в онлайн-кассе: приход "payment" или возврат "refund". | | protected | [$_fiscal_attribute](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_attribute) | | | | protected | [$_fiscal_document_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_document_number) | | | | protected | [$_fiscal_provider_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_provider_id) | | | | protected | [$_fiscal_storage_number](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__fiscal_storage_number) | | | | protected | [$_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__id) | | | | protected | [$_items](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__items) | | | | protected | [$_object_id](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__object_id) | | | | protected | [$_on_behalf_of](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__on_behalf_of) | | | | protected | [$_receipt_industry_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__receipt_industry_details) | | | | protected | [$_receipt_operational_details](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__receipt_operational_details) | | | | protected | [$_registered_at](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__registered_at) | | | | protected | [$_settlements](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__settlements) | | | | protected | [$_status](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__status) | | | | protected | [$_tax_system_code](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__tax_system_code) | | | | protected | [$_type](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [addItem()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_addItem) | | Добавляет товар в чек. | | public | [addSettlement()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_addSettlement) | | Добавляет оплату в массив. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getFiscalAttribute()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalAttribute) | | Возвращает фискальный признак чека. | | public | [getFiscalDocumentNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalDocumentNumber) | | Возвращает номер фискального документа. | | public | [getFiscalProviderId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalProviderId) | | Возвращает идентификатор чека в онлайн-кассе. | | public | [getFiscalStorageNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getFiscalStorageNumber) | | Возвращает номер фискального накопителя в кассовом аппарате. | | public | [getId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getId) | | Возвращает идентификатор чека в ЮKassa. | | public | [getItems()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getItems) | | Возвращает список товаров в заказ. | | public | [getObjectId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getObjectId) | | Возвращает идентификатор платежа или возврата, для которого был сформирован чек. | | public | [getOnBehalfOf()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getOnBehalfOf) | | Возвращает идентификатор магазин | | public | [getReceiptIndustryDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getReceiptIndustryDetails) | | Возвращает отраслевой реквизит чека. | | public | [getReceiptOperationalDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getReceiptOperationalDetails) | | Возвращает операционный реквизит чека. | | public | [getRegisteredAt()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getRegisteredAt) | | Возвращает дату и время формирования чека в фискальном накопителе. | | public | [getSettlements()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getSettlements) | | Возвращает Массив оплат, обеспечивающих выдачу товара. | | public | [getStatus()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getStatus) | | Возвращает статус доставки данных для чека в онлайн-кассу. | | public | [getTaxSystemCode()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getTaxSystemCode) | | Возвращает код системы налогообложения. | | public | [getType()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_getType) | | Возвращает тип чека в онлайн-кассе. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [notEmpty()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_notEmpty) | | Проверяет есть ли в чеке хотя бы одна позиция. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setFiscalAttribute()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalAttribute) | | Устанавливает фискальный признак чека. | | public | [setFiscalDocumentNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalDocumentNumber) | | Устанавливает номер фискального документа | | public | [setFiscalProviderId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalProviderId) | | Устанавливает идентификатор чека в онлайн-кассе. | | public | [setFiscalStorageNumber()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setFiscalStorageNumber) | | Устанавливает номер фискального накопителя в кассовом аппарате. | | public | [setId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setId) | | Устанавливает идентификатор чека. | | public | [setItems()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setItems) | | Устанавливает список позиций в чеке. | | public | [setObjectId()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setObjectId) | | Устанавливает идентификатор платежа или возврата, для которого был сформирован чек. | | public | [setOnBehalfOf()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setOnBehalfOf) | | Возвращает идентификатор магазина, от имени которого нужно отправить чек. | | public | [setReceiptIndustryDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setReceiptIndustryDetails) | | Устанавливает отраслевой реквизит чека. | | public | [setReceiptOperationalDetails()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setReceiptOperationalDetails) | | Устанавливает операционный реквизит чека. | | public | [setRegisteredAt()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setRegisteredAt) | | Устанавливает дату и время формирования чека в фискальном накопителе. | | public | [setSettlements()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setSettlements) | | Устанавливает массив оплат, обеспечивающих выдачу товара. | | public | [setSpecificProperties()](../classes/YooKassa-Request-Receipts-SimpleReceiptResponse.md#method_setSpecificProperties) | | Установка свойств, присущих конкретному объекту. | | public | [setStatus()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setStatus) | | Устанавливает состояние регистрации фискального чека. | | public | [setTaxSystemCode()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setTaxSystemCode) | | Устанавливает код системы налогообложения. | | public | [setType()](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md#method_setType) | | Устанавливает типа чека. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Receipts/SimpleReceiptResponse.php](../../lib/Request/Receipts/SimpleReceiptResponse.php) * Package: Default * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) * \YooKassa\Request\Receipts\SimpleReceiptResponse --- ## Constants ###### LENGTH_RECEIPT_ID Inherited from [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) Длина идентификатора чека ```php LENGTH_RECEIPT_ID = 39 ``` --- ## Properties #### public $fiscal_attribute : string --- ***Description*** Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscal_document_number : string --- ***Description*** Номер фискального документа. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscal_provider_id : string --- ***Description*** Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscal_storage_number : string --- ***Description*** Номер фискального накопителя в кассовом аппарате. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscalAttribute : string --- ***Description*** Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscalDocumentNumber : string --- ***Description*** Номер фискального документа. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscalProviderId : string --- ***Description*** Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $fiscalStorageNumber : string --- ***Description*** Номер фискального накопителя в кассовом аппарате. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $id : string --- ***Description*** Идентификатор чека в ЮKassa. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $items : \YooKassa\Common\ListObjectInterface|\YooKassa\Request\Receipts\ReceiptResponseItemInterface[] --- ***Description*** Список товаров в заказе. **Type:** ReceiptResponseItemInterface[] **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $object_id : string --- ***Description*** Идентификатор объекта чека. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $objectId : string --- ***Description*** Идентификатор объекта чека. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $on_behalf_of : string --- ***Description*** Идентификатор магазина. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $onBehalfOf : string --- ***Description*** Идентификатор магазина. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $receipt_industry_details : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\IndustryDetails[] --- ***Description*** Отраслевой реквизит чека. **Type:** IndustryDetails[] **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $receipt_operational_details : \YooKassa\Model\Receipt\OperationalDetails --- ***Description*** Операционный реквизит чека. **Type:** OperationalDetails **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $receiptIndustryDetails : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\IndustryDetails[] --- ***Description*** Отраслевой реквизит чека. **Type:** IndustryDetails[] **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $receiptOperationalDetails : \YooKassa\Model\Receipt\OperationalDetails --- ***Description*** Операционный реквизит чека. **Type:** OperationalDetails **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $registered_at : \DateTime --- ***Description*** Дата и время формирования чека в фискальном накопителе. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $registeredAt : \DateTime --- ***Description*** Дата и время формирования чека в фискальном накопителе. **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $settlements : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\SettlementInterface[] --- ***Description*** Перечень совершенных расчетов. **Type:** SettlementInterface[] **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $status : string --- ***Description*** Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled"). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $tax_system_code : int --- ***Description*** Код системы налогообложения. Число 1-6. **Type:** int **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $taxSystemCode : int --- ***Description*** Код системы налогообложения. Число 1-6. **Type:** int **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### public $type : string --- ***Description*** Тип чека в онлайн-кассе: приход "payment" или возврат "refund". **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_fiscal_attribute : ?string --- **Type:** ?string Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_fiscal_document_number : ?string --- **Type:** ?string Номер фискального документа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_fiscal_provider_id : ?string --- **Type:** ?string Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_fiscal_storage_number : ?string --- **Type:** ?string Номер фискального накопителя в кассовом аппарате. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_id : ?string --- **Type:** ?string Идентификатор чека в ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_items : ?\YooKassa\Common\ListObject --- **Type:** ListObject Список товаров в заказе **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_object_id : ?string --- **Type:** ?string Идентификатор объекта чека **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_on_behalf_of : ?string --- **Type:** ?string Идентификатор магазина **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_receipt_industry_details : ?\YooKassa\Common\ListObject --- **Type:** ListObject Отраслевой реквизит предмета расчета **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_receipt_operational_details : ?\YooKassa\Model\Receipt\OperationalDetails --- **Type:** OperationalDetails Операционный реквизит чека **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_registered_at : ?\DateTime --- **Type:** DateTime Дата и время формирования чека в фискальном накопителе. Указывается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_settlements : ?\YooKassa\Common\ListObject --- **Type:** ListObject Список оплат **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_status : ?string --- **Type:** ?string Статус доставки данных для чека в онлайн-кассу "pending", "succeeded" или "canceled". **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_tax_system_code : ?int --- **Type:** ?int Код системы налогообложения. Число 1-6. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) #### protected $_type : ?string --- **Type:** ?string Тип чека в онлайн-кассе: приход "payment" или возврат "refund". **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public addItem() : void ```php public addItem(\YooKassa\Request\Receipts\ReceiptResponseItemInterface $value) : void ``` **Summary** Добавляет товар в чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Receipts\ReceiptResponseItemInterface | value | Объект добавляемой в чек позиции | **Returns:** void - #### public addSettlement() : void ```php public addSettlement(\YooKassa\Model\Receipt\SettlementInterface $value) : void ``` **Summary** Добавляет оплату в массив. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\SettlementInterface | value | | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getFiscalAttribute() : string|null ```php public getFiscalAttribute() : string|null ``` **Summary** Возвращает фискальный признак чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Фискальный признак чека #### public getFiscalDocumentNumber() : string|null ```php public getFiscalDocumentNumber() : string|null ``` **Summary** Возвращает номер фискального документа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Номер фискального документа #### public getFiscalProviderId() : string|null ```php public getFiscalProviderId() : string|null ``` **Summary** Возвращает идентификатор чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Идентификатор чека в онлайн-кассе #### public getFiscalStorageNumber() : string|null ```php public getFiscalStorageNumber() : string|null ``` **Summary** Возвращает номер фискального накопителя в кассовом аппарате. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Номер фискального накопителя в кассовом аппарате #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор чека в ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Идентификатор чека в ЮKassa #### public getItems() : \YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|\YooKassa\Common\ListObjectInterface ```php public getItems() : \YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список товаров в заказ. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|\YooKassa\Common\ListObjectInterface - #### public getObjectId() : string|null ```php public getObjectId() : string|null ``` **Summary** Возвращает идентификатор платежа или возврата, для которого был сформирован чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - #### public getOnBehalfOf() : string|null ```php public getOnBehalfOf() : string|null ``` **Summary** Возвращает идентификатор магазин **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - #### public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ```php public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface - Отраслевой реквизит чека #### public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails|null ```php public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails|null ``` **Summary** Возвращает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Model\Receipt\OperationalDetails|null - Операционный реквизит чека #### public getRegisteredAt() : \DateTime|null ```php public getRegisteredAt() : \DateTime|null ``` **Summary** Возвращает дату и время формирования чека в фискальном накопителе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \DateTime|null - Дата и время формирования чека в фискальном накопителе #### public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает Массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface - #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус доставки данных для чека в онлайн-кассу. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Статус доставки данных для чека в онлайн-кассу ("pending", "succeeded" или "canceled") #### public getTaxSystemCode() : int|null ```php public getTaxSystemCode() : int|null ``` **Summary** Возвращает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** int|null - Код системы налогообложения. Число 1-6. #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** string|null - Тип чека в онлайн-кассе: приход "payment" или возврат "refund" #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public notEmpty() : bool ```php public notEmpty() : bool ``` **Summary** Проверяет есть ли в чеке хотя бы одна позиция. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) **Returns:** bool - True если чек не пуст, false если в чеке нет ни одной позиции #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setFiscalAttribute() : self ```php public setFiscalAttribute(string|null $fiscal_attribute = null) : self ``` **Summary** Устанавливает фискальный признак чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_attribute | Фискальный признак чека. Формируется фискальным накопителем на основе данных, переданных для регистрации чека. | **Returns:** self - #### public setFiscalDocumentNumber() : self ```php public setFiscalDocumentNumber(string|null $fiscal_document_number = null) : self ``` **Summary** Устанавливает номер фискального документа **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_document_number | Номер фискального документа. | **Returns:** self - #### public setFiscalProviderId() : self ```php public setFiscalProviderId(string|null $fiscal_provider_id = null) : self ``` **Summary** Устанавливает идентификатор чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_provider_id | Идентификатор чека в онлайн-кассе. Присутствует, если чек удалось зарегистрировать. | **Returns:** self - #### public setFiscalStorageNumber() : self ```php public setFiscalStorageNumber(string|null $fiscal_storage_number = null) : self ``` **Summary** Устанавливает номер фискального накопителя в кассовом аппарате. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | fiscal_storage_number | Номер фискального накопителя в кассовом аппарате. | **Returns:** self - #### public setId() : self ```php public setId(string $id) : self ``` **Summary** Устанавливает идентификатор чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | id | Идентификатор чека | **Returns:** self - #### public setItems() : self ```php public setItems(\YooKassa\Request\Receipts\ReceiptResponseItemInterface[]|null $items) : self ``` **Summary** Устанавливает список позиций в чеке. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Receipts\ReceiptResponseItemInterface[] OR null | items | Список товаров в заказе | **Returns:** self - #### public setObjectId() : self ```php public setObjectId(string|null $object_id) : self ``` **Summary** Устанавливает идентификатор платежа или возврата, для которого был сформирован чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | object_id | | **Returns:** self - #### public setOnBehalfOf() : self ```php public setOnBehalfOf(string|null $on_behalf_of = null) : self ``` **Summary** Возвращает идентификатор магазина, от имени которого нужно отправить чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | on_behalf_of | Идентификатор магазина, от имени которого нужно отправить чек | **Returns:** self - #### public setReceiptIndustryDetails() : self ```php public setReceiptIndustryDetails(array|\YooKassa\Model\Receipt\IndustryDetails[]|null $receipt_industry_details = null) : self ``` **Summary** Устанавливает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\IndustryDetails[] OR null | receipt_industry_details | Отраслевой реквизит чека | **Returns:** self - #### public setReceiptOperationalDetails() : self ```php public setReceiptOperationalDetails(array|\YooKassa\Model\Receipt\OperationalDetails|null $receipt_operational_details = null) : self ``` **Summary** Устанавливает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\OperationalDetails OR null | receipt_operational_details | Операционный реквизит чека | **Returns:** self - #### public setRegisteredAt() : self ```php public setRegisteredAt(\DateTime|string|null $registered_at = null) : self ``` **Summary** Устанавливает дату и время формирования чека в фискальном накопителе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | registered_at | Дата и время формирования чека в фискальном накопителе. Указывается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). | **Returns:** self - #### public setSettlements() : self ```php public setSettlements(\YooKassa\Model\Receipt\SettlementInterface[]|null $settlements) : self ``` **Summary** Устанавливает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\SettlementInterface[] OR null | settlements | | **Returns:** self - #### public setSpecificProperties() : void ```php public setSpecificProperties(array $receiptData) : void ``` **Summary** Установка свойств, присущих конкретному объекту. **Details:** * Inherited From: [\YooKassa\Request\Receipts\SimpleReceiptResponse](../classes/YooKassa-Request-Receipts-SimpleReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | receiptData | | **Returns:** void - #### public setStatus() : self ```php public setStatus(string|null $status) : self ``` **Summary** Устанавливает состояние регистрации фискального чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Состояние регистрации фискального чека | **Returns:** self - #### public setTaxSystemCode() : self ```php public setTaxSystemCode(int|null $tax_system_code) : self ``` **Summary** Устанавливает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | tax_system_code | Код системы налогообложения. Число 1-6 | **Returns:** self - #### public setType() : self ```php public setType(string $type) : self ``` **Summary** Устанавливает типа чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\AbstractReceiptResponse](../classes/YooKassa-Request-Receipts-AbstractReceiptResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | type | Тип чека | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-PayoutDestinationType.md000064400000012410150364342670023251 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payout\PayoutDestinationType ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель PayoutDestinationType. **Description:** Виды выплат. Возможные значения: - `yoo_money` - Выплата в кошелек ЮMoney - `bank_card` - Выплата на произвольную банковскую карту - `sbp` - Выплата через СБП на счет в банке или платежном сервисе --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [YOO_MONEY](../classes/YooKassa-Model-Payout-PayoutDestinationType.md#constant_YOO_MONEY) | | Выплата в кошелек ЮMoney | | public | [BANK_CARD](../classes/YooKassa-Model-Payout-PayoutDestinationType.md#constant_BANK_CARD) | | Выплата на произвольную банковскую карту | | public | [SBP](../classes/YooKassa-Model-Payout-PayoutDestinationType.md#constant_SBP) | | Выплата через СБП на счет в банке или платежном сервисе | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payout-PayoutDestinationType.md#property_validValues) | | Возвращает список доступных значений | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payout/PayoutDestinationType.php](../../lib/Model/Payout/PayoutDestinationType.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payout\PayoutDestinationType * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### YOO_MONEY Выплата в кошелек ЮMoney ```php YOO_MONEY = 'yoo_money' ``` ###### BANK_CARD Выплата на произвольную банковскую карту ```php BANK_CARD = 'bank_card' ``` ###### SBP Выплата через СБП на счет в банке или платежном сервисе ```php SBP = 'sbp' ``` --- ## Properties #### protected $validValues : array --- **Summary** Возвращает список доступных значений **Type:** array Массив принимаемых enum'ом значений **Details:** ##### Tags | Tag | Version | Description | | --- | ------- | ----------- | | return | | | --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-PersonalData-PersonalDataStatus.md000064400000013210150364342670023600 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\PersonalData\PersonalDataStatus ### Namespace: [\YooKassa\Model\PersonalData](../namespaces/yookassa-model-personaldata.md) --- **Summary:** Класс, представляющий модель PersonalDataStatus. **Description:** Статус персональных данных. Возможные значения: - `waiting_for_operation` — данные сохранены, но не использованы при проведении выплаты; - `active` — данные сохранены и использованы при проведении выплаты; данные можно использовать повторно до срока, указанного в параметре `expires_at`; - `canceled` — хранение данных отменено, данные удалены, инициатор и причина отмены указаны в объекте `cancellation_details` (финальный и неизменяемый статус). --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [WAITING_FOR_OPERATION](../classes/YooKassa-Model-PersonalData-PersonalDataStatus.md#constant_WAITING_FOR_OPERATION) | | Данные сохранены, но не использованы при проведении выплаты | | public | [ACTIVE](../classes/YooKassa-Model-PersonalData-PersonalDataStatus.md#constant_ACTIVE) | | Данные сохранены и использованы при проведении выплаты | | public | [CANCELED](../classes/YooKassa-Model-PersonalData-PersonalDataStatus.md#constant_CANCELED) | | Хранение данных отменено | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-PersonalData-PersonalDataStatus.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/PersonalData/PersonalDataStatus.php](../../lib/Model/PersonalData/PersonalDataStatus.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\PersonalData\PersonalDataStatus * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### WAITING_FOR_OPERATION Данные сохранены, но не использованы при проведении выплаты ```php WAITING_FOR_OPERATION = 'waiting_for_operation' ``` ###### ACTIVE Данные сохранены и использованы при проведении выплаты ```php ACTIVE = 'active' ``` ###### CANCELED Хранение данных отменено ```php CANCELED = 'canceled' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Refunds-RefundsRequestInterface.md000064400000031100150364342670024236 0ustar00# [YooKassa API SDK](../home.md) # Interface: RefundsRequestInterface ### Namespace: [\YooKassa\Request\Refunds](../namespaces/yookassa-request-refunds.md) --- **Summary:** Interface RefundsRequestInterface --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getCreatedAtGt()](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md#method_getCreatedAtGt) | | Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCreatedAtGte()](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md#method_getCreatedAtGte) | | Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCreatedAtLt()](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md#method_getCreatedAtLt) | | Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCreatedAtLte()](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md#method_getCreatedAtLte) | | Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCursor()](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md#method_getCursor) | | Возвращает токен для получения следующей страницы выборки. | | public | [getPaymentId()](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md#method_getPaymentId) | | Возвращает идентификатор платежа если он задан или null. | | public | [getStatus()](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md#method_getStatus) | | Возвращает статус выбираемых возвратов или null, если он до этого не был установлен. | | public | [hasCreatedAtGt()](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md#method_hasCreatedAtGt) | | Проверяет, была ли установлена дата создания от которой выбираются возвраты. | | public | [hasCreatedAtGte()](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md#method_hasCreatedAtGte) | | Проверяет, была ли установлена дата создания от которой выбираются возвраты. | | public | [hasCreatedAtLt()](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md#method_hasCreatedAtLt) | | Проверяет, была ли установлена дата создания до которой выбираются возвраты. | | public | [hasCreatedAtLte()](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md#method_hasCreatedAtLte) | | Проверяет, была ли установлена дата создания до которой выбираются возвраты. | | public | [hasCursor()](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md#method_hasCursor) | | Проверяет, был ли установлен токен следующей страницы. | | public | [hasPaymentId()](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md#method_hasPaymentId) | | Проверяет, был ли задан идентификатор платежа. | | public | [hasStatus()](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md#method_hasStatus) | | Проверяет, был ли установлен статус выбираемых возвратов. | --- ### Details * File: [lib/Request/Refunds/RefundsRequestInterface.php](../../lib/Request/Refunds/RefundsRequestInterface.php) * Package: \YooKassa\Request * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Идентификатор платежа | | property | | Время создания, от (включительно) | | property | | Время создания, от (не включая) | | property | | Время создания, до (включительно) | | property | | Время создания, до (не включая) | | property | | Статус возврата | | property | | Токен для получения следующей страницы выборки | | property | | Ограничение количества объектов, отображаемых на одной странице выдачи | --- ## Methods #### public getPaymentId() : null|string ```php public getPaymentId() : null|string ``` **Summary** Возвращает идентификатор платежа если он задан или null. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) **Returns:** null|string - Идентификатор платежа #### public hasPaymentId() : bool ```php public hasPaymentId() : bool ``` **Summary** Проверяет, был ли задан идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) **Returns:** bool - True если идентификатор был задан, false если нет #### public getCreatedAtGte() : null|\DateTime ```php public getCreatedAtGte() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) **Returns:** null|\DateTime - Время создания, от (включительно) #### public hasCreatedAtGte() : bool ```php public hasCreatedAtGte() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public getCreatedAtGt() : null|\DateTime ```php public getCreatedAtGt() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) **Returns:** null|\DateTime - Время создания, от (не включая) #### public hasCreatedAtGt() : bool ```php public hasCreatedAtGt() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public getCreatedAtLte() : null|\DateTime ```php public getCreatedAtLte() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) **Returns:** null|\DateTime - Время создания, до (включительно) #### public hasCreatedAtLte() : bool ```php public hasCreatedAtLte() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public getCreatedAtLt() : null|\DateTime ```php public getCreatedAtLt() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) **Returns:** null|\DateTime - Время создания, до (не включая) #### public hasCreatedAtLt() : bool ```php public hasCreatedAtLt() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) **Returns:** bool - True если дата была установлена, false если нет #### public getStatus() : null|string ```php public getStatus() : null|string ``` **Summary** Возвращает статус выбираемых возвратов или null, если он до этого не был установлен. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) **Returns:** null|string - Статус выбираемых возвратов #### public hasStatus() : bool ```php public hasStatus() : bool ``` **Summary** Проверяет, был ли установлен статус выбираемых возвратов. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) **Returns:** bool - True если статус был установлен, false если нет #### public getCursor() : null|string ```php public getCursor() : null|string ``` **Summary** Возвращает токен для получения следующей страницы выборки. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) **Returns:** null|string - Токен для получения следующей страницы выборки #### public hasCursor() : bool ```php public hasCursor() : bool ``` **Summary** Проверяет, был ли установлен токен следующей страницы. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) **Returns:** bool - True если токен был установлен, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md000064400000034016150364342670026743 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation ### Namespace: [\YooKassa\Request\SelfEmployed](../namespaces/yookassa-request-selfemployed.md) --- **Summary:** Класс, представляющий модель SelfEmployedRequestConfirmation. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md#property_type) | | Тип сценария подтверждения. | | protected | [$_type](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md#property__type) | | Тип сценария подтверждения. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getType()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md#method_getType) | | Возвращает тип сценария подтверждения. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setType()](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md#method_setType) | | Устанавливает тип сценария подтверждения. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/SelfEmployed/SelfEmployedRequestConfirmation.php](../../lib/Request/SelfEmployed/SelfEmployedRequestConfirmation.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип сценария подтверждения. **Type:** string **Details:** #### protected $_type : ?string --- **Summary** Тип сценария подтверждения. **Type:** ?string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип сценария подтверждения. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип сценария подтверждения. **Details:** * Inherited From: [\YooKassa\Request\SelfEmployed\SelfEmployedRequestConfirmation](../classes/YooKassa-Request-SelfEmployed-SelfEmployedRequestConfirmation.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип сценария подтверждения | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestSerializer.md000064400000004140150364342670026602 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Receipts\CreatePostReceiptRequestSerializer ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Класс сериалайзера объекта запроса к API создание чека. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [serialize()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestSerializer.md#method_serialize) | | Сериализует объект запроса к API для дальнейшей его отправки. | --- ### Details * File: [lib/Request/Receipts/CreatePostReceiptRequestSerializer.php](../../lib/Request/Receipts/CreatePostReceiptRequestSerializer.php) * Package: Default * Class Hierarchy: * \YooKassa\Request\Receipts\CreatePostReceiptRequestSerializer --- ## Methods #### public serialize() : array ```php public serialize(\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface $request) : array ``` **Summary** Сериализует объект запроса к API для дальнейшей его отправки. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestSerializer](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestSerializer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface | request | Сериализуемый объект | **Returns:** array - Массив с информацией, отправляемый в дальнейшем в API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md000064400000055745150364342670026100 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Класс билдера объектов запросов к API на создание чека. --- ### Examples Пример использования билдера ```php try { $receiptBuilder = \YooKassa\Request\Receipts\CreatePostReceiptRequest::builder(); $receiptBuilder->setType(\YooKassa\Model\Receipt\ReceiptType::PAYMENT) ->setObjectId('24b94598-000f-5000-9000-1b68e7b15f3f', \YooKassa\Model\Receipt\ReceiptType::PAYMENT) // payment_id ->setCustomer([ 'email' => 'john.doe@merchant.com', 'phone' => '71111111111', ]) ->setItems([ [ 'description' => 'Платок Gucci', 'quantity' => '1.00', 'amount' => [ 'value' => '3000.00', 'currency' => 'RUB', ], 'vat_code' => 2, 'payment_mode' => 'full_payment', 'payment_subject' => 'commodity', ], ]) ->addSettlement([ [ 'type' => 'prepayment', 'amount' => [ 'value' => 100.00, 'currency' => 'RUB', ], ], ]) ->setSend(true) ; // Создаем объект запроса $request = $receiptBuilder->build(); // Можно изменить данные, если нужно $request->setOnBehalfOf('159753'); $request->getitems()->add(new \YooKassa\Model\Receipt\ReceiptItem([ 'description' => 'Платок Gucci Новый', 'quantity' => '1.00', 'amount' => [ 'value' => '3500.00', 'currency' => 'RUB', ], 'vat_code' => 2, 'payment_mode' => 'full_payment', 'payment_subject' => 'commodity', ])); $idempotenceKey = uniqid('', true); $response = $client->createReceipt($request, $idempotenceKey); } catch (Exception $e) { $response = $e; } var_dump($response); ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$currentObject](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#property_currentObject) | | Собираемый объект запроса. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. | | public | [addItem()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_addItem) | | Добавляет товар в чек. | | public | [addReceiptIndustryDetails()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_addReceiptIndustryDetails) | | Добавляет отраслевой реквизит чека. | | public | [addSettlement()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_addSettlement) | | Добавляет оплату в перечень совершенных расчетов. | | public | [build()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_build) | | Строит и возвращает объект запроса для отправки в API ЮKassa. | | public | [setAdditionalUserProps()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_setAdditionalUserProps) | | Устанавливает дополнительный реквизит пользователя. | | public | [setCurrency()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_setCurrency) | | Устанавливает валюту в которой будет происходить подтверждение оплаты заказа. | | public | [setCustomer()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_setCustomer) | | Устанавливает информацию о пользователе. | | public | [setItems()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_setItems) | | Устанавливает список товаров чека. | | public | [setObjectId()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_setObjectId) | | Устанавливает Id объекта чека. | | public | [setObjectType()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_setObjectType) | | Устанавливает тип объекта чека. | | public | [setOnBehalfOf()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_setOnBehalfOf) | | Устанавливает идентификатор магазина, от имени которого нужно отправить чек. | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива. | | public | [setReceiptIndustryDetails()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_setReceiptIndustryDetails) | | Устанавливает отраслевой реквизит чека. | | public | [setReceiptOperationalDetails()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_setReceiptOperationalDetails) | | Устанавливает операционный реквизит чека. | | public | [setSend()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_setSend) | | Устанавливает признак отложенной отправки чека. | | public | [setSettlements()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_setSettlements) | | Устанавливает массив оплат, обеспечивающих выдачу товара. | | public | [setTaxSystemCode()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_setTaxSystemCode) | | Устанавливает код системы налогообложения. | | public | [setType()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_setType) | | Устанавливает тип чека в онлайн-кассе. | | protected | [initCurrentObject()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md#method_initCurrentObject) | | Инициализирует объект запроса, который в дальнейшем будет собираться билдером | --- ### Details * File: [lib/Request/Receipts/CreatePostReceiptRequestBuilder.php](../../lib/Request/Receipts/CreatePostReceiptRequestBuilder.php) * Package: Default * Class Hierarchy: * [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) * \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder --- ## Properties #### protected $currentObject : ?\YooKassa\Common\AbstractRequestInterface --- **Summary** Собираемый объект запроса. **Type:** AbstractRequestInterface **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public addItem() : self ```php public addItem(array|\YooKassa\Model\Receipt\ReceiptItemInterface|null $value) : self ``` **Summary** Добавляет товар в чек. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\ReceiptItemInterface OR null | value | Информация о товаре | **Returns:** self - Инстанс билдера запросов #### public addReceiptIndustryDetails() : self ```php public addReceiptIndustryDetails(array|\YooKassa\Model\Receipt\IndustryDetails|null $value) : self ``` **Summary** Добавляет отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\IndustryDetails OR null | value | Отраслевой реквизит чека | **Returns:** self - Инстанс билдера запросов #### public addSettlement() : self ```php public addSettlement(array|\YooKassa\Model\Receipt\SettlementInterface|null $value) : self ``` **Summary** Добавляет оплату в перечень совершенных расчетов. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\SettlementInterface OR null | value | Информация об оплате | **Returns:** self - Инстанс билдера запросов #### public build() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public build(null|array $options = null) : \YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Строит и возвращает объект запроса для отправки в API ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array | options | Массив параметров для установки в объект запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidRequestException | Выбрасывается если собрать объект запроса не удалось | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - Инстанс объекта запроса #### public setAdditionalUserProps() : self ```php public setAdditionalUserProps(\YooKassa\Model\Receipt\AdditionalUserProps|array|null $value) : self ``` **Summary** Устанавливает дополнительный реквизит пользователя. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\AdditionalUserProps OR array OR null | value | Дополнительный реквизит пользователя | **Returns:** self - Инстанс билдера запросов #### public setCurrency() : self ```php public setCurrency(string $value) : self ``` **Summary** Устанавливает валюту в которой будет происходить подтверждение оплаты заказа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Валюта в которой подтверждается оплата | **Returns:** self - Инстанс билдера запросов #### public setCustomer() : self ```php public setCustomer(array|\YooKassa\Model\Receipt\ReceiptCustomerInterface $value) : self ``` **Summary** Устанавливает информацию о пользователе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\ReceiptCustomerInterface | value | Информация о плательщике | **Returns:** self - Инстанс билдера запросов #### public setItems() : self ```php public setItems(array|\YooKassa\Model\Receipt\ReceiptItemInterface[]|null $value) : self ``` **Summary** Устанавливает список товаров чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\ReceiptItemInterface[] OR null | value | Список товаров чека | **Returns:** self - Инстанс билдера запросов #### public setObjectId() : self ```php public setObjectId(string $value, null|string $type = null) : self ``` **Summary** Устанавливает Id объекта чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Id объекта чека | | null OR string | type | Тип объекта чека | **Returns:** self - Инстанс билдера запросов #### public setObjectType() : self ```php public setObjectType(string|null $value) : self ``` **Summary** Устанавливает тип объекта чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Тип объекта чека | **Returns:** self - Инстанс билдера запросов #### public setOnBehalfOf() : self ```php public setOnBehalfOf(string|null $value) : self ``` **Summary** Устанавливает идентификатор магазина, от имени которого нужно отправить чек. **Description** Выдается ЮKassa, отображается в разделе Продавцы личного кабинета (столбец shopId). Необходимо передавать, если вы используете решение ЮKassa для платформ. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Идентификатор магазина, от имени которого нужно отправить чек | **Returns:** self - Инстанс билдера запросов #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(iterable|null $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable OR null | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### public setReceiptIndustryDetails() : self ```php public setReceiptIndustryDetails(array|\YooKassa\Model\Receipt\IndustryDetails[]|null $value) : self ``` **Summary** Устанавливает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\IndustryDetails[] OR null | value | Отраслевой реквизит чека | **Returns:** self - Инстанс билдера запросов #### public setReceiptOperationalDetails() : self ```php public setReceiptOperationalDetails(array|\YooKassa\Model\Receipt\OperationalDetails|null $value) : self ``` **Summary** Устанавливает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\OperationalDetails OR null | value | Операционный реквизит чека | **Returns:** self - Инстанс билдера запросов #### public setSend() : self ```php public setSend(bool $value) : self ``` **Summary** Устанавливает признак отложенной отправки чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | value | Признак отложенной отправки чека | **Returns:** self - Инстанс билдера запросов #### public setSettlements() : self ```php public setSettlements(array|\YooKassa\Model\Receipt\SettlementInterface[]|null $value) : self ``` **Summary** Устанавливает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\SettlementInterface[] OR null | value | Массив оплат, обеспечивающих выдачу товара | **Returns:** self - Инстанс билдера запросов #### public setTaxSystemCode() : self ```php public setTaxSystemCode(int|null $value) : self ``` **Summary** Устанавливает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | value | Код системы налогообложения. Число 1-6. | **Returns:** self - Инстанс билдера запросов #### public setType() : self ```php public setType(string|null $value) : self ``` **Summary** Устанавливает тип чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Тип чека в онлайн-кассе: приход "payment" или возврат "refund" | **Returns:** self - Инстанс билдера запросов #### protected initCurrentObject() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php protected initCurrentObject() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Инициализирует объект запроса, который в дальнейшем будет собираться билдером **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md) **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - Инстанс собираемого объекта запроса к API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Deals-CreateDealRequestSerializer.md000064400000004510150364342670024461 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Deals\CreateDealRequestSerializer ### Namespace: [\YooKassa\Request\Deals](../namespaces/yookassa-request-deals.md) --- **Summary:** Класс, представляющий модель CreateDealRequestSerializer. **Description:** Класс объекта осуществляющего сериализацию объекта запроса к API на создание сделки. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [serialize()](../classes/YooKassa-Request-Deals-CreateDealRequestSerializer.md#method_serialize) | | Формирует ассоциативный массив данных из объекта запроса. | --- ### Details * File: [lib/Request/Deals/CreateDealRequestSerializer.php](../../lib/Request/Deals/CreateDealRequestSerializer.php) * Package: YooKassa\Request * Class Hierarchy: * \YooKassa\Request\Deals\CreateDealRequestSerializer * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public serialize() : array ```php public serialize(\YooKassa\Request\Deals\CreateDealRequestInterface $request) : array ``` **Summary** Формирует ассоциативный массив данных из объекта запроса. **Details:** * Inherited From: [\YooKassa\Request\Deals\CreateDealRequestSerializer](../classes/YooKassa-Request-Deals-CreateDealRequestSerializer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Deals\CreateDealRequestInterface | request | Объект запроса | **Returns:** array - Массив данных для дальнейшего кодирования в JSON --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataFactory.md000064400000007426150364342670031513 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataFactory ### Namespace: [\YooKassa\Request\Payouts\PayoutDestinationData](../namespaces/yookassa-request-payouts-payoutdestinationdata.md) --- **Summary:** Класс, представляющий модель PayoutDestinationDataFactory. **Description:** Фабрика создания объекта платежных методов из массива --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [factory()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataFactory.md#method_factory) | | Фабричный метод создания объекта платежных данных по типу. | | public | [factoryFromArray()](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataFactory.md#method_factoryFromArray) | | Фабричный метод создания объекта платежных данных из массива. | --- ### Details * File: [lib/Request/Payouts/PayoutDestinationData/PayoutDestinationDataFactory.php](../../lib/Request/Payouts/PayoutDestinationData/PayoutDestinationDataFactory.php) * Package: YooKassa\Request * Class Hierarchy: * \YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataFactory * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public factory() : \YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData ```php public factory(string $type) : \YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData ``` **Summary** Фабричный метод создания объекта платежных данных по типу. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataFactory](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | type | Тип платежных данных | **Returns:** \YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData - #### public factoryFromArray() : \YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData ```php public factoryFromArray(array $data, null|string $type = null) : \YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData ``` **Summary** Фабричный метод создания объекта платежных данных из массива. **Details:** * Inherited From: [\YooKassa\Request\Payouts\PayoutDestinationData\PayoutDestinationDataFactory](../classes/YooKassa-Request-Payouts-PayoutDestinationData-PayoutDestinationDataFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | data | Массив платежных данных | | null OR string | type | Тип платежных данных | **Returns:** \YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-ReceiptCustomer.md000064400000053067150364342670022170 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\ReceiptCustomer ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Информация о плательщике. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$email](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#property_email) | | E-mail адрес плательщика на который будет выслан чек. | | public | [$full_name](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#property_full_name) | | Для юрлица — название организации, для ИП и физического лица — ФИО. | | public | [$fullName](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#property_fullName) | | Для юрлица — название организации, для ИП и физического лица — ФИО. | | public | [$inn](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#property_inn) | | ИНН плательщика (10 или 12 цифр). | | public | [$phone](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#property_phone) | | Номер телефона плательщика в формате ITU-T E.164 на который будет выслан чек. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getEmail()](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#method_getEmail) | | Возвращает адрес электронной почты на который будет выслан чек. | | public | [getFullName()](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#method_getFullName) | | Возвращает для юрлица — название организации, для ИП и физического лица — ФИО. | | public | [getInn()](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#method_getInn) | | Возвращает ИНН плательщика. | | public | [getPhone()](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#method_getPhone) | | Возвращает номер телефона плательщика в формате ITU-T E.164 на который будет выслан чек. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [isEmpty()](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#method_isEmpty) | | Проверка на заполненность объекта. | | public | [jsonSerialize()](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setEmail()](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#method_setEmail) | | Устанавливает адрес электронной почты на который будет выслан чек. | | public | [setFullName()](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#method_setFullName) | | Устанавливает Название организации или ФИО. | | public | [setInn()](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#method_setInn) | | Устанавливает ИНН плательщика. | | public | [setPhone()](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md#method_setPhone) | | Устанавливает номер телефона плательщика в формате ITU-T E.164 на который будет выслан чек. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Receipt/ReceiptCustomer.php](../../lib/Model/Receipt/ReceiptCustomer.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Receipt\ReceiptCustomer * Implements: * [\YooKassa\Model\Receipt\ReceiptCustomerInterface](../classes/YooKassa-Model-Receipt-ReceiptCustomerInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $email : string --- ***Description*** E-mail адрес плательщика на который будет выслан чек. **Type:** string **Details:** #### public $full_name : string --- ***Description*** Для юрлица — название организации, для ИП и физического лица — ФИО. **Type:** string **Details:** #### public $fullName : string --- ***Description*** Для юрлица — название организации, для ИП и физического лица — ФИО. **Type:** string **Details:** #### public $inn : string --- ***Description*** ИНН плательщика (10 или 12 цифр). **Type:** string **Details:** #### public $phone : string --- ***Description*** Номер телефона плательщика в формате ITU-T E.164 на который будет выслан чек. **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getEmail() : string|null ```php public getEmail() : string|null ``` **Summary** Возвращает адрес электронной почты на который будет выслан чек. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomer](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md) **Returns:** string|null - E-mail адрес плательщика #### public getFullName() : string|null ```php public getFullName() : string|null ``` **Summary** Возвращает для юрлица — название организации, для ИП и физического лица — ФИО. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomer](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md) **Returns:** string|null - Название организации или ФИО #### public getInn() : string|null ```php public getInn() : string|null ``` **Summary** Возвращает ИНН плательщика. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomer](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md) **Returns:** string|null - #### public getPhone() : string|null ```php public getPhone() : string|null ``` **Summary** Возвращает номер телефона плательщика в формате ITU-T E.164 на который будет выслан чек. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomer](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md) **Returns:** string|null - Номер телефона плательщика #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public isEmpty() : bool ```php public isEmpty() : bool ``` **Summary** Проверка на заполненность объекта. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomer](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md) **Returns:** bool - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomer](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setEmail() : self ```php public setEmail(string|null $email = null) : self ``` **Summary** Устанавливает адрес электронной почты на который будет выслан чек. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomer](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | email | E-mail адрес плательщика | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Validator\Exceptions\InvalidPropertyValueTypeException | Выбрасывается, если в качестве значения была передана не строка | | \YooKassa\Validator\Exceptions\InvalidPropertyValueException | Выбрасывается если Email не соответствует формату | **Returns:** self - #### public setFullName() : self ```php public setFullName(string|null $full_name = null) : self ``` **Summary** Устанавливает Название организации или ФИО. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomer](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | full_name | Название организации или ФИО | **Returns:** self - #### public setInn() : self ```php public setInn(string|null $inn = null) : self ``` **Summary** Устанавливает ИНН плательщика. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomer](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | inn | ИНН плательщика (10 или 12 цифр) | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Validator\Exceptions\InvalidPropertyValueTypeException | Выбрасывается, если в качестве значения была передана не строка | | \YooKassa\Validator\Exceptions\InvalidPropertyValueException | Выбрасывается если ИНН не соответствует формату 10 или 12 цифр | **Returns:** self - #### public setPhone() : self ```php public setPhone(string|null $phone = null) : self ``` **Summary** Устанавливает номер телефона плательщика в формате ITU-T E.164 на который будет выслан чек. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptCustomer](../classes/YooKassa-Model-Receipt-ReceiptCustomer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | phone | Номер телефона плательщика в формате ITU-T E.164 | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Validator\Exceptions\InvalidPropertyValueTypeException | Выбрасывается, если в качестве значения была передана не строка | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-MonetaryAmount.md000064400000045363150364342670020444 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\MonetaryAmount ### Namespace: [\YooKassa\Model](../namespaces/yookassa-model.md) --- **Summary:** MonetaryAmount - Сумма определенная в валюте. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$currency](../classes/YooKassa-Model-MonetaryAmount.md#property_currency) | | Код валюты | | public | [$value](../classes/YooKassa-Model-MonetaryAmount.md#property_value) | | Сумма | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-MonetaryAmount.md#method___construct) | | MonetaryAmount constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCurrency()](../classes/YooKassa-Model-MonetaryAmount.md#method_getCurrency) | | Возвращает валюту. | | public | [getIntegerValue()](../classes/YooKassa-Model-MonetaryAmount.md#method_getIntegerValue) | | Возвращает сумму в копейках в виде целого числа. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [getValue()](../classes/YooKassa-Model-MonetaryAmount.md#method_getValue) | | Возвращает значение суммы. | | public | [increase()](../classes/YooKassa-Model-MonetaryAmount.md#method_increase) | | Увеличивает сумму на указанное значение. | | public | [jsonSerialize()](../classes/YooKassa-Model-MonetaryAmount.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [multiply()](../classes/YooKassa-Model-MonetaryAmount.md#method_multiply) | | Умножает текущую сумму на указанный коэффициент | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCurrency()](../classes/YooKassa-Model-MonetaryAmount.md#method_setCurrency) | | Устанавливает код валюты. | | public | [setValue()](../classes/YooKassa-Model-MonetaryAmount.md#method_setValue) | | Устанавливает сумму. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/MonetaryAmount.php](../../lib/Model/MonetaryAmount.php) * Package: Default * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\MonetaryAmount * Implements: * [\YooKassa\Model\AmountInterface](../classes/YooKassa-Model-AmountInterface.md) --- ## Properties #### public $currency : string --- ***Description*** Код валюты **Type:** string **Details:** #### public $value : int --- ***Description*** Сумма **Type:** int **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(null|array|\YooKassa\Model\numeric $value = null, null|string $currency = null) : mixed ``` **Summary** MonetaryAmount constructor. **Details:** * Inherited From: [\YooKassa\Model\MonetaryAmount](../classes/YooKassa-Model-MonetaryAmount.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\numeric | value | Сумма | | null OR string | currency | Код валюты | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCurrency() : string ```php public getCurrency() : string ``` **Summary** Возвращает валюту. **Details:** * Inherited From: [\YooKassa\Model\MonetaryAmount](../classes/YooKassa-Model-MonetaryAmount.md) **Returns:** string - Код валюты #### public getIntegerValue() : int ```php public getIntegerValue() : int ``` **Summary** Возвращает сумму в копейках в виде целого числа. **Details:** * Inherited From: [\YooKassa\Model\MonetaryAmount](../classes/YooKassa-Model-MonetaryAmount.md) **Returns:** int - Сумма в копейках/центах #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public getValue() : string ```php public getValue() : string ``` **Summary** Возвращает значение суммы. **Details:** * Inherited From: [\YooKassa\Model\MonetaryAmount](../classes/YooKassa-Model-MonetaryAmount.md) **Returns:** string - Сумма #### public increase() : void ```php public increase(float $value) : void ``` **Summary** Увеличивает сумму на указанное значение. **Details:** * Inherited From: [\YooKassa\Model\MonetaryAmount](../classes/YooKassa-Model-MonetaryAmount.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | float | value | Значение, которое будет прибавлено к текущему | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Validator\Exceptions\EmptyPropertyValueException | Выбрасывается если передано пустое значение | | \YooKassa\Validator\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если было передано не число | | \YooKassa\Validator\Exceptions\InvalidPropertyValueException | Выбрасывается если после сложения получилась сумма меньше или равная нулю | **Returns:** void - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Model\MonetaryAmount](../classes/YooKassa-Model-MonetaryAmount.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public multiply() : void ```php public multiply(float $coefficient) : void ``` **Summary** Умножает текущую сумму на указанный коэффициент **Details:** * Inherited From: [\YooKassa\Model\MonetaryAmount](../classes/YooKassa-Model-MonetaryAmount.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | float | coefficient | Множитель | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Validator\Exceptions\EmptyPropertyValueException | Выбрасывается если передано пустое значение | | \YooKassa\Validator\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если было передано не число | | \YooKassa\Validator\Exceptions\InvalidPropertyValueException | Выбрасывается если переданное значение меньше или равно нулю, либо если после умножения получили значение равное нулю | **Returns:** void - #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCurrency() : self ```php public setCurrency(string $currency) : self ``` **Summary** Устанавливает код валюты. **Details:** * Inherited From: [\YooKassa\Model\MonetaryAmount](../classes/YooKassa-Model-MonetaryAmount.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | currency | Код валюты | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Validator\Exceptions\EmptyPropertyValueException | Генерируется если было передано пустое значение | | \YooKassa\Validator\Exceptions\InvalidPropertyValueTypeException | Генерируется если было передано значение невалидного типа | | \YooKassa\Validator\Exceptions\InvalidPropertyValueException | Генерируется если был передан неподдерживаемый код валюты | **Returns:** self - #### public setValue() : self ```php public setValue(\YooKassa\Model\numeric|string|null $value) : self ``` **Summary** Устанавливает сумму. **Details:** * Inherited From: [\YooKassa\Model\MonetaryAmount](../classes/YooKassa-Model-MonetaryAmount.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\numeric OR string OR null | value | Сумма | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Validator\Exceptions\EmptyPropertyValueException | Генерируется если было передано пустое значение | | \YooKassa\Validator\Exceptions\InvalidPropertyValueTypeException | Генерируется если было передано значение невалидного типа | | \YooKassa\Validator\Exceptions\InvalidPropertyValueException | Генерируется если было передано не валидное значение | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-CreatePaymentResponse.md000064400000230507150364342670024124 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\CreatePaymentResponse ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель CreatePaymentResponse. **Description:** Объект ответа возвращаемого API при запросе на создание платежа. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Payment-Payment.md#constant_MAX_LENGTH_DESCRIPTION) | | Максимальная длина строки описания платежа | | public | [MAX_LENGTH_MERCHANT_CUSTOMER_ID](../classes/YooKassa-Model-Payment-Payment.md#constant_MAX_LENGTH_MERCHANT_CUSTOMER_ID) | | Максимальная длина строки идентификатора покупателя в вашей системе | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Payment-Payment.md#property_amount) | | Сумма заказа | | public | [$authorization_details](../classes/YooKassa-Model-Payment-Payment.md#property_authorization_details) | | Данные об авторизации платежа | | public | [$authorizationDetails](../classes/YooKassa-Model-Payment-Payment.md#property_authorizationDetails) | | Данные об авторизации платежа | | public | [$cancellation_details](../classes/YooKassa-Model-Payment-Payment.md#property_cancellation_details) | | Комментарий к отмене платежа | | public | [$cancellationDetails](../classes/YooKassa-Model-Payment-Payment.md#property_cancellationDetails) | | Комментарий к отмене платежа | | public | [$captured_at](../classes/YooKassa-Model-Payment-Payment.md#property_captured_at) | | Время подтверждения платежа магазином | | public | [$capturedAt](../classes/YooKassa-Model-Payment-Payment.md#property_capturedAt) | | Время подтверждения платежа магазином | | public | [$confirmation](../classes/YooKassa-Model-Payment-Payment.md#property_confirmation) | | Способ подтверждения платежа | | public | [$created_at](../classes/YooKassa-Model-Payment-Payment.md#property_created_at) | | Время создания заказа | | public | [$createdAt](../classes/YooKassa-Model-Payment-Payment.md#property_createdAt) | | Время создания заказа | | public | [$deal](../classes/YooKassa-Model-Payment-Payment.md#property_deal) | | Данные о сделке, в составе которой проходит платеж | | public | [$description](../classes/YooKassa-Model-Payment-Payment.md#property_description) | | Описание транзакции | | public | [$expires_at](../classes/YooKassa-Model-Payment-Payment.md#property_expires_at) | | Время, до которого можно бесплатно отменить или подтвердить платеж | | public | [$expiresAt](../classes/YooKassa-Model-Payment-Payment.md#property_expiresAt) | | Время, до которого можно бесплатно отменить или подтвердить платеж | | public | [$id](../classes/YooKassa-Model-Payment-Payment.md#property_id) | | Идентификатор платежа | | public | [$income_amount](../classes/YooKassa-Model-Payment-Payment.md#property_income_amount) | | Сумма платежа, которую получит магазин | | public | [$incomeAmount](../classes/YooKassa-Model-Payment-Payment.md#property_incomeAmount) | | Сумма платежа, которую получит магазин | | public | [$merchant_customer_id](../classes/YooKassa-Model-Payment-Payment.md#property_merchant_customer_id) | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | public | [$merchantCustomerId](../classes/YooKassa-Model-Payment-Payment.md#property_merchantCustomerId) | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | public | [$metadata](../classes/YooKassa-Model-Payment-Payment.md#property_metadata) | | Метаданные платежа указанные мерчантом | | public | [$paid](../classes/YooKassa-Model-Payment-Payment.md#property_paid) | | Признак оплаты заказа | | public | [$payment_method](../classes/YooKassa-Model-Payment-Payment.md#property_payment_method) | | Способ проведения платежа | | public | [$paymentMethod](../classes/YooKassa-Model-Payment-Payment.md#property_paymentMethod) | | Способ проведения платежа | | public | [$receipt_registration](../classes/YooKassa-Model-Payment-Payment.md#property_receipt_registration) | | Состояние регистрации фискального чека | | public | [$receiptRegistration](../classes/YooKassa-Model-Payment-Payment.md#property_receiptRegistration) | | Состояние регистрации фискального чека | | public | [$recipient](../classes/YooKassa-Model-Payment-Payment.md#property_recipient) | | Получатель платежа | | public | [$refundable](../classes/YooKassa-Model-Payment-Payment.md#property_refundable) | | Возможность провести возврат по API | | public | [$refunded_amount](../classes/YooKassa-Model-Payment-Payment.md#property_refunded_amount) | | Сумма возвращенных средств платежа | | public | [$refundedAmount](../classes/YooKassa-Model-Payment-Payment.md#property_refundedAmount) | | Сумма возвращенных средств платежа | | public | [$status](../classes/YooKassa-Model-Payment-Payment.md#property_status) | | Текущее состояние платежа | | public | [$test](../classes/YooKassa-Model-Payment-Payment.md#property_test) | | Признак тестовой операции | | public | [$transfers](../classes/YooKassa-Model-Payment-Payment.md#property_transfers) | | Данные о распределении платежа между магазинами | | protected | [$_amount](../classes/YooKassa-Model-Payment-Payment.md#property__amount) | | | | protected | [$_authorization_details](../classes/YooKassa-Model-Payment-Payment.md#property__authorization_details) | | Данные об авторизации платежа | | protected | [$_cancellation_details](../classes/YooKassa-Model-Payment-Payment.md#property__cancellation_details) | | Комментарий к статусу canceled: кто отменил платеж и по какой причине | | protected | [$_captured_at](../classes/YooKassa-Model-Payment-Payment.md#property__captured_at) | | | | protected | [$_confirmation](../classes/YooKassa-Model-Payment-Payment.md#property__confirmation) | | | | protected | [$_created_at](../classes/YooKassa-Model-Payment-Payment.md#property__created_at) | | | | protected | [$_deal](../classes/YooKassa-Model-Payment-Payment.md#property__deal) | | | | protected | [$_description](../classes/YooKassa-Model-Payment-Payment.md#property__description) | | | | protected | [$_expires_at](../classes/YooKassa-Model-Payment-Payment.md#property__expires_at) | | Время, до которого можно бесплатно отменить или подтвердить платеж. В указанное время платеж в статусе `waiting_for_capture` будет автоматически отменен. | | protected | [$_id](../classes/YooKassa-Model-Payment-Payment.md#property__id) | | | | protected | [$_income_amount](../classes/YooKassa-Model-Payment-Payment.md#property__income_amount) | | | | protected | [$_merchant_customer_id](../classes/YooKassa-Model-Payment-Payment.md#property__merchant_customer_id) | | | | protected | [$_metadata](../classes/YooKassa-Model-Payment-Payment.md#property__metadata) | | | | protected | [$_paid](../classes/YooKassa-Model-Payment-Payment.md#property__paid) | | | | protected | [$_payment_method](../classes/YooKassa-Model-Payment-Payment.md#property__payment_method) | | | | protected | [$_receipt_registration](../classes/YooKassa-Model-Payment-Payment.md#property__receipt_registration) | | | | protected | [$_recipient](../classes/YooKassa-Model-Payment-Payment.md#property__recipient) | | | | protected | [$_refundable](../classes/YooKassa-Model-Payment-Payment.md#property__refundable) | | | | protected | [$_refunded_amount](../classes/YooKassa-Model-Payment-Payment.md#property__refunded_amount) | | | | protected | [$_status](../classes/YooKassa-Model-Payment-Payment.md#property__status) | | | | protected | [$_test](../classes/YooKassa-Model-Payment-Payment.md#property__test) | | Признак тестовой операции. | | protected | [$_transfers](../classes/YooKassa-Model-Payment-Payment.md#property__transfers) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getAmount) | | Возвращает сумму. | | public | [getAuthorizationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_getAuthorizationDetails) | | Возвращает данные об авторизации платежа. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_getCancellationDetails) | | Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [getCapturedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getCapturedAt) | | Возвращает время подтверждения платежа магазином или null, если время не задано. | | public | [getConfirmation()](../classes/YooKassa-Model-Payment-Payment.md#method_getConfirmation) | | Возвращает способ подтверждения платежа. | | public | [getCreatedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getCreatedAt) | | Возвращает время создания заказа. | | public | [getDeal()](../classes/YooKassa-Model-Payment-Payment.md#method_getDeal) | | Возвращает данные о сделке, в составе которой проходит платеж. | | public | [getDescription()](../classes/YooKassa-Model-Payment-Payment.md#method_getDescription) | | Возвращает описание транзакции | | public | [getExpiresAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getExpiresAt) | | Возвращает время до которого можно бесплатно отменить или подтвердить платеж, или null, если оно не задано. | | public | [getId()](../classes/YooKassa-Model-Payment-Payment.md#method_getId) | | Возвращает идентификатор платежа. | | public | [getIncomeAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getIncomeAmount) | | Возвращает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa. | | public | [getMerchantCustomerId()](../classes/YooKassa-Model-Payment-Payment.md#method_getMerchantCustomerId) | | Возвращает идентификатор покупателя в вашей системе. | | public | [getMetadata()](../classes/YooKassa-Model-Payment-Payment.md#method_getMetadata) | | Возвращает метаданные платежа установленные мерчантом | | public | [getPaid()](../classes/YooKassa-Model-Payment-Payment.md#method_getPaid) | | Проверяет, был ли уже оплачен заказ. | | public | [getPaymentMethod()](../classes/YooKassa-Model-Payment-Payment.md#method_getPaymentMethod) | | Возвращает используемый способ проведения платежа. | | public | [getReceiptRegistration()](../classes/YooKassa-Model-Payment-Payment.md#method_getReceiptRegistration) | | Возвращает состояние регистрации фискального чека. | | public | [getRecipient()](../classes/YooKassa-Model-Payment-Payment.md#method_getRecipient) | | Возвращает получателя платежа. | | public | [getRefundable()](../classes/YooKassa-Model-Payment-Payment.md#method_getRefundable) | | Проверяет возможность провести возврат по API. | | public | [getRefundedAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getRefundedAmount) | | Возвращает сумму возвращенных средств. | | public | [getStatus()](../classes/YooKassa-Model-Payment-Payment.md#method_getStatus) | | Возвращает состояние платежа. | | public | [getTest()](../classes/YooKassa-Model-Payment-Payment.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getTransfers()](../classes/YooKassa-Model-Payment-Payment.md#method_getTransfers) | | Возвращает массив распределения денег между магазинами. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setAmount) | | Устанавливает сумму платежа. | | public | [setAuthorizationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_setAuthorizationDetails) | | Устанавливает данные об авторизации платежа. | | public | [setCancellationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_setCancellationDetails) | | Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [setCapturedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setCapturedAt) | | Устанавливает время подтверждения платежа магазином | | public | [setConfirmation()](../classes/YooKassa-Model-Payment-Payment.md#method_setConfirmation) | | Устанавливает способ подтверждения платежа. | | public | [setCreatedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setCreatedAt) | | Устанавливает время создания заказа. | | public | [setDeal()](../classes/YooKassa-Model-Payment-Payment.md#method_setDeal) | | Устанавливает данные о сделке, в составе которой проходит платеж. | | public | [setDescription()](../classes/YooKassa-Model-Payment-Payment.md#method_setDescription) | | Устанавливает описание транзакции | | public | [setExpiresAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setExpiresAt) | | Устанавливает время до которого можно бесплатно отменить или подтвердить платеж. | | public | [setId()](../classes/YooKassa-Model-Payment-Payment.md#method_setId) | | Устанавливает идентификатор платежа. | | public | [setIncomeAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setIncomeAmount) | | Устанавливает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa | | public | [setMerchantCustomerId()](../classes/YooKassa-Model-Payment-Payment.md#method_setMerchantCustomerId) | | Устанавливает идентификатор покупателя в вашей системе. | | public | [setMetadata()](../classes/YooKassa-Model-Payment-Payment.md#method_setMetadata) | | Устанавливает метаданные платежа. | | public | [setPaid()](../classes/YooKassa-Model-Payment-Payment.md#method_setPaid) | | Устанавливает флаг оплаты заказа. | | public | [setPaymentMethod()](../classes/YooKassa-Model-Payment-Payment.md#method_setPaymentMethod) | | Устанавливает используемый способ проведения платежа. | | public | [setReceiptRegistration()](../classes/YooKassa-Model-Payment-Payment.md#method_setReceiptRegistration) | | Устанавливает состояние регистрации фискального чека | | public | [setRecipient()](../classes/YooKassa-Model-Payment-Payment.md#method_setRecipient) | | Устанавливает получателя платежа. | | public | [setRefundable()](../classes/YooKassa-Model-Payment-Payment.md#method_setRefundable) | | Устанавливает возможность провести возврат по API. | | public | [setRefundedAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setRefundedAmount) | | Устанавливает сумму возвращенных средств. | | public | [setStatus()](../classes/YooKassa-Model-Payment-Payment.md#method_setStatus) | | Устанавливает статус платежа | | public | [setTest()](../classes/YooKassa-Model-Payment-Payment.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [setTransfers()](../classes/YooKassa-Model-Payment-Payment.md#method_setTransfers) | | Устанавливает массив распределения денег между магазинами. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/CreatePaymentResponse.php](../../lib/Request/Payments/CreatePaymentResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) * [\YooKassa\Request\Payments\AbstractPaymentResponse](../classes/YooKassa-Request-Payments-AbstractPaymentResponse.md) * \YooKassa\Request\Payments\CreatePaymentResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Inherited from [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) Максимальная длина строки описания платежа ```php MAX_LENGTH_DESCRIPTION = 128 ``` ###### MAX_LENGTH_MERCHANT_CUSTOMER_ID Inherited from [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) Максимальная длина строки идентификатора покупателя в вашей системе ```php MAX_LENGTH_MERCHANT_CUSTOMER_ID = 200 ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма заказа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $authorization_details : \YooKassa\Model\Payment\AuthorizationDetailsInterface --- ***Description*** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $authorizationDetails : \YooKassa\Model\Payment\AuthorizationDetailsInterface --- ***Description*** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $cancellation_details : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене платежа **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $cancellationDetails : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене платежа **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $captured_at : \DateTime --- ***Description*** Время подтверждения платежа магазином **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $capturedAt : \DateTime --- ***Description*** Время подтверждения платежа магазином **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $confirmation : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation --- ***Description*** Способ подтверждения платежа **Type:** AbstractConfirmation **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $created_at : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $createdAt : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $deal : \YooKassa\Model\Deal\PaymentDealInfo --- ***Description*** Данные о сделке, в составе которой проходит платеж **Type:** PaymentDealInfo **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $description : string --- ***Description*** Описание транзакции **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $expires_at : \DateTime --- ***Description*** Время, до которого можно бесплатно отменить или подтвердить платеж **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $expiresAt : \DateTime --- ***Description*** Время, до которого можно бесплатно отменить или подтвердить платеж **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $id : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $income_amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма платежа, которую получит магазин **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $incomeAmount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма платежа, которую получит магазин **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $merchant_customer_id : string --- ***Description*** Идентификатор покупателя в вашей системе, например электронная почта или номер телефона **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $merchantCustomerId : string --- ***Description*** Идентификатор покупателя в вашей системе, например электронная почта или номер телефона **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные платежа указанные мерчантом **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $paid : bool --- ***Description*** Признак оплаты заказа **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $payment_method : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения платежа **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $paymentMethod : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения платежа **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $receipt_registration : string --- ***Description*** Состояние регистрации фискального чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $receiptRegistration : string --- ***Description*** Состояние регистрации фискального чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $recipient : \YooKassa\Model\Payment\RecipientInterface --- ***Description*** Получатель платежа **Type:** RecipientInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refundable : bool --- ***Description*** Возможность провести возврат по API **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refunded_amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возвращенных средств платежа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $refundedAmount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возвращенных средств платежа **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $status : string --- ***Description*** Текущее состояние платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $test : bool --- ***Description*** Признак тестовой операции **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### public $transfers : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Payment\TransferInterface[] --- ***Description*** Данные о распределении платежа между магазинами **Type:** TransferInterface[] **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_authorization_details : ?\YooKassa\Model\Payment\AuthorizationDetailsInterface --- **Summary** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_cancellation_details : ?\YooKassa\Model\CancellationDetailsInterface --- **Summary** Комментарий к статусу canceled: кто отменил платеж и по какой причине **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_captured_at : ?\DateTime --- **Type:** DateTime Время подтверждения платежа магазином **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_confirmation : ?\YooKassa\Model\Payment\Confirmation\AbstractConfirmation --- **Type:** AbstractConfirmation Способ подтверждения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_created_at : ?\DateTime --- **Type:** DateTime Время создания заказа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_deal : ?\YooKassa\Model\Deal\PaymentDealInfo --- **Type:** PaymentDealInfo Данные о сделке, в составе которой проходит платеж. Необходимо передавать, если вы проводите Безопасную сделку **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_description : ?string --- **Type:** ?string Описание платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_expires_at : ?\DateTime --- **Summary** Время, до которого можно бесплатно отменить или подтвердить платеж. В указанное время платеж в статусе `waiting_for_capture` будет автоматически отменен. **Type:** DateTime Время, до которого можно бесплатно отменить или подтвердить платеж **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_id : ?string --- **Type:** ?string Идентификатор платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_income_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_merchant_customer_id : ?string --- **Type:** ?string Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов. Присутствует, если вы хотите запомнить банковскую карту и отобразить ее при повторном платеже в виджете ЮKassa **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Type:** Metadata Метаданные платежа указанные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_paid : bool --- **Type:** bool Признак оплаты заказа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_payment_method : ?\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- **Type:** AbstractPaymentMethod Способ проведения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_receipt_registration : ?string --- **Type:** ?string Состояние регистрации фискального чека **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_recipient : ?\YooKassa\Model\Payment\RecipientInterface --- **Type:** RecipientInterface Получатель платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_refundable : bool --- **Type:** bool Возможность провести возврат по API **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_refunded_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface Сумма возвращенных средств платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_status : ?string --- **Type:** ?string Текущее состояние платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_test : bool --- **Summary** Признак тестовой операции. **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) #### protected $_transfers : ?\YooKassa\Common\ListObject --- **Type:** ListObject Данные о распределении платежа между магазинами **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма платежа #### public getAuthorizationDetails() : null|\YooKassa\Model\Payment\AuthorizationDetailsInterface ```php public getAuthorizationDetails() : null|\YooKassa\Model\Payment\AuthorizationDetailsInterface ``` **Summary** Возвращает данные об авторизации платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\Payment\AuthorizationDetailsInterface - Данные об авторизации платежа #### public getCancellationDetails() : null|\YooKassa\Model\CancellationDetailsInterface ```php public getCancellationDetails() : null|\YooKassa\Model\CancellationDetailsInterface ``` **Summary** Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\CancellationDetailsInterface - Комментарий к статусу canceled #### public getCapturedAt() : null|\DateTime ```php public getCapturedAt() : null|\DateTime ``` **Summary** Возвращает время подтверждения платежа магазином или null, если время не задано. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\DateTime - Время подтверждения платежа магазином #### public getConfirmation() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null ```php public getConfirmation() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null ``` **Summary** Возвращает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null - Способ подтверждения платежа #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \DateTime|null - Время создания заказа #### public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ``` **Summary** Возвращает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Deal\PaymentDealInfo|null - Данные о сделке, в составе которой проходит платеж #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - #### public getExpiresAt() : null|\DateTime ```php public getExpiresAt() : null|\DateTime ``` **Summary** Возвращает время до которого можно бесплатно отменить или подтвердить платеж, или null, если оно не задано. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\DateTime - Время, до которого можно бесплатно отменить или подтвердить платеж #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Идентификатор платежа #### public getIncomeAmount() : \YooKassa\Model\AmountInterface|null ```php public getIncomeAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма платежа, которую получит магазин #### public getMerchantCustomerId() : string|null ```php public getMerchantCustomerId() : string|null ``` **Summary** Возвращает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Идентификатор покупателя в вашей системе #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает метаданные платежа установленные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные платежа указанные мерчантом #### public getPaid() : bool ```php public getPaid() : bool ``` **Summary** Проверяет, был ли уже оплачен заказ. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Признак оплаты заказа, true если заказ оплачен, false если нет #### public getPaymentMethod() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null ```php public getPaymentMethod() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null ``` **Summary** Возвращает используемый способ проведения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null - Способ проведения платежа #### public getReceiptRegistration() : string|null ```php public getReceiptRegistration() : string|null ``` **Summary** Возвращает состояние регистрации фискального чека. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Состояние регистрации фискального чека #### public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ```php public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ``` **Summary** Возвращает получателя платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\Payment\RecipientInterface - Получатель платежа или null, если получатель не задан #### public getRefundable() : bool ```php public getRefundable() : bool ``` **Summary** Проверяет возможность провести возврат по API. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Возможность провести возврат по API, true если есть, false если нет #### public getRefundedAmount() : \YooKassa\Model\AmountInterface|null ```php public getRefundedAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму возвращенных средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма возвращенных средств платежа #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает состояние платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Текущее состояние платежа #### public getTest() : bool ```php public getTest() : bool ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Признак тестовой операции #### public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface ```php public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает массив распределения денег между магазинами. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface - Массив распределения денег #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма платежа | **Returns:** self - #### public setAuthorizationDetails() : self ```php public setAuthorizationDetails(\YooKassa\Model\Payment\AuthorizationDetailsInterface|array|null $authorization_details = null) : self ``` **Summary** Устанавливает данные об авторизации платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\AuthorizationDetailsInterface OR array OR null | authorization_details | Данные об авторизации платежа | **Returns:** self - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\CancellationDetailsInterface|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\CancellationDetailsInterface OR array OR null | cancellation_details | Комментарий к статусу canceled | **Returns:** self - #### public setCapturedAt() : self ```php public setCapturedAt(\DateTime|string|null $captured_at = null) : self ``` **Summary** Устанавливает время подтверждения платежа магазином **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | captured_at | Время подтверждения платежа магазином | **Returns:** self - #### public setConfirmation() : self ```php public setConfirmation(\YooKassa\Model\Payment\Confirmation\AbstractConfirmation|array|null $confirmation = null) : self ``` **Summary** Устанавливает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\Confirmation\AbstractConfirmation OR array OR null | confirmation | Способ подтверждения платежа | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания заказа | **Returns:** self - #### public setDeal() : self ```php public setDeal(null|array|\YooKassa\Model\Deal\PaymentDealInfo $deal = null) : self ``` **Summary** Устанавливает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\PaymentDealInfo | deal | Данные о сделке, в составе которой проходит платеж | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | | **Returns:** self - #### public setExpiresAt() : self ```php public setExpiresAt(\DateTime|string|null $expires_at = null) : self ``` **Summary** Устанавливает время до которого можно бесплатно отменить или подтвердить платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at | Время, до которого можно бесплатно отменить или подтвердить платеж | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор платежа | **Returns:** self - #### public setIncomeAmount() : self ```php public setIncomeAmount(\YooKassa\Model\AmountInterface|array|null $income_amount = null) : self ``` **Summary** Устанавливает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | income_amount | | **Returns:** self - #### public setMerchantCustomerId() : self ```php public setMerchantCustomerId(string|null $merchant_customer_id = null) : self ``` **Summary** Устанавливает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | merchant_customer_id | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает метаданные платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Метаданные платежа указанные мерчантом | **Returns:** self - #### public setPaid() : self ```php public setPaid(bool $paid) : self ``` **Summary** Устанавливает флаг оплаты заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | paid | Признак оплаты заказа | **Returns:** self - #### public setPaymentMethod() : self ```php public setPaymentMethod(\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|array|null $payment_method) : self ``` **Summary** Устанавливает используемый способ проведения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod OR array OR null | payment_method | Способ проведения платежа | **Returns:** self - #### public setReceiptRegistration() : self ```php public setReceiptRegistration(string|null $receipt_registration = null) : self ``` **Summary** Устанавливает состояние регистрации фискального чека **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | receipt_registration | Состояние регистрации фискального чека | **Returns:** self - #### public setRecipient() : self ```php public setRecipient(\YooKassa\Model\Payment\RecipientInterface|array|null $recipient = null) : self ``` **Summary** Устанавливает получателя платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\RecipientInterface OR array OR null | recipient | Объект с информацией о получателе платежа | **Returns:** self - #### public setRefundable() : self ```php public setRefundable(bool $refundable) : self ``` **Summary** Устанавливает возможность провести возврат по API. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | refundable | Возможность провести возврат по API | **Returns:** self - #### public setRefundedAmount() : self ```php public setRefundedAmount(\YooKassa\Model\AmountInterface|array|null $refunded_amount = null) : self ``` **Summary** Устанавливает сумму возвращенных средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | refunded_amount | Сумма возвращенных средств платежа | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус платежа | **Returns:** self - #### public setTest() : self ```php public setTest(bool $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | test | Признак тестовой операции | **Returns:** self - #### public setTransfers() : self ```php public setTransfers(\YooKassa\Common\ListObjectInterface|array|null $transfers = null) : self ``` **Summary** Устанавливает массив распределения денег между магазинами. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | transfers | Массив распределения денег | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md000064400000063602150364342670024324 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentsRequestBuilder ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель PaymentsRequestBuilder. **Description:** Класс билдера объекта запроса для получения списка платежей магазина, передаваемого в методы клиента API. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$currentObject](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#property_currentObject) | | Инстанс собираемого запроса. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. | | public | [build()](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#method_build) | | Собирает и возвращает объект запроса списка платежей магазина. | | public | [setCapturedAtGt()](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#method_setCapturedAtGt) | | Устанавливает дату подтверждения от которой выбираются платежи. | | public | [setCapturedAtGte()](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#method_setCapturedAtGte) | | Устанавливает дату подтверждения от которой выбираются платежи. | | public | [setCapturedAtLt()](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#method_setCapturedAtLt) | | Устанавливает дату подтверждения до которой выбираются платежи. | | public | [setCapturedAtLte()](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#method_setCapturedAtLte) | | Устанавливает дату подтверждения до которой выбираются платежи. | | public | [setCreatedAtGt()](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#method_setCreatedAtGt) | | Устанавливает дату создания от которой выбираются платежи. | | public | [setCreatedAtGte()](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#method_setCreatedAtGte) | | Устанавливает дату создания от которой выбираются платежи. | | public | [setCreatedAtLt()](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#method_setCreatedAtLt) | | Устанавливает дату создания до которой выбираются платежи. | | public | [setCreatedAtLte()](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#method_setCreatedAtLte) | | Устанавливает дату создания до которой выбираются платежи. | | public | [setCursor()](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#method_setCursor) | | Устанавливает страница выдачи результатов. | | public | [setLimit()](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#method_setLimit) | | Устанавливает ограничение количества объектов платежа. | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива. | | public | [setPaymentMethod()](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#method_setPaymentMethod) | | Устанавливает платежный метод выбираемых платежей. | | public | [setStatus()](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#method_setStatus) | | Устанавливает статус выбираемых платежей. | | protected | [initCurrentObject()](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md#method_initCurrentObject) | | Возвращает новый объект запроса для получения списка платежей, который в дальнейшем будет собираться в билдере. | --- ### Details * File: [lib/Request/Payments/PaymentsRequestBuilder.php](../../lib/Request/Payments/PaymentsRequestBuilder.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) * \YooKassa\Request\Payments\PaymentsRequestBuilder * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### protected $currentObject : ?\YooKassa\Common\AbstractRequestInterface --- **Summary** Инстанс собираемого запроса. **Type:** AbstractRequestInterface Собираемый объект запроса списка платежей магазина **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public build() : \YooKassa\Request\Payments\PaymentsRequest ```php public build(null|array $options = null) : \YooKassa\Request\Payments\PaymentsRequest ``` **Summary** Собирает и возвращает объект запроса списка платежей магазина. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array | options | Массив с настройками запроса | **Returns:** \YooKassa\Request\Payments\PaymentsRequest - Инстанс объекта запроса к API для получения списка платежей магазина #### public setCapturedAtGt() : \YooKassa\Request\Payments\PaymentsRequestBuilder ```php public setCapturedAtGt(null|\DateTime|int|string $value) : \YooKassa\Request\Payments\PaymentsRequestBuilder ``` **Summary** Устанавливает дату подтверждения от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, до (включительно) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Payments\PaymentsRequestBuilder - Инстанс текущего билдера #### public setCapturedAtGte() : \YooKassa\Request\Payments\PaymentsRequestBuilder ```php public setCapturedAtGte(null|\DateTime|int|string $value) : \YooKassa\Request\Payments\PaymentsRequestBuilder ``` **Summary** Устанавливает дату подтверждения от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время подтверждения, от (включительно) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Payments\PaymentsRequestBuilder - Инстанс текущего билдера #### public setCapturedAtLt() : \YooKassa\Request\Payments\PaymentsRequestBuilder ```php public setCapturedAtLt(null|\DateTime|int|string $value) : \YooKassa\Request\Payments\PaymentsRequestBuilder ``` **Summary** Устанавливает дату подтверждения до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время подтверждения, до (включительно) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Payments\PaymentsRequestBuilder - Инстанс текущего билдера #### public setCapturedAtLte() : \YooKassa\Request\Payments\PaymentsRequestBuilder ```php public setCapturedAtLte(null|\DateTime|int|string $value) : \YooKassa\Request\Payments\PaymentsRequestBuilder ``` **Summary** Устанавливает дату подтверждения до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время подтверждения, до (включительно) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Payments\PaymentsRequestBuilder - Инстанс текущего билдера #### public setCreatedAtGt() : \YooKassa\Request\Payments\PaymentsRequestBuilder ```php public setCreatedAtGt(null|\DateTime|int|string $value) : \YooKassa\Request\Payments\PaymentsRequestBuilder ``` **Summary** Устанавливает дату создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, от (не включая) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Payments\PaymentsRequestBuilder - Инстанс текущего билдера #### public setCreatedAtGte() : \YooKassa\Request\Payments\PaymentsRequestBuilder ```php public setCreatedAtGte(null|\DateTime|int|string $value) : \YooKassa\Request\Payments\PaymentsRequestBuilder ``` **Summary** Устанавливает дату создания от которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, от (включительно) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Payments\PaymentsRequestBuilder - Инстанс текущего билдера #### public setCreatedAtLt() : \YooKassa\Request\Payments\PaymentsRequestBuilder ```php public setCreatedAtLt(null|\DateTime|int|string $value) : \YooKassa\Request\Payments\PaymentsRequestBuilder ``` **Summary** Устанавливает дату создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, до (не включая) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Payments\PaymentsRequestBuilder - Инстанс текущего билдера #### public setCreatedAtLte() : \YooKassa\Request\Payments\PaymentsRequestBuilder ```php public setCreatedAtLte(null|\DateTime|int|string $value) : \YooKassa\Request\Payments\PaymentsRequestBuilder ``` **Summary** Устанавливает дату создания до которой выбираются платежи. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, до (включительно) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** \YooKassa\Request\Payments\PaymentsRequestBuilder - Инстанс текущего билдера #### public setCursor() : \YooKassa\Request\Payments\PaymentsRequestBuilder ```php public setCursor(null|string $value) : \YooKassa\Request\Payments\PaymentsRequestBuilder ``` **Summary** Устанавливает страница выдачи результатов. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | value | Страница выдачи результатов или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод была передана не строка | **Returns:** \YooKassa\Request\Payments\PaymentsRequestBuilder - Инстанс текущего билдера #### public setLimit() : \YooKassa\Request\Payments\PaymentsRequestBuilder ```php public setLimit(string|int|null $value) : \YooKassa\Request\Payments\PaymentsRequestBuilder ``` **Summary** Устанавливает ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR int OR null | value | Ограничение количества объектов платежа или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод было передана не целое число | **Returns:** \YooKassa\Request\Payments\PaymentsRequestBuilder - Инстанс текущего билдера #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(iterable|null $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable OR null | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### public setPaymentMethod() : \YooKassa\Request\Payments\PaymentsRequestBuilder ```php public setPaymentMethod(string|null $value) : \YooKassa\Request\Payments\PaymentsRequestBuilder ``` **Summary** Устанавливает платежный метод выбираемых платежей. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Платежный метод выбираемых платежей или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если переданное значение не является валидным статусом | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод была передана не строка | **Returns:** \YooKassa\Request\Payments\PaymentsRequestBuilder - Инстанс текущего билдера #### public setStatus() : \YooKassa\Request\Payments\PaymentsRequestBuilder ```php public setStatus(string|null $value) : \YooKassa\Request\Payments\PaymentsRequestBuilder ``` **Summary** Устанавливает статус выбираемых платежей. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Статус выбираемых платежей или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если переданное значение не является валидным статусом | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод была передана не строка | **Returns:** \YooKassa\Request\Payments\PaymentsRequestBuilder - Инстанс текущего билдера #### protected initCurrentObject() : \YooKassa\Request\Payments\PaymentsRequest ```php protected initCurrentObject() : \YooKassa\Request\Payments\PaymentsRequest ``` **Summary** Возвращает новый объект запроса для получения списка платежей, который в дальнейшем будет собираться в билдере. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestBuilder](../classes/YooKassa-Request-Payments-PaymentsRequestBuilder.md) **Returns:** \YooKassa\Request\Payments\PaymentsRequest - Объект запроса списка платежей магазина --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Notification-NotificationDealClosed.md000064400000055414150364342670024452 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Notification\NotificationDealClosed ### Namespace: [\YooKassa\Model\Notification](../namespaces/yookassa-model-notification.md) --- **Summary:** Класс объекта, присылаемого API при изменении статуса сделки на "closed". --- ### Examples Пример скрипта обработки уведомления ```php require_once '../vendor/autoload.php'; try { $source = file_get_contents('php://input'); $data = json_decode($source, true); $factory = new \YooKassa\Model\Notification\NotificationFactory(); $notificationObject = $factory->factory($data); $responseObject = $notificationObject->getObject(); $client = new \YooKassa\Client(); if (!$client->isNotificationIPTrusted($_SERVER['REMOTE_ADDR'])) { header('HTTP/1.1 400 Something went wrong'); exit; } if (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_CANCELED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::REFUND_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'refundId' => $responseObject->getId(), 'refundStatus' => $responseObject->getStatus(), 'paymentId' => $responseObject->getPaymentId(), ]; // ... // Специфичная логика } else { header('HTTP/1.1 400 Something went wrong'); exit; } // Специфичная логика // ... $client->setAuth('xxxxxx', 'test_XXXXXXX'); // Получим актуальную информацию о платеже if ($paymentInfo = $client->getPaymentInfo($someData['paymentId'])) { $paymentStatus = $paymentInfo->getStatus(); // Специфичная логика // ... } else { header('HTTP/1.1 400 Something went wrong'); exit; } } catch (Exception $e) { header('HTTP/1.1 400 Something went wrong'); exit; } ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_event) | | Тип события | | public | [$object](../classes/YooKassa-Model-Notification-NotificationDealClosed.md#property_object) | | Объект с информацией о сделке | | public | [$type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_type) | | Тип уведомления в виде строки | | protected | [$_event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__event) | | | | protected | [$_type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Model-Notification-NotificationDealClosed.md#method_fromArray) | | Конструктор объекта нотификации. | | public | [getEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getEvent) | | Возвращает тип события. | | public | [getObject()](../classes/YooKassa-Model-Notification-NotificationDealClosed.md#method_getObject) | | Возвращает объект с информацией о сделке, уведомление о которой хранится в текущем объекте. | | public | [getType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getType) | | Возвращает тип уведомления. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setObject()](../classes/YooKassa-Model-Notification-NotificationDealClosed.md#method_setObject) | | Устанавливает объект с информацией о сделке, уведомление о которой хранится в текущем объекте. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setEvent) | | Устанавливает тип события. | | protected | [setType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setType) | | Устанавливает тип уведомления. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Notification/NotificationDealClosed.php](../../lib/Model/Notification/NotificationDealClosed.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) * \YooKassa\Model\Notification\NotificationDealClosed * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $event : string --- ***Description*** Тип события **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### public $object : \YooKassa\Model\Deal\DealInterface --- ***Description*** Объект с информацией о сделке **Type:** DealInterface **Details:** #### public $type : string --- ***Description*** Тип уведомления в виде строки **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### protected $_event : ?string --- **Type:** ?string Тип произошедшего события **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) #### protected $_type : ?string --- **Type:** ?string Тип уведомления **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array $sourceArray) : void ``` **Summary** Конструктор объекта нотификации. **Description** Инициализирует текущий объект из ассоциативного массива, который просто путём JSON десериализации получен из тела пришедшего запроса. При конструировании проверяется валидность типа передаваемого уведомления, если передать уведомление не того типа, будет сгенерировано исключение типа {@link} **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationDealClosed](../classes/YooKassa-Model-Notification-NotificationDealClosed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | sourceArray | Ассоциативный массив с информацией об уведомлении | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если значение типа нотификации или события не равны "notification" и "deal.closed" соответственно, что может говорить о том, что переданные в конструктор данные не являются уведомлением нужного типа. | **Returns:** void - #### public getEvent() : string|null ```php public getEvent() : string|null ``` **Summary** Возвращает тип события. **Description** Тип события - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип события #### public getObject() : \YooKassa\Model\Deal\DealInterface ```php public getObject() : \YooKassa\Model\Deal\DealInterface ``` **Summary** Возвращает объект с информацией о сделке, уведомление о которой хранится в текущем объекте. **Description** Так как нотификация может быть сгенерирована и поставлена в очередь на отправку гораздо раньше, чем она будет получена на сайте, то опираться на статус пришедшей сделки не стоит, лучше запросить текущую информацию о сделке у API. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationDealClosed](../classes/YooKassa-Model-Notification-NotificationDealClosed.md) **Returns:** \YooKassa\Model\Deal\DealInterface - Объект с информацией о сделке #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип уведомления. **Description** Тип уведомления - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип уведомления в виде строки #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setObject() : self ```php public setObject(\YooKassa\Model\Deal\DealInterface|array $object) : self ``` **Summary** Устанавливает объект с информацией о сделке, уведомление о которой хранится в текущем объекте. **Details:** * Inherited From: [\YooKassa\Model\Notification\NotificationDealClosed](../classes/YooKassa-Model-Notification-NotificationDealClosed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Deal\DealInterface OR array | object | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setEvent() : self ```php protected setEvent(string|null $event) : self ``` **Summary** Устанавливает тип события. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | event | Тип события | **Returns:** self - #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип уведомления. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип уведомления | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md000064400000034305150364342670025742 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Request\Payments\PaymentData\AbstractPaymentData ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель AbstractPaymentData. **Description:** Данные для оплаты конкретным [способом](/developers/payment-acceptance/integration-scenarios/manual-integration/basics#integration-options) (`payment_method`). Вы можете не передавать этот объект в запросе. В этом случае пользователь будет выбирать способ оплаты на стороне ЮKassa. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setType()](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md#method_setType) | | Устанавливает тип метода оплаты. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/AbstractPaymentData.php](../../lib/Request/Payments/PaymentData/AbstractPaymentData.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\Payments\PaymentData\AbstractPaymentData * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** #### protected $_type : ?string --- **Type:** ?string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\AbstractPaymentData](../classes/YooKassa-Request-Payments-PaymentData-AbstractPaymentData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-PayoutSelfEmployed.md000064400000034000150364342670022515 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payout\PayoutSelfEmployed ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель PayoutSelfEmployed. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_ID](../classes/YooKassa-Model-Payout-PayoutSelfEmployed.md#constant_MAX_LENGTH_ID) | | | | public | [MIN_LENGTH_ID](../classes/YooKassa-Model-Payout-PayoutSelfEmployed.md#constant_MIN_LENGTH_ID) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payout-PayoutSelfEmployed.md#property_id) | | Идентификатор самозанятого в ЮKassa. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payout-PayoutSelfEmployed.md#method_getId) | | Возвращает идентификатор самозанятого в ЮKassa. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payout-PayoutSelfEmployed.md#method_setId) | | Устанавливает идентификатор самозанятого в ЮKassa. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payout/PayoutSelfEmployed.php](../../lib/Model/Payout/PayoutSelfEmployed.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payout\PayoutSelfEmployed * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_ID ```php MAX_LENGTH_ID = 50 : int ``` ###### MIN_LENGTH_ID ```php MIN_LENGTH_ID = 36 : int ``` --- ## Properties #### public $id : string --- ***Description*** Идентификатор самозанятого в ЮKassa. **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор самозанятого в ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutSelfEmployed](../classes/YooKassa-Model-Payout-PayoutSelfEmployed.md) **Returns:** string|null - Идентификатор самозанятого в ЮKassa #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор самозанятого в ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutSelfEmployed](../classes/YooKassa-Model-Payout-PayoutSelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор самозанятого в ЮKassa. | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-Locale.md000064400000010413150364342670021033 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\Locale ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель Locale. **Description:** Язык интерфейса, писем и смс, которые будет видеть или получать пользователь. Возможные значения: - `ru_RU` - Русский - `en_US` - English --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [RUSSIAN](../classes/YooKassa-Request-Payments-Locale.md#constant_RUSSIAN) | | Русский | | public | [ENGLISH](../classes/YooKassa-Request-Payments-Locale.md#constant_ENGLISH) | | English | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Request-Payments-Locale.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Request/Payments/Locale.php](../../lib/Request/Payments/Locale.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Request\Payments\Locale * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### RUSSIAN Русский ```php RUSSIAN = 'ru_RU' ``` ###### ENGLISH English ```php ENGLISH = 'en_US' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-CancellationDetailsPartyCode.md000064400000012423150364342670024601 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\CancellationDetailsPartyCode ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Класс, представляющий модель CancellationDetailsPartyCode. **Description:** Возможные инициаторы отмены платежа. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MERCHANT](../classes/YooKassa-Model-Payment-CancellationDetailsPartyCode.md#constant_MERCHANT) | | Продавец товаров и услуг. | | public | [YOO_MONEY](../classes/YooKassa-Model-Payment-CancellationDetailsPartyCode.md#constant_YOO_MONEY) | | ЮKassa. | | public | [YANDEX_CHECKOUT](../classes/YooKassa-Model-Payment-CancellationDetailsPartyCode.md#constant_YANDEX_CHECKOUT) | *deprecated* | | | public | [PAYMENT_NETWORK](../classes/YooKassa-Model-Payment-CancellationDetailsPartyCode.md#constant_PAYMENT_NETWORK) | | «Внешние» участники платежного процесса (например, эмитент, сторонний платежный сервис). | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payment-CancellationDetailsPartyCode.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payment/CancellationDetailsPartyCode.php](../../lib/Model/Payment/CancellationDetailsPartyCode.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payment\CancellationDetailsPartyCode * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MERCHANT Продавец товаров и услуг. ```php MERCHANT = 'merchant' ``` ###### YOO_MONEY ЮKassa. ```php YOO_MONEY = 'yoo_money' ``` ###### ~~YANDEX_CHECKOUT~~ ```php YANDEX_CHECKOUT = 'yandex_checkout' ``` **deprecated** Устарел. Оставлен для обратной совместимости ###### PAYMENT_NETWORK «Внешние» участники платежного процесса (например, эмитент, сторонний платежный сервис). ```php PAYMENT_NETWORK = 'payment_network' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-CreateCaptureRequest.md000064400000104312150364342670023736 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\CreateCaptureRequest ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель CreateCaptureRequest. **Description:** Класс объекта запроса к API на подтверждение оплаты. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$airline](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property_airline) | | Объект с данными для продажи авиабилетов | | public | [$amount](../classes/YooKassa-Request-Payments-CreateCaptureRequest.md#property_amount) | | Подтверждаемая сумма оплаты | | public | [$amount](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property_amount) | | Сумма | | public | [$deal](../classes/YooKassa-Request-Payments-CreateCaptureRequest.md#property_deal) | | Данные о сделке, в составе которой проходит платеж | | public | [$receipt](../classes/YooKassa-Request-Payments-CreateCaptureRequest.md#property_receipt) | | Данные фискального чека 54-ФЗ | | public | [$receipt](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property_receipt) | | Данные фискального чека 54-ФЗ | | public | [$transfers](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property_transfers) | | Данные о распределении платежа между магазинами | | protected | [$_airline](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property__airline) | | | | protected | [$_amount](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property__amount) | | | | protected | [$_receipt](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property__receipt) | | | | protected | [$_transfers](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#property__transfers) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [builder()](../classes/YooKassa-Request-Payments-CreateCaptureRequest.md#method_builder) | | Возвращает билдер объектов запросов на подтверждение оплаты. | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAirline()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_getAirline) | | Возвращает данные авиабилетов. | | public | [getAmount()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_getAmount) | | Возвращает сумму оплаты. | | public | [getDeal()](../classes/YooKassa-Request-Payments-CreateCaptureRequest.md#method_getDeal) | | Возвращает данные о сделке, в составе которой проходит платеж. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [getReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_getReceipt) | | Возвращает чек, если он есть. | | public | [getTransfers()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_getTransfers) | | Возвращает данные о распределении денег — сколько и в какой магазин нужно перевести. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasAirline()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_hasAirline) | | Проверяет, были ли установлены данные авиабилетов. | | public | [hasAmount()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_hasAmount) | | Проверяет, была ли установлена сумма оплаты. | | public | [hasDeal()](../classes/YooKassa-Request-Payments-CreateCaptureRequest.md#method_hasDeal) | | Проверяет, были ли установлены данные о сделке. | | public | [hasReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_hasReceipt) | | Проверяет наличие чека. | | public | [hasTransfers()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_hasTransfers) | | Проверяет наличие данных о распределении денег. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [removeReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_removeReceipt) | | Удаляет чек из запроса. | | public | [setAirline()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_setAirline) | | Устанавливает данные авиабилетов. | | public | [setAmount()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_setAmount) | | Устанавливает сумму оплаты. | | public | [setDeal()](../classes/YooKassa-Request-Payments-CreateCaptureRequest.md#method_setDeal) | | Устанавливает данные о сделке, в составе которой проходит платеж. | | public | [setReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_setReceipt) | | Устанавливает чек. | | public | [setTransfers()](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md#method_setTransfers) | | Устанавливает transfers (массив распределения денег между магазинами). | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | public | [validate()](../classes/YooKassa-Request-Payments-CreateCaptureRequest.md#method_validate) | | Валидирует объект запроса. | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_setValidationError) | | Устанавливает ошибку валидации. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/CreateCaptureRequest.php](../../lib/Request/Payments/CreateCaptureRequest.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) * [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) * \YooKassa\Request\Payments\CreateCaptureRequest * Implements: * [\YooKassa\Request\Payments\CreateCaptureRequestInterface](../classes/YooKassa-Request-Payments-CreateCaptureRequestInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $airline : \YooKassa\Request\Payments\AirlineInterface|null --- ***Description*** Объект с данными для продажи авиабилетов **Type:** AirlineInterface|null **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Подтверждаемая сумма оплаты **Type:** AmountInterface **Details:** #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) #### public $deal : \YooKassa\Model\Deal\CaptureDealData --- ***Description*** Данные о сделке, в составе которой проходит платеж **Type:** CaptureDealData **Details:** #### public $receipt : \YooKassa\Model\Receipt\ReceiptInterface --- ***Description*** Данные фискального чека 54-ФЗ **Type:** ReceiptInterface **Details:** #### public $receipt : \YooKassa\Model\Receipt\ReceiptInterface|null --- ***Description*** Данные фискального чека 54-ФЗ **Type:** ReceiptInterface|null **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) #### public $transfers : \YooKassa\Common\ListObjectInterface|\YooKassa\Request\Payments\TransferDataInterface[]|null --- ***Description*** Данные о распределении платежа между магазинами **Type:** TransferDataInterface[]|null **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) #### protected $_airline : ?\YooKassa\Request\Payments\AirlineInterface --- **Type:** AirlineInterface Объект с данными для продажи авиабилетов **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface Сумма оплаты **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) #### protected $_receipt : ?\YooKassa\Model\Receipt\ReceiptInterface --- **Type:** ReceiptInterface Данные фискального чека 54-ФЗ **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) #### protected $_transfers : ?\YooKassa\Common\ListObject --- **Type:** ListObject **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public builder() : \YooKassa\Request\Payments\CreateCaptureRequestBuilder ```php Static public builder() : \YooKassa\Request\Payments\CreateCaptureRequestBuilder ``` **Summary** Возвращает билдер объектов запросов на подтверждение оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequest](../classes/YooKassa-Request-Payments-CreateCaptureRequest.md) **Returns:** \YooKassa\Request\Payments\CreateCaptureRequestBuilder - Инстанс билдера #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAirline() : null|\YooKassa\Request\Payments\AirlineInterface ```php public getAirline() : null|\YooKassa\Request\Payments\AirlineInterface ``` **Summary** Возвращает данные авиабилетов. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** null|\YooKassa\Request\Payments\AirlineInterface - Данные авиабилетов #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма оплаты #### public getDeal() : null|\YooKassa\Model\Deal\CaptureDealData ```php public getDeal() : null|\YooKassa\Model\Deal\CaptureDealData ``` **Summary** Возвращает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequest](../classes/YooKassa-Request-Payments-CreateCaptureRequest.md) **Returns:** null|\YooKassa\Model\Deal\CaptureDealData - Данные о сделке, в составе которой проходит платеж #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string|null - Последняя произошедшая ошибка валидации #### public getReceipt() : null|\YooKassa\Model\Receipt\ReceiptInterface ```php public getReceipt() : null|\YooKassa\Model\Receipt\ReceiptInterface ``` **Summary** Возвращает чек, если он есть. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** null|\YooKassa\Model\Receipt\ReceiptInterface - Данные фискального чека 54-ФЗ или null, если чека нет #### public getTransfers() : \YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface ```php public getTransfers() : \YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает данные о распределении денег — сколько и в какой магазин нужно перевести. **Description** Присутствует, если вы используете решение ЮKassa для платформ. (https://yookassa.ru/developers/special-solutions/checkout-for-platforms/basics). **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** \YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface - Данные о распределении денег #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasAirline() : bool ```php public hasAirline() : bool ``` **Summary** Проверяет, были ли установлены данные авиабилетов. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** bool - #### public hasAmount() : bool ```php public hasAmount() : bool ``` **Summary** Проверяет, была ли установлена сумма оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** bool - True если сумма оплаты была установлена, false если нет #### public hasDeal() : bool ```php public hasDeal() : bool ``` **Summary** Проверяет, были ли установлены данные о сделке. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequest](../classes/YooKassa-Request-Payments-CreateCaptureRequest.md) **Returns:** bool - True если данные о сделке были установлены, false если нет #### public hasReceipt() : bool ```php public hasReceipt() : bool ``` **Summary** Проверяет наличие чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** bool - True если чек есть, false если нет #### public hasTransfers() : bool ```php public hasTransfers() : bool ``` **Summary** Проверяет наличие данных о распределении денег. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** bool - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public removeReceipt() : self ```php public removeReceipt() : self ``` **Summary** Удаляет чек из запроса. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) **Returns:** self - #### public setAirline() : \YooKassa\Common\AbstractRequestInterface ```php public setAirline(\YooKassa\Request\Payments\AirlineInterface|array|null $airline) : \YooKassa\Common\AbstractRequestInterface ``` **Summary** Устанавливает данные авиабилетов. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Payments\AirlineInterface OR array OR null | airline | Данные авиабилетов | **Returns:** \YooKassa\Common\AbstractRequestInterface - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|string $amount = null) : self ``` **Summary** Устанавливает сумму оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR string | amount | Сумма оплаты | **Returns:** self - #### public setDeal() : self ```php public setDeal(null|array|\YooKassa\Model\Deal\CaptureDealData $deal) : self ``` **Summary** Устанавливает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequest](../classes/YooKassa-Request-Payments-CreateCaptureRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\CaptureDealData | deal | Данные о сделке, в составе которой проходит платеж | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданные данные не удалось интерпретировать как метаданные платежа | **Returns:** self - #### public setReceipt() : self ```php public setReceipt(null|array|\YooKassa\Model\Receipt\ReceiptInterface $receipt) : self ``` **Summary** Устанавливает чек. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Receipt\ReceiptInterface | receipt | Инстанс чека или null для удаления информации о чеке | **Returns:** self - #### public setTransfers() : self ```php public setTransfers(\YooKassa\Common\ListObjectInterface|array|null $transfers = null) : self ``` **Summary** Устанавливает transfers (массив распределения денег между магазинами). **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequest](../classes/YooKassa-Request-Payments-AbstractPaymentRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | transfers | Массив распределения денег | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public validate() : bool ```php public validate() : bool ``` **Summary** Валидирует объект запроса. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreateCaptureRequest](../classes/YooKassa-Request-Payments-CreateCaptureRequest.md) **Returns:** bool - True если запрос валиден и его можно отправить в API, false если нет #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setValidationError() : void ```php protected setValidationError(string $value) : void ``` **Summary** Устанавливает ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** void - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md000064400000037420150364342670025632 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Model\Payment\Confirmation\AbstractConfirmation ### Namespace: [\YooKassa\Model\Payment\Confirmation](../namespaces/yookassa-model-payment-confirmation.md) --- **Summary:** Класс, представляющий модель AbstractConfirmation. **Description:** Выбранный способ подтверждения платежа. Присутствует, когда платеж ожидает подтверждения от пользователя. Подробнее о [сценариях подтверждения](/developers/payment-acceptance/getting-started/payment-process#user-confirmation) --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#property_type) | | Тип подтверждения платежа | | protected | [$_type](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#property__type) | | Тип подтверждения платежа. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getConfirmationData()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationData) | | | | public | [getConfirmationToken()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationToken) | | | | public | [getConfirmationUrl()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationUrl) | | | | public | [getType()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getType) | | Возвращает тип подтверждения платежа. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setType()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_setType) | | Устанавливает тип подтверждения платежа | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/Confirmation/AbstractConfirmation.php](../../lib/Model/Payment/Confirmation/AbstractConfirmation.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payment\Confirmation\AbstractConfirmation * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип подтверждения платежа **Type:** string **Details:** #### protected $_type : ?string --- **Summary** Тип подтверждения платежа. **Type:** ?string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getConfirmationData() ```php public getConfirmationData() ``` **Description** Для ConfirmationQr **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationToken() ```php public getConfirmationToken() ``` **Description** Для ConfirmationEmbedded **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationUrl() ```php public getConfirmationUrl() ``` **Description** Для ConfirmationRedirect **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getType() : ?string ```php public getType() : ?string ``` **Summary** Возвращает тип подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** ?string - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип подтверждения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип подтверждения платежа | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-Passenger.md000064400000037205150364342670021573 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\Passenger ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель PaymentsRequest. **Description:** Данные пассажира. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$first_name](../classes/YooKassa-Request-Payments-Passenger.md#property_first_name) | | Имя пассажира | | public | [$firstName](../classes/YooKassa-Request-Payments-Passenger.md#property_firstName) | | Имя пассажира | | public | [$last_name](../classes/YooKassa-Request-Payments-Passenger.md#property_last_name) | | Фамилия пассажира | | public | [$lastName](../classes/YooKassa-Request-Payments-Passenger.md#property_lastName) | | Фамилия пассажира | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getFirstName()](../classes/YooKassa-Request-Payments-Passenger.md#method_getFirstName) | | Возвращает first_name. | | public | [getLastName()](../classes/YooKassa-Request-Payments-Passenger.md#method_getLastName) | | Возвращает last_name. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setFirstName()](../classes/YooKassa-Request-Payments-Passenger.md#method_setFirstName) | | Устанавливает first_name. | | public | [setLastName()](../classes/YooKassa-Request-Payments-Passenger.md#method_setLastName) | | Устанавливает last_name. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/Passenger.php](../../lib/Request/Payments/Passenger.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\Payments\Passenger * Implements: * [\YooKassa\Request\Payments\PassengerInterface](../classes/YooKassa-Request-Payments-PassengerInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $first_name : string --- ***Description*** Имя пассажира **Type:** string **Details:** #### public $firstName : string --- ***Description*** Имя пассажира **Type:** string **Details:** #### public $last_name : string --- ***Description*** Фамилия пассажира **Type:** string **Details:** #### public $lastName : string --- ***Description*** Фамилия пассажира **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getFirstName() : string|null ```php public getFirstName() : string|null ``` **Summary** Возвращает first_name. **Details:** * Inherited From: [\YooKassa\Request\Payments\Passenger](../classes/YooKassa-Request-Payments-Passenger.md) **Returns:** string|null - #### public getLastName() : string|null ```php public getLastName() : string|null ``` **Summary** Возвращает last_name. **Details:** * Inherited From: [\YooKassa\Request\Payments\Passenger](../classes/YooKassa-Request-Payments-Passenger.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setFirstName() : self ```php public setFirstName(string|null $value = null) : self ``` **Summary** Устанавливает first_name. **Details:** * Inherited From: [\YooKassa\Request\Payments\Passenger](../classes/YooKassa-Request-Payments-Passenger.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Имя пассажира. Необходимо использовать латинские буквы, например SERGEI. | **Returns:** self - #### public setLastName() : self ```php public setLastName(string|null $value = null) : self ``` **Summary** Устанавливает last_name. **Details:** * Inherited From: [\YooKassa\Request\Payments\Passenger](../classes/YooKassa-Request-Payments-Passenger.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Фамилия пассажира. Необходимо использовать латинские буквы, например IVANOV. | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Notification-AbstractNotification.md000064400000050257150364342670024216 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Model\Notification\AbstractNotification ### Namespace: [\YooKassa\Model\Notification](../namespaces/yookassa-model-notification.md) --- **Summary:** Базовый класс уведомлений. --- ### Examples Пример скрипта обработки уведомления ```php require_once '../vendor/autoload.php'; try { $source = file_get_contents('php://input'); $data = json_decode($source, true); $factory = new \YooKassa\Model\Notification\NotificationFactory(); $notificationObject = $factory->factory($data); $responseObject = $notificationObject->getObject(); $client = new \YooKassa\Client(); if (!$client->isNotificationIPTrusted($_SERVER['REMOTE_ADDR'])) { header('HTTP/1.1 400 Something went wrong'); exit; } if (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_WAITING_FOR_CAPTURE === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::PAYMENT_CANCELED === $notificationObject->getEvent()) { $someData = [ 'paymentId' => $responseObject->getId(), 'paymentStatus' => $responseObject->getStatus(), ]; // Специфичная логика // ... } elseif (\YooKassa\Model\Notification\NotificationEventType::REFUND_SUCCEEDED === $notificationObject->getEvent()) { $someData = [ 'refundId' => $responseObject->getId(), 'refundStatus' => $responseObject->getStatus(), 'paymentId' => $responseObject->getPaymentId(), ]; // ... // Специфичная логика } else { header('HTTP/1.1 400 Something went wrong'); exit; } // Специфичная логика // ... $client->setAuth('xxxxxx', 'test_XXXXXXX'); // Получим актуальную информацию о платеже if ($paymentInfo = $client->getPaymentInfo($someData['paymentId'])) { $paymentStatus = $paymentInfo->getStatus(); // Специфичная логика // ... } else { header('HTTP/1.1 400 Something went wrong'); exit; } } catch (Exception $e) { header('HTTP/1.1 400 Something went wrong'); exit; } ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_event) | | Тип события | | public | [$type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property_type) | | Тип уведомления в виде строки | | protected | [$_event](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__event) | | | | protected | [$_type](../classes/YooKassa-Model-Notification-AbstractNotification.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getEvent) | | Возвращает тип события. | | public | [getObject()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getObject) | | Возвращает объект с информацией о платеже или возврате, уведомление о котором хранится в текущем объекте. | | public | [getType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_getType) | | Возвращает тип уведомления. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setEvent()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setEvent) | | Устанавливает тип события. | | protected | [setType()](../classes/YooKassa-Model-Notification-AbstractNotification.md#method_setType) | | Устанавливает тип уведомления. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Notification/AbstractNotification.php](../../lib/Model/Notification/AbstractNotification.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Notification\AbstractNotification * Implements: * [\YooKassa\Model\Notification\NotificationInterface](../classes/YooKassa-Model-Notification-NotificationInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $event : string --- ***Description*** Тип события **Type:** string **Details:** #### public $type : string --- ***Description*** Тип уведомления в виде строки **Type:** string **Details:** #### protected $_event : ?string --- **Type:** ?string Тип произошедшего события **Details:** #### protected $_type : ?string --- **Type:** ?string Тип уведомления **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getEvent() : string|null ```php public getEvent() : string|null ``` **Summary** Возвращает тип события. **Description** Тип события - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип события #### public getObject() : \YooKassa\Model\Payment\PaymentInterface|\YooKassa\Model\Refund\RefundInterface|\YooKassa\Model\Payout\PayoutInterface|\YooKassa\Model\Deal\DealInterface|null ```php Abstract public getObject() : \YooKassa\Model\Payment\PaymentInterface|\YooKassa\Model\Refund\RefundInterface|\YooKassa\Model\Payout\PayoutInterface|\YooKassa\Model\Deal\DealInterface|null ``` **Summary** Возвращает объект с информацией о платеже или возврате, уведомление о котором хранится в текущем объекте. **Description** Так как нотификация может быть сгенерирована и поставлена в очередь на отправку гораздо раньше, чем она будет получена на сайте, то опираться на статус пришедшего платежа не стоит, лучше запросить текущую информацию о платеже у API. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** \YooKassa\Model\Payment\PaymentInterface|\YooKassa\Model\Refund\RefundInterface|\YooKassa\Model\Payout\PayoutInterface|\YooKassa\Model\Deal\DealInterface|null - Объект с информацией о платеже #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип уведомления. **Description** Тип уведомления - одна из констант, указанных в перечислении {@link}. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) **Returns:** string|null - Тип уведомления в виде строки #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setEvent() : self ```php protected setEvent(string|null $event) : self ``` **Summary** Устанавливает тип события. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | event | Тип события | **Returns:** self - #### protected setType() : self ```php protected setType(string|null $type) : self ``` **Summary** Устанавливает тип уведомления. **Details:** * Inherited From: [\YooKassa\Model\Notification\AbstractNotification](../classes/YooKassa-Model-Notification-AbstractNotification.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип уведомления | **Returns:** self - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployed.md000064400000072275150364342670022442 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\SelfEmployed\SelfEmployed ### Namespace: [\YooKassa\Model\SelfEmployed](../namespaces/yookassa-model-selfemployed.md) --- **Summary:** Класс, представляющий модель SelfEmployed. **Description:** Объект самозанятого. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$confirmation](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_confirmation) | | Сценарий подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. | | public | [$created_at](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_created_at) | | Время создания объекта самозанятого. | | public | [$createdAt](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_createdAt) | | Время создания объекта самозанятого. | | public | [$id](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_id) | | Идентификатор самозанятого в ЮKassa. | | public | [$itn](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_itn) | | ИНН самозанятого. | | public | [$phone](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_phone) | | Телефон самозанятого, который привязан к личному кабинету в сервисе Мой налог. | | public | [$status](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_status) | | Статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков. | | public | [$test](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property_test) | | Признак тестовой операции. | | protected | [$_confirmation](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property__confirmation) | | Сценарий подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. | | protected | [$_created_at](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property__created_at) | | Время создания объекта самозанятого. | | protected | [$_id](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property__id) | | Идентификатор самозанятого в ЮKassa. | | protected | [$_itn](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property__itn) | | ИНН самозанятого. Формат: 12 цифр без пробелов. | | protected | [$_phone](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property__phone) | | Телефон самозанятого, который привязан к личному кабинету в сервисе Мой налог. | | protected | [$_status](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property__status) | | Статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков | | protected | [$_test](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#property__test) | | Признак тестовой операции | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getConfirmation()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_getConfirmation) | | Возвращает сценарий подтверждения. | | public | [getCreatedAt()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_getCreatedAt) | | Возвращает время создания объекта самозанятого. | | public | [getId()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_getId) | | Возвращает идентификатор самозанятого в ЮKassa. | | public | [getItn()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_getItn) | | Возвращает ИНН самозанятого. | | public | [getPhone()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_getPhone) | | Возвращает телефон самозанятого. | | public | [getStatus()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_getStatus) | | Возвращает статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков. | | public | [getTest()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setConfirmation()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_setConfirmation) | | Устанавливает сценарий подтверждения. | | public | [setCreatedAt()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_setCreatedAt) | | Устанавливает время создания объекта самозанятого. | | public | [setId()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_setId) | | Устанавливает идентификатор самозанятого в ЮKassa. | | public | [setItn()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_setItn) | | Устанавливает ИНН самозанятого. | | public | [setPhone()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_setPhone) | | Устанавливает телефон самозанятого. | | public | [setStatus()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_setStatus) | | Устанавливает статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков. | | public | [setTest()](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/SelfEmployed/SelfEmployed.php](../../lib/Model/SelfEmployed/SelfEmployed.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\SelfEmployed\SelfEmployed * Implements: * [\YooKassa\Model\SelfEmployed\SelfEmployedInterface](../classes/YooKassa-Model-SelfEmployed-SelfEmployedInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $confirmation : null|\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation --- ***Description*** Сценарий подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. **Type:** SelfEmployedConfirmation **Details:** #### public $created_at : \DateTime --- ***Description*** Время создания объекта самозанятого. **Type:** \DateTime **Details:** #### public $createdAt : \DateTime --- ***Description*** Время создания объекта самозанятого. **Type:** \DateTime **Details:** #### public $id : string --- ***Description*** Идентификатор самозанятого в ЮKassa. **Type:** string **Details:** #### public $itn : null|string --- ***Description*** ИНН самозанятого. **Type:** null|string **Details:** #### public $phone : null|string --- ***Description*** Телефон самозанятого, который привязан к личному кабинету в сервисе Мой налог. **Type:** null|string **Details:** #### public $status : string --- ***Description*** Статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков. **Type:** string **Details:** #### public $test : bool --- ***Description*** Признак тестовой операции. **Type:** bool **Details:** #### protected $_confirmation : ?\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation --- **Summary** Сценарий подтверждения пользователем заявки ЮMoney на получение прав для регистрации чеков в сервисе Мой налог. **Type:** SelfEmployedConfirmation **Details:** #### protected $_created_at : ?\DateTime --- **Summary** Время создания объекта самозанятого. ***Description*** Указывается по [UTC](https://ru.wikipedia.org/wiki/Всемирное_координированное_время) и передается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). Пример: ~`2017-11-03T11:52:31.827Z **Type:** DateTime **Details:** #### protected $_id : ?string --- **Summary** Идентификатор самозанятого в ЮKassa. **Type:** ?string **Details:** #### protected $_itn : ?string --- **Summary** ИНН самозанятого. Формат: 12 цифр без пробелов. **Type:** ?string **Details:** #### protected $_phone : ?string --- **Summary** Телефон самозанятого, который привязан к личному кабинету в сервисе Мой налог. **Type:** ?string **Details:** #### protected $_status : ?string --- **Summary** Статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков **Type:** ?string **Details:** #### protected $_test : ?bool --- **Summary** Признак тестовой операции **Type:** ?bool **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getConfirmation() : \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation|null ```php public getConfirmation() : \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation|null ``` **Summary** Возвращает сценарий подтверждения. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) **Returns:** \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation|null - Сценарий подтверждения #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания объекта самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) **Returns:** \DateTime|null - Время создания объекта самозанятого #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор самозанятого в ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) **Returns:** string|null - #### public getItn() : string|null ```php public getItn() : string|null ``` **Summary** Возвращает ИНН самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) **Returns:** string|null - #### public getPhone() : string|null ```php public getPhone() : string|null ``` **Summary** Возвращает телефон самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) **Returns:** string|null - Телефон самозанятого #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) **Returns:** string|null - #### public getTest() : bool ```php public getTest() : bool ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) **Returns:** bool - Признак тестовой операции #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setConfirmation() : $this ```php public setConfirmation(\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation|array|null $confirmation = null) : $this ``` **Summary** Устанавливает сценарий подтверждения. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\SelfEmployed\SelfEmployedConfirmation OR array OR null | confirmation | Сценарий подтверждения | **Returns:** $this - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания объекта самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания объекта самозанятого. | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор самозанятого в ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор самозанятого в ЮKassa. | **Returns:** self - #### public setItn() : self ```php public setItn(string|null $itn = null) : self ``` **Summary** Устанавливает ИНН самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | itn | ИНН самозанятого | **Returns:** self - #### public setPhone() : self ```php public setPhone(string|null $phone = null) : self ``` **Summary** Устанавливает телефон самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | phone | Телефон самозанятого | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус подключения самозанятого и выдачи ЮMoney прав на регистрацию чеков. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус подключения самозанятого | **Returns:** self - #### public setTest() : self ```php public setTest(bool|null $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployed](../classes/YooKassa-Model-SelfEmployed-SelfEmployed.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | test | Признак тестовой операции | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md000064400000133207150364342670025264 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\CreatePaymentRequestBuilder ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель CreatePaymentRequestBuilder. **Description:** Класс билдера объекта запроса на создание платежа, передаваемого в методы клиента API. --- ### Examples Пример использования билдера ```php try { $builder = \YooKassa\Request\Payments\CreatePaymentRequest::builder(); $builder->setAmount(100) ->setCurrency(\YooKassa\Model\CurrencyCode::RUB) ->setCapture(true) ->setDescription('Оплата заказа 112233') ->setMetadata([ 'cms_name' => 'yoo_api_test', 'order_id' => '112233', 'language' => 'ru', 'transaction_id' => '123-456-789', ]) ; // Устанавливаем страницу для редиректа после оплаты $builder->setConfirmation([ 'type' => \YooKassa\Model\Payment\ConfirmationType::REDIRECT, 'returnUrl' => 'https://merchant-site.ru/payment-return-page', ]); // Можем установить конкретный способ оплаты $builder->setPaymentMethodData(\YooKassa\Model\Payment\PaymentMethodType::BANK_CARD); // Составляем чек $builder->setReceiptEmail('john.doe@merchant.com'); $builder->setReceiptPhone('71111111111'); // Добавим товар $builder->addReceiptItem( 'Платок Gucci', 3000, 1.0, 2, 'full_payment', 'commodity' ); // Добавим доставку $builder->addReceiptShipping( 'Delivery/Shipping/Доставка', 100, 1, \YooKassa\Model\Receipt\PaymentMode::FULL_PAYMENT, \YooKassa\Model\Receipt\PaymentSubject::SERVICE ); // Можно добавить распределение денег по магазинам $builder->setTransfers([ [ 'account_id' => '1b68e7b15f3f', 'amount' => [ 'value' => 1000, 'currency' => \YooKassa\Model\CurrencyCode::RUB, ], ], [ 'account_id' => '0c37205b3208', 'amount' => [ 'value' => 2000, 'currency' => \YooKassa\Model\CurrencyCode::RUB, ], ], ]); // Создаем объект запроса $request = $builder->build(); // Можно изменить данные, если нужно $request->setDescription($request->getDescription() . ' - merchant comment'); $idempotenceKey = uniqid('', true); $response = $client->createPayment($request, $idempotenceKey); } catch (\Exception $e) { $response = $e; } var_dump($response); ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$amount](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#property_amount) | | Сумма | | protected | [$currentObject](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#property_currentObject) | | Собираемый объект запроса. | | protected | [$receipt](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#property_receipt) | | Объект с информацией о чеке | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. | | public | [addReceiptItem()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_addReceiptItem) | | Добавляет в чек товар | | public | [addReceiptShipping()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_addReceiptShipping) | | Добавляет в чек доставку товара. | | public | [addTransfer()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_addTransfer) | | Добавляет трансфер. | | public | [build()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_build) | | Строит и возвращает объект запроса для отправки в API ЮKassa. | | public | [setAccountId()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setAccountId) | | Устанавливает идентификатор магазина получателя платежа. | | public | [setAirline()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setAirline) | | Устанавливает информацию об авиабилетах. | | public | [setAmount()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setAmount) | | Устанавливает сумму. | | public | [setCapture()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setCapture) | | Устанавливает флаг автоматического принятия поступившей оплаты. | | public | [setClientIp()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setClientIp) | | Устанавливает IP адрес покупателя. | | public | [setConfirmation()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setConfirmation) | | Устанавливает способ подтверждения платежа. | | public | [setCurrency()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setCurrency) | | Устанавливает валюту в которой будет происходить подтверждение оплаты заказа. | | public | [setDeal()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setDeal) | | Устанавливает сделку. | | public | [setDescription()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setDescription) | | Устанавливает описание транзакции. | | public | [setFraudData()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setFraudData) | | Устанавливает сделку. | | public | [setGatewayId()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setGatewayId) | | Устанавливает идентификатор шлюза. | | public | [setMerchantCustomerId()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setMerchantCustomerId) | | Устанавливает идентификатор покупателя в вашей системе. | | public | [setMetadata()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setMetadata) | | Устанавливает метаданные, привязанные к платежу. | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива. | | public | [setPaymentMethodData()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setPaymentMethodData) | | Устанавливает объект с информацией для создания метода оплаты. | | public | [setPaymentMethodId()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setPaymentMethodId) | | Устанавливает идентификатор записи о сохранённых данных покупателя. | | public | [setPaymentToken()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setPaymentToken) | | Устанавливает одноразовый токен для проведения оплаты. | | public | [setReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceipt) | | Устанавливает чек. | | public | [setReceiptEmail()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceiptEmail) | | Устанавливает адрес электронной почты получателя чека. | | public | [setReceiptIndustryDetails()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setReceiptIndustryDetails) | | Устанавливает отраслевой реквизит чека. | | public | [setReceiptItems()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceiptItems) | | Устанавливает список товаров для создания чека. | | public | [setReceiptOperationalDetails()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setReceiptOperationalDetails) | | Устанавливает отраслевой реквизит чека. | | public | [setReceiptPhone()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceiptPhone) | | Устанавливает телефон получателя чека. | | public | [setRecipient()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setRecipient) | | Устанавливает получателя платежа из объекта или ассоциативного массива. | | public | [setSavePaymentMethod()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_setSavePaymentMethod) | | Устанавливает флаг сохранения платёжных данных. Значение true инициирует создание многоразового payment_method. | | public | [setTaxSystemCode()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setTaxSystemCode) | | Устанавливает код системы налогообложения. | | public | [setTransfers()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setTransfers) | | Устанавливает трансферы. | | protected | [getPaymentDataFactory()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_getPaymentDataFactory) | | Возвращает фабрику методов проведения платежей. | | protected | [initCurrentObject()](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md#method_initCurrentObject) | | Инициализирует объект запроса, который в дальнейшем будет собираться билдером | --- ### Details * File: [lib/Request/Payments/CreatePaymentRequestBuilder.php](../../lib/Request/Payments/CreatePaymentRequestBuilder.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) * [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) * \YooKassa\Request\Payments\CreatePaymentRequestBuilder * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### protected $amount : ?\YooKassa\Model\MonetaryAmount --- **Summary** Сумма **Type:** MonetaryAmount **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) #### protected $currentObject : ?\YooKassa\Common\AbstractRequestInterface --- **Summary** Собираемый объект запроса. **Type:** AbstractRequestInterface **Details:** #### protected $receipt : ?\YooKassa\Model\Receipt\Receipt --- **Summary** Объект с информацией о чеке **Type:** Receipt **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public addReceiptItem() : self ```php public addReceiptItem(string $title, string $price, float $quantity, int $vatCode, null|string $paymentMode = null, null|string $paymentSubject = null, null|mixed $productCode = null, null|mixed $countryOfOriginCode = null, null|mixed $customsDeclarationNumber = null, null|mixed $excise = null) : self ``` **Summary** Добавляет в чек товар **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) * See Also: * [](\YooKassa\Request\Payments\PaymentSubject) * [](\YooKassa\Request\Payments\PaymentMode) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | title | Название или описание товара | | string | price | Цена товара в валюте, заданной в заказе | | float | quantity | Количество товара | | int | vatCode | Ставка НДС | | null OR string | paymentMode | значение перечисления PaymentMode | | null OR string | paymentSubject | значение перечисления PaymentSubject | | null OR mixed | productCode | | | null OR mixed | countryOfOriginCode | | | null OR mixed | customsDeclarationNumber | | | null OR mixed | excise | | **Returns:** self - Инстанс билдера запросов #### public addReceiptShipping() : self ```php public addReceiptShipping(string $title, string $price, int $vatCode, null|string $paymentMode = null, null|string $paymentSubject = null) : self ``` **Summary** Добавляет в чек доставку товара. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) * See Also: * [](\YooKassa\Request\Payments\PaymentSubject) * [](\YooKassa\Request\Payments\PaymentMode) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | title | Название доставки в чеке | | string | price | Стоимость доставки | | int | vatCode | Ставка НДС | | null OR string | paymentMode | значение перечисления PaymentMode | | null OR string | paymentSubject | значение перечисления PaymentSubject | **Returns:** self - Инстанс билдера запросов #### public addTransfer() : self ```php public addTransfer(array|\YooKassa\Request\Payments\TransferDataInterface $value) : self ``` **Summary** Добавляет трансфер. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Payments\TransferDataInterface | value | Трансфер | **Returns:** self - Инстанс билдера запросов #### public build() : \YooKassa\Request\Payments\CreatePaymentRequestInterface|\YooKassa\Common\AbstractRequestInterface ```php public build(null|array $options = null) : \YooKassa\Request\Payments\CreatePaymentRequestInterface|\YooKassa\Common\AbstractRequestInterface ``` **Summary** Строит и возвращает объект запроса для отправки в API ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array | options | Массив параметров для установки в объект запроса | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestInterface|\YooKassa\Common\AbstractRequestInterface - Инстанс объекта запроса #### public setAccountId() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setAccountId(string $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает идентификатор магазина получателя платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Идентификатор магазина | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\EmptyPropertyValueException | Выбрасывается если было передано пустое значение | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если было передано не строковое значение | | \Exception | | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setAirline() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setAirline(\YooKassa\Request\Payments\AirlineInterface|array|null $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает информацию об авиабилетах. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Payments\AirlineInterface OR array OR null | value | Объект данных длинной записи или ассоциативный массив с данными | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|\YooKassa\Request\Payments\numeric $value, string|null $currency = null) : self ``` **Summary** Устанавливает сумму. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR \YooKassa\Request\Payments\numeric | value | Сумма оплаты | | string OR null | currency | Валюта | **Returns:** self - Инстанс билдера запросов #### public setCapture() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setCapture(bool $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает флаг автоматического принятия поступившей оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | value | Автоматически принять поступившую оплату | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если переданный аргумент не кастится в bool | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setClientIp() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setClientIp(string|null $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает IP адрес покупателя. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | IPv4 или IPv6-адрес покупателя | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданный аргумент не является строкой | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setConfirmation() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setConfirmation(null|\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes|array|string $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes OR array OR string | value | Способ подтверждения платежа | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданное значение не является объектом типа AbstractConfirmationAttributes или null | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setCurrency() : self ```php public setCurrency(string $value) : self ``` **Summary** Устанавливает валюту в которой будет происходить подтверждение оплаты заказа. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Валюта в которой подтверждается оплата | **Returns:** self - Инстанс билдера запросов #### public setDeal() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setDeal(null|array|\YooKassa\Model\Deal\PaymentDealInfo $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает сделку. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\PaymentDealInfo | value | Данные о сделке, в составе которой проходит платеж | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс билдера запросов #### public setDescription() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setDescription(string|null $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает описание транзакции. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Описание транзакции | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если переданное значение превышает допустимую длину | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданное значение не является строкой | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setFraudData() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setFraudData(null|array|\YooKassa\Request\Payments\FraudData $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает сделку. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Request\Payments\FraudData | value | Данные о сделке, в составе которой проходит платеж | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Информация для проверки операции на мошенничество #### public setGatewayId() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setGatewayId(string $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает идентификатор шлюза. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Идентификатор шлюза | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\EmptyPropertyValueException | Выбрасывается если было передано пустое значение | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если было передано не строковое значение | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setMerchantCustomerId() : self ```php public setMerchantCustomerId(string|null $value) : self ``` **Summary** Устанавливает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданный аргумент не является строкой | **Returns:** self - #### public setMetadata() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setMetadata(null|array|\YooKassa\Model\Metadata $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает метаданные, привязанные к платежу. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Metadata | value | Метаданные платежа, устанавливаемые мерчантом | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданные данные не удалось интерпретировать как метаданные платежа | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(iterable|null $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable OR null | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### public setPaymentMethodData() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setPaymentMethodData(null|\YooKassa\Request\Payments\PaymentData\AbstractPaymentData|array|string $value, array|null $options = null) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает объект с информацией для создания метода оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \YooKassa\Request\Payments\PaymentData\AbstractPaymentData OR array OR string | value | Объект создания метода оплаты или null | | array OR null | options | Настройки способа оплаты в виде ассоциативного массива | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если был передан объект невалидного типа | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setPaymentMethodId() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setPaymentMethodId(string|null $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает идентификатор записи о сохранённых данных покупателя. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Идентификатор записи о сохраненных платежных данных покупателя | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setPaymentToken() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setPaymentToken(string|null $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает одноразовый токен для проведения оплаты. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Одноразовый токен для проведения оплаты | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если переданное значение превышает допустимую длину | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданное значение не является строкой | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setReceipt() : self ```php public setReceipt(array|\YooKassa\Model\Receipt\ReceiptInterface $value) : self ``` **Summary** Устанавливает чек. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\ReceiptInterface | value | Инстанс чека или ассоциативный массив с данными чека | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если было передано значение невалидного типа | **Returns:** self - Инстанс билдера запросов #### public setReceiptEmail() : self ```php public setReceiptEmail(string|null $value) : self ``` **Summary** Устанавливает адрес электронной почты получателя чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Email получателя чека | **Returns:** self - Инстанс билдера запросов #### public setReceiptIndustryDetails() : self ```php public setReceiptIndustryDetails(array|\YooKassa\Model\Receipt\IndustryDetails[]|null $value) : self ``` **Summary** Устанавливает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\IndustryDetails[] OR null | value | Отраслевой реквизит чека | **Returns:** self - Инстанс билдера запросов #### public setReceiptItems() : self ```php public setReceiptItems(array $value = []) : self ``` **Summary** Устанавливает список товаров для создания чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | value | Массив товаров в заказе | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если хотя бы один из товаров имеет неверную структуру | **Returns:** self - Инстанс билдера запросов #### public setReceiptOperationalDetails() : self ```php public setReceiptOperationalDetails(array|\YooKassa\Model\Receipt\IndustryDetails[]|null $value) : self ``` **Summary** Устанавливает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\IndustryDetails[] OR null | value | Отраслевой реквизит чека | **Returns:** self - Инстанс билдера запросов #### public setReceiptPhone() : self ```php public setReceiptPhone(string|null $value) : self ``` **Summary** Устанавливает телефон получателя чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Телефон получателя чека | **Returns:** self - Инстанс билдера запросов #### public setRecipient() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setRecipient(array|\YooKassa\Model\Payment\RecipientInterface|null $value) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает получателя платежа из объекта или ассоциативного массива. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Payment\RecipientInterface OR null | value | Получатель платежа | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если передан аргумент не валидного типа | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - #### public setSavePaymentMethod() : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ```php public setSavePaymentMethod(bool|null $value = null) : \YooKassa\Request\Payments\CreatePaymentRequestBuilder ``` **Summary** Устанавливает флаг сохранения платёжных данных. Значение true инициирует создание многоразового payment_method. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | value | Сохранить платежные данные для последующего использования | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если переданный аргумент не кастится в bool | **Returns:** \YooKassa\Request\Payments\CreatePaymentRequestBuilder - Инстанс текущего билдера #### public setTaxSystemCode() : self ```php public setTaxSystemCode(int|null $value) : self ``` **Summary** Устанавливает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | value | Код системы налогообложения. Число 1-6. | **Returns:** self - Инстанс билдера запросов #### public setTransfers() : self ```php public setTransfers(array|\YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface $value) : self ``` **Summary** Устанавливает трансферы. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Payments\TransferDataInterface[] OR \YooKassa\Common\ListObjectInterface | value | Массив трансферов | **Returns:** self - Инстанс билдера запросов #### protected getPaymentDataFactory() : \YooKassa\Request\Payments\PaymentData\PaymentDataFactory ```php protected getPaymentDataFactory() : \YooKassa\Request\Payments\PaymentData\PaymentDataFactory ``` **Summary** Возвращает фабрику методов проведения платежей. **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) **Returns:** \YooKassa\Request\Payments\PaymentData\PaymentDataFactory - Фабрика методов проведения платежей #### protected initCurrentObject() : \YooKassa\Request\Payments\CreatePaymentRequest ```php protected initCurrentObject() : \YooKassa\Request\Payments\CreatePaymentRequest ``` **Summary** Инициализирует объект запроса, который в дальнейшем будет собираться билдером **Details:** * Inherited From: [\YooKassa\Request\Payments\CreatePaymentRequestBuilder](../classes/YooKassa-Request-Payments-CreatePaymentRequestBuilder.md) **Returns:** \YooKassa\Request\Payments\CreatePaymentRequest - Инстанс собираемого объекта запроса к API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetails.md000064400000037776150364342670024056 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payout\PayoutCancellationDetails ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель PayoutCancellationDetails. **Description:** Комментарий к статусу ~`canceled`: кто отменил выплату и по какой причине. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$party](../classes/YooKassa-Model-Payout-PayoutCancellationDetails.md#property_party) | | Участник процесса выплаты, который принял решение об отмене транзакции. | | public | [$reason](../classes/YooKassa-Model-Payout-PayoutCancellationDetails.md#property_reason) | | Причина отмены выплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getParty()](../classes/YooKassa-Model-Payout-PayoutCancellationDetails.md#method_getParty) | | Возвращает участника процесса выплаты, который принял решение об отмене транзакции. | | public | [getReason()](../classes/YooKassa-Model-Payout-PayoutCancellationDetails.md#method_getReason) | | Возвращает причину отмены выплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setParty()](../classes/YooKassa-Model-Payout-PayoutCancellationDetails.md#method_setParty) | | Устанавливает участника процесса выплаты, который принял решение об отмене транзакции. | | public | [setReason()](../classes/YooKassa-Model-Payout-PayoutCancellationDetails.md#method_setReason) | | Устанавливает причину отмены выплаты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payout/PayoutCancellationDetails.php](../../lib/Model/Payout/PayoutCancellationDetails.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payout\PayoutCancellationDetails * Implements: * [\YooKassa\Model\CancellationDetailsInterface](../classes/YooKassa-Model-CancellationDetailsInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $party : string --- ***Description*** Участник процесса выплаты, который принял решение об отмене транзакции. **Type:** string **Details:** #### public $reason : string --- ***Description*** Причина отмены выплаты. **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getParty() : string ```php public getParty() : string ``` **Summary** Возвращает участника процесса выплаты, который принял решение об отмене транзакции. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutCancellationDetails](../classes/YooKassa-Model-Payout-PayoutCancellationDetails.md) **Returns:** string - Инициатор отмены выплаты #### public getReason() : string ```php public getReason() : string ``` **Summary** Возвращает причину отмены выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutCancellationDetails](../classes/YooKassa-Model-Payout-PayoutCancellationDetails.md) **Returns:** string - Причина отмены выплаты. #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setParty() : self ```php public setParty(string|null $party = null) : self ``` **Summary** Устанавливает участника процесса выплаты, который принял решение об отмене транзакции. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutCancellationDetails](../classes/YooKassa-Model-Payout-PayoutCancellationDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | party | Участник процесса выплаты, который принял решение об отмене транзакции. | **Returns:** self - #### public setReason() : self ```php public setReason(string|null $reason = null) : self ``` **Summary** Устанавливает причину отмены выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutCancellationDetails](../classes/YooKassa-Model-Payout-PayoutCancellationDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | reason | Причина отмены выплаты. | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md000064400000052262150364342670026107 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель AbstractPaymentMethod. **Description:** Абстрактный класс, описывающий основные свойства и методы платежных методов. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_id) | | Идентификатор записи о сохраненных платежных данных | | public | [$saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_saved) | | Возможность многократного использования | | public | [$title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_title) | | Название метода оплаты | | public | [$type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property_type) | | Код способа оплаты | | protected | [$_id](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__id) | | Идентификатор записи о сохраненных платежных данных. | | protected | [$_saved](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__saved) | | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | | protected | [$_title](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__title) | | Название способа оплаты. | | protected | [$_type](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#property__type) | | Код способа оплаты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getId) | | Возвращает id. | | public | [getSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getSaved) | | Возвращает saved. | | public | [getTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getTitle) | | Возвращает Название способа оплаты. | | public | [getType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_getType) | | Возвращает тип платежного метода. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setId) | | Устанавливает id. | | public | [setSaved()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setSaved) | | Устанавливает признак возможности многократного использования. | | public | [setTitle()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setTitle) | | Устанавливает Название способа оплаты. | | public | [setType()](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md#method_setType) | | Устанавливает тип платежного метода. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/AbstractPaymentMethod.php](../../lib/Model/Payment/PaymentMethod/AbstractPaymentMethod.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $id : string --- ***Description*** Идентификатор записи о сохраненных платежных данных **Type:** string **Details:** #### public $saved : bool --- ***Description*** Возможность многократного использования **Type:** bool **Details:** #### public $title : string --- ***Description*** Название метода оплаты **Type:** string **Details:** #### public $type : string --- ***Description*** Код способа оплаты **Type:** string **Details:** #### protected $_id : ?string --- **Summary** Идентификатор записи о сохраненных платежных данных. **Type:** ?string **Details:** #### protected $_saved : bool --- **Summary** С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). **Type:** bool **Details:** #### protected $_title : ?string --- **Summary** Название способа оплаты. **Type:** ?string **Details:** #### protected $_type : ?string --- **Summary** Код способа оплаты. **Type:** ?string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - #### public getSaved() : bool|null ```php public getSaved() : bool|null ``` **Summary** Возвращает saved. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** bool|null - #### public getTitle() : string|null ```php public getTitle() : string|null ``` **Summary** Возвращает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Название способа оплаты #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) **Returns:** string|null - Тип платежного метода #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setSaved() : self ```php public setSaved(bool|array|null $saved = null) : self ``` **Summary** Устанавливает признак возможности многократного использования. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR array OR null | saved | С помощью сохраненного способа оплаты можно проводить [безакцептные списания](/developers/payment-acceptance/scenario-extensions/recurring-payments). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setTitle() : self ```php public setTitle(string|null $title = null) : self ``` **Summary** Устанавливает Название способа оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | title | Название способа оплаты. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип платежного метода. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod](../classes/YooKassa-Model-Payment-PaymentMethod-AbstractPaymentMethod.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежного метода | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-Confirmation-ConfirmationMobileApplication.md000064400000046702150364342670027465 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\Confirmation\ConfirmationMobileApplication ### Namespace: [\YooKassa\Model\Payment\Confirmation](../namespaces/yookassa-model-payment-confirmation.md) --- **Summary:** Класс, представляющий модель ConfirmationMobileApplication. **Description:** Сценарий, при котором необходимо отправить плательщика на веб-страницу ЮKassa или партнера для подтверждения платежа. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$confirmation_url](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationMobileApplication.md#property_confirmation_url) | | URL на который необходимо перенаправить плательщика для подтверждения оплаты | | public | [$confirmationUrl](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationMobileApplication.md#property_confirmationUrl) | | URL на который необходимо перенаправить плательщика для подтверждения оплаты | | public | [$type](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#property_type) | | Тип подтверждения платежа | | protected | [$_type](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#property__type) | | Тип подтверждения платежа. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationMobileApplication.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getConfirmationData()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationData) | | | | public | [getConfirmationToken()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationToken) | | | | public | [getConfirmationUrl()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getConfirmationUrl) | | | | public | [getConfirmationUrl()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationMobileApplication.md#method_getConfirmationUrl) | | Возвращает URL на который необходимо перенаправить плательщика для подтверждения оплаты | | public | [getType()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_getType) | | Возвращает тип подтверждения платежа. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setConfirmationUrl()](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationMobileApplication.md#method_setConfirmationUrl) | | Устанавливает URL на который необходимо перенаправить плательщика для подтверждения оплаты | | public | [setType()](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md#method_setType) | | Устанавливает тип подтверждения платежа | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/Confirmation/ConfirmationMobileApplication.php](../../lib/Model/Payment/Confirmation/ConfirmationMobileApplication.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) * \YooKassa\Model\Payment\Confirmation\ConfirmationMobileApplication * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $confirmation_url : string --- ***Description*** URL на который необходимо перенаправить плательщика для подтверждения оплаты **Type:** string **Details:** #### public $confirmationUrl : string --- ***Description*** URL на который необходимо перенаправить плательщика для подтверждения оплаты **Type:** string **Details:** #### public $type : string --- ***Description*** Тип подтверждения платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) #### protected $_type : ?string --- **Summary** Тип подтверждения платежа. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) --- ## Methods #### public __construct() : mixed ```php public __construct(mixed $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationMobileApplication](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationMobileApplication.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getConfirmationData() ```php public getConfirmationData() ``` **Description** Для ConfirmationQr **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationToken() ```php public getConfirmationToken() ``` **Description** Для ConfirmationEmbedded **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationUrl() ```php public getConfirmationUrl() ``` **Description** Для ConfirmationRedirect **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** - #### public getConfirmationUrl() : string|null ```php public getConfirmationUrl() : string|null ``` **Summary** Возвращает URL на который необходимо перенаправить плательщика для подтверждения оплаты **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationMobileApplication](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationMobileApplication.md) **Returns:** string|null - URL на который необходимо перенаправить плательщика для подтверждения оплаты #### public getType() : ?string ```php public getType() : ?string ``` **Summary** Возвращает тип подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) **Returns:** ?string - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setConfirmationUrl() : self ```php public setConfirmationUrl(string|null $confirmation_url = null) : self ``` **Summary** Устанавливает URL на который необходимо перенаправить плательщика для подтверждения оплаты **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\ConfirmationMobileApplication](../classes/YooKassa-Model-Payment-Confirmation-ConfirmationMobileApplication.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | confirmation_url | URL на который необходимо перенаправить плательщика для подтверждения оплаты | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип подтверждения платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Confirmation\AbstractConfirmation](../classes/YooKassa-Model-Payment-Confirmation-AbstractConfirmation.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип подтверждения платежа | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-CancellationDetails.md000064400000037304150364342670022773 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\CancellationDetails ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Класс, представляющий модель CancellationDetails. **Description:** Комментарий к статусу ~`canceled`: кто отменил платеж и по какой причине. Подробнее про [неуспешные платежи](/developers/payment-acceptance/after-the-payment/declined-payments) --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$party](../classes/YooKassa-Model-Payment-CancellationDetails.md#property_party) | | Инициатор отмены платежа | | public | [$reason](../classes/YooKassa-Model-Payment-CancellationDetails.md#property_reason) | | Причина отмены платежа | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getParty()](../classes/YooKassa-Model-Payment-CancellationDetails.md#method_getParty) | | Возвращает участника процесса платежа, который принял решение об отмене транзакции. | | public | [getReason()](../classes/YooKassa-Model-Payment-CancellationDetails.md#method_getReason) | | Возвращает причину отмены платежа. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setParty()](../classes/YooKassa-Model-Payment-CancellationDetails.md#method_setParty) | | Устанавливает участника процесса платежа, который принял решение об отмене транзакции. | | public | [setReason()](../classes/YooKassa-Model-Payment-CancellationDetails.md#method_setReason) | | Устанавливает причину отмены платежа. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/CancellationDetails.php](../../lib/Model/Payment/CancellationDetails.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payment\CancellationDetails * Implements: * [\YooKassa\Model\CancellationDetailsInterface](../classes/YooKassa-Model-CancellationDetailsInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $party : string --- ***Description*** Инициатор отмены платежа **Type:** string **Details:** #### public $reason : string --- ***Description*** Причина отмены платежа **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getParty() : string ```php public getParty() : string ``` **Summary** Возвращает участника процесса платежа, который принял решение об отмене транзакции. **Details:** * Inherited From: [\YooKassa\Model\Payment\CancellationDetails](../classes/YooKassa-Model-Payment-CancellationDetails.md) **Returns:** string - Инициатор отмены платежа #### public getReason() : string ```php public getReason() : string ``` **Summary** Возвращает причину отмены платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\CancellationDetails](../classes/YooKassa-Model-Payment-CancellationDetails.md) **Returns:** string - Причина отмены платежа #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setParty() : self ```php public setParty(string|null $party = null) : self ``` **Summary** Устанавливает участника процесса платежа, который принял решение об отмене транзакции. **Details:** * Inherited From: [\YooKassa\Model\Payment\CancellationDetails](../classes/YooKassa-Model-Payment-CancellationDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | party | | **Returns:** self - #### public setReason() : self ```php public setReason(string|null $reason = null) : self ``` **Summary** Устанавливает причину отмены платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\CancellationDetails](../classes/YooKassa-Model-Payment-CancellationDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | reason | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-ReceiptItemInterface.md000064400000044344150364342670023104 0ustar00# [YooKassa API SDK](../home.md) # Interface: ReceiptItemInterface ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Interface ReceiptItemInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAdditionalPaymentSubjectProps()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getAdditionalPaymentSubjectProps) | | Возвращает дополнительный реквизит предмета расчета. | | public | [getAgentType()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getAgentType) | | Возвращает тип посредника, реализующего товар или услугу. | | public | [getAmount()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getAmount) | | Возвращает общую стоимость покупаемого товара в копейках/центах. | | public | [getCountryOfOriginCode()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getCountryOfOriginCode) | | Возвращает код страны происхождения товара по общероссийскому классификатору стран мира. | | public | [getCustomsDeclarationNumber()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getCustomsDeclarationNumber) | | Возвращает номер таможенной декларации. | | public | [getDescription()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getDescription) | | Возвращает наименование товара. | | public | [getExcise()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getExcise) | | Возвращает сумму акциза товара с учетом копеек. | | public | [getMarkCodeInfo()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getMarkCodeInfo) | | Возвращает код товара. | | public | [getMarkMode()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getMarkMode) | | Возвращает режим обработки кода маркировки. | | public | [getMarkQuantity()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getMarkQuantity) | | Возвращает дробное количество маркированного товара. | | public | [getMeasure()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getMeasure) | | Возвращает меру количества предмета расчета. | | public | [getPaymentMode()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getPaymentMode) | | Возвращает признак способа расчета. | | public | [getPaymentSubject()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getPaymentSubject) | | Возвращает признак предмета расчета. | | public | [getPaymentSubjectIndustryDetails()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getPaymentSubjectIndustryDetails) | | Возвращает отраслевой реквизит чека. | | public | [getPrice()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getPrice) | | Возвращает цену товара. | | public | [getProductCode()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getProductCode) | | Возвращает код товара — уникальный номер, который присваивается экземпляру товара при маркировке. | | public | [getQuantity()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getQuantity) | | Возвращает количество товара. | | public | [getSupplier()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getSupplier) | | Возвращает информацию о поставщике товара или услуги. | | public | [getVatCode()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_getVatCode) | | Возвращает ставку НДС | | public | [isShipping()](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md#method_isShipping) | | Проверяет, является ли текущий элемент чека доставкой. | --- ### Details * File: [lib/Model/Receipt/ReceiptItemInterface.php](../../lib/Model/Receipt/ReceiptItemInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Наименование товара (тег в 54 ФЗ — 1030) | | property | | Количество (тег в 54 ФЗ — 1023) | | property | | Мера количества предмета расчета (тег в 54 ФЗ — 2108) | | property | | Дробное количество маркированного товара (тег в 54 ФЗ — 1291) | | property | | Дробное количество маркированного товара (тег в 54 ФЗ — 1291) | | property | | Суммарная стоимость покупаемого товара в копейках/центах | | property | | Цена товара (тег в 54 ФЗ — 1079) | | property | | Ставка НДС, число 1-6 (тег в 54 ФЗ — 1199) | | property | | Ставка НДС, число 1-6 (тег в 54 ФЗ — 1199) | | property | | Признак предмета расчета (тег в 54 ФЗ — 1212) | | property | | Признак предмета расчета (тег в 54 ФЗ — 1212) | | property | | Признак способа расчета (тег в 54 ФЗ — 1214) | | property | | Признак способа расчета (тег в 54 ФЗ — 1214) | | property | | Код страны происхождения товара (тег в 54 ФЗ — 1230) | | property | | Код страны происхождения товара (тег в 54 ФЗ — 1230) | | property | | Номер таможенной декларации (от 1 до 32 символов). Тег в 54 ФЗ — 1231 | | property | | Номер таможенной декларации (от 1 до 32 символов). Тег в 54 ФЗ — 1231 | | property | | Сумма акциза товара с учетом копеек (тег в 54 ФЗ — 1229) | | property | | Код товара — уникальный номер, который присваивается экземпляру товара при маркировке (тег в 54 ФЗ — 1162) | | property | | Код товара — уникальный номер, который присваивается экземпляру товара при маркировке (тег в 54 ФЗ — 1162) | | property | | Код товара (тег в 54 ФЗ — 1163) | | property | | Код товара (тег в 54 ФЗ — 1163) | | property | | Режим обработки кода маркировки (тег в 54 ФЗ — 2102) | | property | | Режим обработки кода маркировки (тег в 54 ФЗ — 2102) | | property | | Отраслевой реквизит предмета расчета (тег в 54 ФЗ — 1260) | | property | | Отраслевой реквизит предмета расчета (тег в 54 ФЗ — 1260) | | property | | Дополнительный реквизит предмета расчета (тег в 54 ФЗ — 1191) | | property | | Дополнительный реквизит предмета расчета (тег в 54 ФЗ — 1191) | | property | | Информация о поставщике товара или услуги (тег в 54 ФЗ — 1224) | | property | | Тип посредника, реализующего товар или услугу | | property | | Тип посредника, реализующего товар или услугу | --- ## Methods #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает наименование товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** string|null - Наименование товара #### public getQuantity() : float|null ```php public getQuantity() : float|null ``` **Summary** Возвращает количество товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** float|null - Количество купленного товара #### public getAmount() : int ```php public getAmount() : int ``` **Summary** Возвращает общую стоимость покупаемого товара в копейках/центах. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** int - Сумма стоимости покупаемого товара #### public getPrice() : \YooKassa\Model\AmountInterface ```php public getPrice() : \YooKassa\Model\AmountInterface ``` **Summary** Возвращает цену товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** \YooKassa\Model\AmountInterface - Цена товара #### public getVatCode() : null|int ```php public getVatCode() : null|int ``` **Summary** Возвращает ставку НДС **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** null|int - Ставка НДС, число 1-6, или null, если ставка не задана #### public getPaymentSubject() : null|string ```php public getPaymentSubject() : null|string ``` **Summary** Возвращает признак предмета расчета. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** null|string - Признак предмета расчета #### public getPaymentMode() : null|string ```php public getPaymentMode() : null|string ``` **Summary** Возвращает признак способа расчета. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** null|string - Признак способа расчета #### public getProductCode() : null|string ```php public getProductCode() : null|string ``` **Summary** Возвращает код товара — уникальный номер, который присваивается экземпляру товара при маркировке. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** null|string - Код товара #### public getMarkCodeInfo() : \YooKassa\Model\Receipt\MarkCodeInfo|null ```php public getMarkCodeInfo() : \YooKassa\Model\Receipt\MarkCodeInfo|null ``` **Summary** Возвращает код товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** \YooKassa\Model\Receipt\MarkCodeInfo|null - Код товара #### public getMeasure() : string|null ```php public getMeasure() : string|null ``` **Summary** Возвращает меру количества предмета расчета. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** string|null - Мера количества предмета расчета #### public getMarkMode() : string|null ```php public getMarkMode() : string|null ``` **Summary** Возвращает режим обработки кода маркировки. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** string|null - Режим обработки кода маркировки #### public getMarkQuantity() : \YooKassa\Model\Receipt\MarkQuantity|null ```php public getMarkQuantity() : \YooKassa\Model\Receipt\MarkQuantity|null ``` **Summary** Возвращает дробное количество маркированного товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** \YooKassa\Model\Receipt\MarkQuantity|null - Дробное количество маркированного товара #### public getPaymentSubjectIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ```php public getPaymentSubjectIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface - Отраслевой реквизит чека #### public getAdditionalPaymentSubjectProps() : string|null ```php public getAdditionalPaymentSubjectProps() : string|null ``` **Summary** Возвращает дополнительный реквизит предмета расчета. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** string|null - Дополнительный реквизит предмета расчета #### public getCountryOfOriginCode() : null|string ```php public getCountryOfOriginCode() : null|string ``` **Summary** Возвращает код страны происхождения товара по общероссийскому классификатору стран мира. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** null|string - Код страны происхождения товара #### public getCustomsDeclarationNumber() : null|string ```php public getCustomsDeclarationNumber() : null|string ``` **Summary** Возвращает номер таможенной декларации. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** null|string - Номер таможенной декларации (от 1 до 32 символов) #### public getExcise() : null|float ```php public getExcise() : null|float ``` **Summary** Возвращает сумму акциза товара с учетом копеек. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** null|float - Сумма акциза товара с учетом копеек #### public getSupplier() : \YooKassa\Model\Receipt\SupplierInterface|null ```php public getSupplier() : \YooKassa\Model\Receipt\SupplierInterface|null ``` **Summary** Возвращает информацию о поставщике товара или услуги. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** \YooKassa\Model\Receipt\SupplierInterface|null - Информация о поставщике товара или услуги #### public getAgentType() : string|null ```php public getAgentType() : string|null ``` **Summary** Возвращает тип посредника, реализующего товар или услугу. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** string|null - Тип посредника, реализующего товар или услугу #### public isShipping() : bool ```php public isShipping() : bool ``` **Summary** Проверяет, является ли текущий элемент чека доставкой. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemInterface](../classes/YooKassa-Model-Receipt-ReceiptItemInterface.md) **Returns:** bool - True если доставка, false если обычный товар --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesEmbedded.md000064400000046350150364342670032374 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesEmbedded ### Namespace: [\YooKassa\Request\Payments\ConfirmationAttributes](../namespaces/yookassa-request-payments-confirmationattributes.md) --- **Summary:** Класс, представляющий модель ConfirmationAttributesEmbedded. **Description:** Действия, необходимые для подтверждения платежа, будут зависеть от способа оплаты, который пользователь выберет в виджете ЮKassa. Подтверждение от пользователя получит ЮKassa — вам необходимо только встроить виджет к себе на страницу. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesEmbedded.md#property_locale) | | Язык интерфейса, писем и смс, которые будет видеть или получать пользователь | | public | [$locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property_locale) | | Язык интерфейса, писем и смс, которые будет видеть или получать пользователь | | public | [$type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesEmbedded.md#property_type) | | Код сценария подтверждения | | public | [$type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property_type) | | Код сценария подтверждения | | protected | [$_locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property__locale) | | | | protected | [$_type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesEmbedded.md#method___construct) | | | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getLocale()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_getLocale) | | Возвращает язык интерфейса, писем и смс | | public | [getType()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_getType) | | Возвращает код сценария подтверждения | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setLocale()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_setLocale) | | Устанавливает язык интерфейса, писем и смс | | public | [setType()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_setType) | | Устанавливает код сценария подтверждения. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/ConfirmationAttributes/ConfirmationAttributesEmbedded.php](../../lib/Request/Payments/ConfirmationAttributes/ConfirmationAttributesEmbedded.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) * \YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesEmbedded * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $locale : string --- ***Description*** Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Type:** string **Details:** #### public $locale : string --- ***Description*** Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### public $type : string --- ***Description*** Код сценария подтверждения **Type:** string **Details:** #### public $type : string --- ***Description*** Код сценария подтверждения **Type:** string **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### protected $_locale : ?string --- **Type:** ?string Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) #### protected $_type : ?string --- **Type:** ?string Код сценария подтверждения **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) --- ## Methods #### public __construct() : mixed ```php public __construct(?array $data = []) : mixed ``` **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\ConfirmationAttributesEmbedded](../classes/YooKassa-Request-Payments-ConfirmationAttributes-ConfirmationAttributesEmbedded.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?array | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getLocale() : string|null ```php public getLocale() : string|null ``` **Summary** Возвращает язык интерфейса, писем и смс **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) **Returns:** string|null - Язык интерфейса, писем и смс #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает код сценария подтверждения **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) **Returns:** string|null - Код сценария подтверждения #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setLocale() : self ```php public setLocale(string|null $locale = null) : self ``` **Summary** Устанавливает язык интерфейса, писем и смс **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | locale | Язык интерфейса, писем и смс | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает код сценария подтверждения. **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Код сценария подтверждения | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-AbstractRequestInterface.md000064400000005764150364342670022610 0ustar00# [YooKassa API SDK](../home.md) # Interface: AbstractRequestInterface ### Namespace: [\YooKassa\Common](../namespaces/yookassa-common.md) --- **Summary:** Interface AbstractRequestInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequestInterface.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequestInterface.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [validate()](../classes/YooKassa-Common-AbstractRequestInterface.md#method_validate) | | Валидирует текущий запрос, проверяет все ли нужные свойства установлены. | --- ### Details * File: [lib/Common/AbstractRequestInterface.php](../../lib/Common/AbstractRequestInterface.php) * Package: \YooKassa * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | --- ## Methods #### public validate() : bool ```php public validate() : bool ``` **Summary** Валидирует текущий запрос, проверяет все ли нужные свойства установлены. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestInterface](../classes/YooKassa-Common-AbstractRequestInterface.md) **Returns:** bool - True если запрос валиден, false если нет #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestInterface](../classes/YooKassa-Common-AbstractRequestInterface.md) **Returns:** void - #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestInterface](../classes/YooKassa-Common-AbstractRequestInterface.md) **Returns:** string|null - Последняя произошедшая ошибка валидации --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Refunds-CreateRefundRequestSerializer.md000064400000004512150364342670025417 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Refunds\CreateRefundRequestSerializer ### Namespace: [\YooKassa\Request\Refunds](../namespaces/yookassa-request-refunds.md) --- **Summary:** Класс, представляющий модель CreateRefundRequestSerializer. **Description:** Класс сериалайзера запросов к API на создание нового возврата средств. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [serialize()](../classes/YooKassa-Request-Refunds-CreateRefundRequestSerializer.md#method_serialize) | | Сериализует переданный объект запроса к API в массив. | --- ### Details * File: [lib/Request/Refunds/CreateRefundRequestSerializer.php](../../lib/Request/Refunds/CreateRefundRequestSerializer.php) * Package: YooKassa\Request * Class Hierarchy: * \YooKassa\Request\Refunds\CreateRefundRequestSerializer * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public serialize() : array ```php public serialize(\YooKassa\Request\Refunds\CreateRefundRequestInterface $request) : array ``` **Summary** Сериализует переданный объект запроса к API в массив. **Details:** * Inherited From: [\YooKassa\Request\Refunds\CreateRefundRequestSerializer](../classes/YooKassa-Request-Refunds-CreateRefundRequestSerializer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Refunds\CreateRefundRequestInterface | request | Сериализуемый объект запроса | **Returns:** array - Ассоциативный массив для передачи в API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md000064400000035316150364342670031646 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData ### Namespace: [\YooKassa\Request\Payouts\PayoutDestinationData](../namespaces/yookassa-request-payouts-payoutdestinationdata.md) --- **Summary:** Класс, представляющий AbstractPayoutDestinationData. **Description:** Данные используемые для создания метода оплаты. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property_type) | | Тип метода оплаты | | public | [$type](../classes/YooKassa-Request-Payouts-PayoutDestinationData-AbstractPayoutDestinationData.md#property_type) | | Тип метода оплаты | | protected | [$_type](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#property__type) | | Тип метода оплаты | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_getType) | | Возвращает тип метода оплаты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setType()](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md#method_setType) | | Устанавливает тип метода оплаты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payouts/PayoutDestinationData/AbstractPayoutDestinationData.php](../../lib/Request/Payouts/PayoutDestinationData/AbstractPayoutDestinationData.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) * \YooKassa\Request\Payouts\PayoutDestinationData\AbstractPayoutDestinationData * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Abstract Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) #### public $type : string --- ***Description*** Тип метода оплаты **Type:** string **Details:** #### protected $_type : ?string --- **Summary** Тип метода оплаты **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) **Returns:** string|null - Тип метода оплаты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип метода оплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\AbstractPayoutDestination](../classes/YooKassa-Model-Payout-AbstractPayoutDestination.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип метода оплаты | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-AuthorizationDetails.md000064400000044651150364342670023242 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\AuthorizationDetails ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Класс, представляющий модель AuthorizationDetails. **Description:** Данные об авторизации платежа. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$auth_code](../classes/YooKassa-Model-Payment-AuthorizationDetails.md#property_auth_code) | | Код авторизации банковской карты | | public | [$authCode](../classes/YooKassa-Model-Payment-AuthorizationDetails.md#property_authCode) | | Код авторизации банковской карты | | public | [$rrn](../classes/YooKassa-Model-Payment-AuthorizationDetails.md#property_rrn) | | Retrieval Reference Number — уникальный идентификатор транзакции в системе эмитента | | public | [$three_d_secure](../classes/YooKassa-Model-Payment-AuthorizationDetails.md#property_three_d_secure) | | Данные о прохождении пользователем аутентификации по 3‑D Secure | | public | [$threeDSecure](../classes/YooKassa-Model-Payment-AuthorizationDetails.md#property_threeDSecure) | | Данные о прохождении пользователем аутентификации по 3‑D Secure | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAuthCode()](../classes/YooKassa-Model-Payment-AuthorizationDetails.md#method_getAuthCode) | | Возвращает auth_code. | | public | [getRrn()](../classes/YooKassa-Model-Payment-AuthorizationDetails.md#method_getRrn) | | Возвращает rrn. | | public | [getThreeDSecure()](../classes/YooKassa-Model-Payment-AuthorizationDetails.md#method_getThreeDSecure) | | Возвращает three_d_secure. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAuthCode()](../classes/YooKassa-Model-Payment-AuthorizationDetails.md#method_setAuthCode) | | Устанавливает auth_code. | | public | [setRrn()](../classes/YooKassa-Model-Payment-AuthorizationDetails.md#method_setRrn) | | Устанавливает rrn. | | public | [setThreeDSecure()](../classes/YooKassa-Model-Payment-AuthorizationDetails.md#method_setThreeDSecure) | | Устанавливает three_d_secure. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/AuthorizationDetails.php](../../lib/Model/Payment/AuthorizationDetails.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payment\AuthorizationDetails * Implements: * [\YooKassa\Model\Payment\AuthorizationDetailsInterface](../classes/YooKassa-Model-Payment-AuthorizationDetailsInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $auth_code : string --- ***Description*** Код авторизации банковской карты **Type:** string **Details:** #### public $authCode : string --- ***Description*** Код авторизации банковской карты **Type:** string **Details:** #### public $rrn : string --- ***Description*** Retrieval Reference Number — уникальный идентификатор транзакции в системе эмитента **Type:** string **Details:** #### public $three_d_secure : \YooKassa\Model\Payment\ThreeDSecure --- ***Description*** Данные о прохождении пользователем аутентификации по 3‑D Secure **Type:** ThreeDSecure **Details:** #### public $threeDSecure : \YooKassa\Model\Payment\ThreeDSecure --- ***Description*** Данные о прохождении пользователем аутентификации по 3‑D Secure **Type:** ThreeDSecure **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAuthCode() : string|null ```php public getAuthCode() : string|null ``` **Summary** Возвращает auth_code. **Details:** * Inherited From: [\YooKassa\Model\Payment\AuthorizationDetails](../classes/YooKassa-Model-Payment-AuthorizationDetails.md) **Returns:** string|null - #### public getRrn() : string|null ```php public getRrn() : string|null ``` **Summary** Возвращает rrn. **Details:** * Inherited From: [\YooKassa\Model\Payment\AuthorizationDetails](../classes/YooKassa-Model-Payment-AuthorizationDetails.md) **Returns:** string|null - #### public getThreeDSecure() : \YooKassa\Model\Payment\ThreeDSecure|null ```php public getThreeDSecure() : \YooKassa\Model\Payment\ThreeDSecure|null ``` **Summary** Возвращает three_d_secure. **Details:** * Inherited From: [\YooKassa\Model\Payment\AuthorizationDetails](../classes/YooKassa-Model-Payment-AuthorizationDetails.md) **Returns:** \YooKassa\Model\Payment\ThreeDSecure|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAuthCode() : self ```php public setAuthCode(string|null $auth_code = null) : self ``` **Summary** Устанавливает auth_code. **Details:** * Inherited From: [\YooKassa\Model\Payment\AuthorizationDetails](../classes/YooKassa-Model-Payment-AuthorizationDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | auth_code | Код авторизации банковской карты. Выдается эмитентом и подтверждает проведение авторизации. | **Returns:** self - #### public setRrn() : self ```php public setRrn(string|null $rrn = null) : self ``` **Summary** Устанавливает rrn. **Details:** * Inherited From: [\YooKassa\Model\Payment\AuthorizationDetails](../classes/YooKassa-Model-Payment-AuthorizationDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | rrn | Retrieval Reference Number — уникальный идентификатор транзакции в системе эмитента. Используется при оплате банковской картой. | **Returns:** self - #### public setThreeDSecure() : self ```php public setThreeDSecure(\YooKassa\Model\Payment\ThreeDSecure|array|null $three_d_secure = null) : self ``` **Summary** Устанавливает three_d_secure. **Details:** * Inherited From: [\YooKassa\Model\Payment\AuthorizationDetails](../classes/YooKassa-Model-Payment-AuthorizationDetails.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\ThreeDSecure OR array OR null | three_d_secure | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-SupplierInterface.md000064400000013024150364342670022464 0ustar00# [YooKassa API SDK](../home.md) # Interface: SupplierInterface ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Interface SupplierInterface. **Description:** Информация о поставщике товара или услуги. Можно передавать, если вы отправляете данные для формирования чека по сценарию - сначала платеж, потом чек. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getInn()](../classes/YooKassa-Model-Receipt-SupplierInterface.md#method_getInn) | | Возвращает ИНН пользователя (10 или 12 цифр). | | public | [getName()](../classes/YooKassa-Model-Receipt-SupplierInterface.md#method_getName) | | Возвращает наименование поставщика. | | public | [getPhone()](../classes/YooKassa-Model-Receipt-SupplierInterface.md#method_getPhone) | | Возвращает Телефон пользователя. Указывается в формате ITU-T E.164. | | public | [setInn()](../classes/YooKassa-Model-Receipt-SupplierInterface.md#method_setInn) | | Устанавливает ИНН пользователя (10 или 12 цифр). | | public | [setName()](../classes/YooKassa-Model-Receipt-SupplierInterface.md#method_setName) | | Устанавливает наименование поставщика. | | public | [setPhone()](../classes/YooKassa-Model-Receipt-SupplierInterface.md#method_setPhone) | | Устанавливает Телефон пользователя. Указывается в формате ITU-T E.164. | --- ### Details * File: [lib/Model/Receipt/SupplierInterface.php](../../lib/Model/Receipt/SupplierInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Наименование поставщика | | property | | Телефон пользователя. Указывается в формате ITU-T E.164 | | property | | ИНН пользователя (10 или 12 цифр) | --- ## Methods #### public getName() : ?string ```php public getName() : ?string ``` **Summary** Возвращает наименование поставщика. **Details:** * Inherited From: [\YooKassa\Model\Receipt\SupplierInterface](../classes/YooKassa-Model-Receipt-SupplierInterface.md) **Returns:** ?string - #### public setName() : mixed ```php public setName(null|string $name) : mixed ``` **Summary** Устанавливает наименование поставщика. **Details:** * Inherited From: [\YooKassa\Model\Receipt\SupplierInterface](../classes/YooKassa-Model-Receipt-SupplierInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | name | Наименование поставщика | **Returns:** mixed - #### public getPhone() : null|string ```php public getPhone() : null|string ``` **Summary** Возвращает Телефон пользователя. Указывается в формате ITU-T E.164. **Details:** * Inherited From: [\YooKassa\Model\Receipt\SupplierInterface](../classes/YooKassa-Model-Receipt-SupplierInterface.md) **Returns:** null|string - Телефон пользователя #### public setPhone() : mixed ```php public setPhone(null|string $phone) : mixed ``` **Summary** Устанавливает Телефон пользователя. Указывается в формате ITU-T E.164. **Details:** * Inherited From: [\YooKassa\Model\Receipt\SupplierInterface](../classes/YooKassa-Model-Receipt-SupplierInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | phone | Телефон пользователя | **Returns:** mixed - #### public getInn() : null|string ```php public getInn() : null|string ``` **Summary** Возвращает ИНН пользователя (10 или 12 цифр). **Details:** * Inherited From: [\YooKassa\Model\Receipt\SupplierInterface](../classes/YooKassa-Model-Receipt-SupplierInterface.md) **Returns:** null|string - ИНН пользователя #### public setInn() : mixed ```php public setInn(null|string $inn) : mixed ``` **Summary** Устанавливает ИНН пользователя (10 или 12 цифр). **Details:** * Inherited From: [\YooKassa\Model\Receipt\SupplierInterface](../classes/YooKassa-Model-Receipt-SupplierInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | inn | ИНН пользователя | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payouts-PayoutResponse.md000064400000134777150364342670022524 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payouts\PayoutResponse ### Namespace: [\YooKassa\Request\Payouts](../namespaces/yookassa-request-payouts.md) --- **Summary:** Класс, представляющий PayoutResponse. **Description:** Класс объекта ответа, возвращаемого API при запросе конкретной выплаты. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Payout-Payout.md#constant_MAX_LENGTH_DESCRIPTION) | | | | public | [MAX_LENGTH_ID](../classes/YooKassa-Model-Payout-Payout.md#constant_MAX_LENGTH_ID) | | | | public | [MIN_LENGTH_ID](../classes/YooKassa-Model-Payout-Payout.md#constant_MIN_LENGTH_ID) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Payout-Payout.md#property_amount) | | Сумма выплаты | | public | [$cancellation_details](../classes/YooKassa-Model-Payout-Payout.md#property_cancellation_details) | | Комментарий к отмене выплаты | | public | [$cancellationDetails](../classes/YooKassa-Model-Payout-Payout.md#property_cancellationDetails) | | Комментарий к отмене выплаты | | public | [$created_at](../classes/YooKassa-Model-Payout-Payout.md#property_created_at) | | Время создания заказа | | public | [$createdAt](../classes/YooKassa-Model-Payout-Payout.md#property_createdAt) | | Время создания заказа | | public | [$deal](../classes/YooKassa-Model-Payout-Payout.md#property_deal) | | Сделка, в рамках которой нужно провести выплату | | public | [$description](../classes/YooKassa-Model-Payout-Payout.md#property_description) | | Описание транзакции | | public | [$id](../classes/YooKassa-Model-Payout-Payout.md#property_id) | | Идентификатор выплаты | | public | [$metadata](../classes/YooKassa-Model-Payout-Payout.md#property_metadata) | | Метаданные выплаты указанные мерчантом | | public | [$payout_destination](../classes/YooKassa-Model-Payout-Payout.md#property_payout_destination) | | Способ проведения выплаты | | public | [$payoutDestination](../classes/YooKassa-Model-Payout-Payout.md#property_payoutDestination) | | Способ проведения выплаты | | public | [$receipt](../classes/YooKassa-Model-Payout-Payout.md#property_receipt) | | Данные чека, зарегистрированного в ФНС | | public | [$self_employed](../classes/YooKassa-Model-Payout-Payout.md#property_self_employed) | | Данные самозанятого, который получит выплату | | public | [$selfEmployed](../classes/YooKassa-Model-Payout-Payout.md#property_selfEmployed) | | Данные самозанятого, который получит выплату | | public | [$status](../classes/YooKassa-Model-Payout-Payout.md#property_status) | | Текущее состояние выплаты | | public | [$test](../classes/YooKassa-Model-Payout-Payout.md#property_test) | | Признак тестовой операции | | protected | [$_amount](../classes/YooKassa-Model-Payout-Payout.md#property__amount) | | Сумма выплаты | | protected | [$_cancellation_details](../classes/YooKassa-Model-Payout-Payout.md#property__cancellation_details) | | Комментарий к статусу canceled: кто отменил выплаты и по какой причине | | protected | [$_created_at](../classes/YooKassa-Model-Payout-Payout.md#property__created_at) | | Время создания выплаты. Пример: ~`2017-11-03T11:52:31.827Z` | | protected | [$_deal](../classes/YooKassa-Model-Payout-Payout.md#property__deal) | | Сделка, в рамках которой нужно провести выплату. Присутствует, если вы проводите Безопасную сделку | | protected | [$_description](../classes/YooKassa-Model-Payout-Payout.md#property__description) | | Описание транзакции (не более 128 символов). Например: «Выплата по договору 37». | | protected | [$_id](../classes/YooKassa-Model-Payout-Payout.md#property__id) | | Идентификатор выплаты. | | protected | [$_metadata](../classes/YooKassa-Model-Payout-Payout.md#property__metadata) | | Метаданные выплаты указанные мерчантом | | protected | [$_payout_destination](../classes/YooKassa-Model-Payout-Payout.md#property__payout_destination) | | Способ проведения выплаты | | protected | [$_receipt](../classes/YooKassa-Model-Payout-Payout.md#property__receipt) | | Данные чека, зарегистрированного в ФНС. Присутствует, если вы делаете выплату самозанятому. | | protected | [$_self_employed](../classes/YooKassa-Model-Payout-Payout.md#property__self_employed) | | Данные самозанятого, который получит выплату. Присутствует, если вы делаете выплату самозанятому | | protected | [$_status](../classes/YooKassa-Model-Payout-Payout.md#property__status) | | Текущее состояние выплаты | | protected | [$_test](../classes/YooKassa-Model-Payout-Payout.md#property__test) | | Признак тестовой операции | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Payout-Payout.md#method_getAmount) | | Возвращает сумму. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Payout-Payout.md#method_getCancellationDetails) | | Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [getCreatedAt()](../classes/YooKassa-Model-Payout-Payout.md#method_getCreatedAt) | | Возвращает время создания заказа. | | public | [getDeal()](../classes/YooKassa-Model-Payout-Payout.md#method_getDeal) | | Возвращает сделку, в рамках которой нужно провести выплату. | | public | [getDescription()](../classes/YooKassa-Model-Payout-Payout.md#method_getDescription) | | Возвращает описание транзакции. | | public | [getId()](../classes/YooKassa-Model-Payout-Payout.md#method_getId) | | Возвращает идентификатор выплаты. | | public | [getMetadata()](../classes/YooKassa-Model-Payout-Payout.md#method_getMetadata) | | Возвращает метаданные выплаты установленные мерчантом | | public | [getPayoutDestination()](../classes/YooKassa-Model-Payout-Payout.md#method_getPayoutDestination) | | Возвращает используемый способ проведения выплаты. | | public | [getReceipt()](../classes/YooKassa-Model-Payout-Payout.md#method_getReceipt) | | Возвращает данные чека, зарегистрированного в ФНС. | | public | [getSelfEmployed()](../classes/YooKassa-Model-Payout-Payout.md#method_getSelfEmployed) | | Возвращает данные самозанятого, который получит выплату. | | public | [getStatus()](../classes/YooKassa-Model-Payout-Payout.md#method_getStatus) | | Возвращает состояние выплаты. | | public | [getTest()](../classes/YooKassa-Model-Payout-Payout.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Payout-Payout.md#method_setAmount) | | Устанавливает сумму выплаты. | | public | [setCancellationDetails()](../classes/YooKassa-Model-Payout-Payout.md#method_setCancellationDetails) | | Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [setCreatedAt()](../classes/YooKassa-Model-Payout-Payout.md#method_setCreatedAt) | | Устанавливает время создания заказа. | | public | [setDeal()](../classes/YooKassa-Model-Payout-Payout.md#method_setDeal) | | Устанавливает сделку, в рамках которой нужно провести выплату. | | public | [setDescription()](../classes/YooKassa-Model-Payout-Payout.md#method_setDescription) | | Устанавливает описание транзакции | | public | [setId()](../classes/YooKassa-Model-Payout-Payout.md#method_setId) | | Устанавливает идентификатор выплаты. | | public | [setMetadata()](../classes/YooKassa-Model-Payout-Payout.md#method_setMetadata) | | Устанавливает метаданные выплаты. | | public | [setPayoutDestination()](../classes/YooKassa-Model-Payout-Payout.md#method_setPayoutDestination) | | Устанавливает используемый способ проведения выплаты. | | public | [setReceipt()](../classes/YooKassa-Model-Payout-Payout.md#method_setReceipt) | | Устанавливает данные чека, зарегистрированного в ФНС. | | public | [setSelfEmployed()](../classes/YooKassa-Model-Payout-Payout.md#method_setSelfEmployed) | | Устанавливает данные самозанятого, который получит выплату. | | public | [setStatus()](../classes/YooKassa-Model-Payout-Payout.md#method_setStatus) | | Устанавливает статус выплаты | | public | [setTest()](../classes/YooKassa-Model-Payout-Payout.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payouts/PayoutResponse.php](../../lib/Request/Payouts/PayoutResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) * [\YooKassa\Request\Payouts\AbstractPayoutResponse](../classes/YooKassa-Request-Payouts-AbstractPayoutResponse.md) * \YooKassa\Request\Payouts\PayoutResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Inherited from [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ```php MAX_LENGTH_DESCRIPTION = 128 : int ``` ###### MAX_LENGTH_ID Inherited from [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ```php MAX_LENGTH_ID = 50 : int ``` ###### MIN_LENGTH_ID Inherited from [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ```php MIN_LENGTH_ID = 36 : int ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма выплаты **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $cancellation_details : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене выплаты **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $cancellationDetails : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене выплаты **Type:** CancellationDetailsInterface **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $created_at : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $createdAt : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $deal : \YooKassa\Model\Deal\PayoutDealInfo --- ***Description*** Сделка, в рамках которой нужно провести выплату **Type:** PayoutDealInfo **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $description : string --- ***Description*** Описание транзакции **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $id : string --- ***Description*** Идентификатор выплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные выплаты указанные мерчантом **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $payout_destination : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения выплаты **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $payoutDestination : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения выплаты **Type:** AbstractPaymentMethod **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $receipt : \YooKassa\Model\Payout\IncomeReceipt --- ***Description*** Данные чека, зарегистрированного в ФНС **Type:** IncomeReceipt **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $self_employed : \YooKassa\Model\Payout\PayoutSelfEmployed --- ***Description*** Данные самозанятого, который получит выплату **Type:** PayoutSelfEmployed **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $selfEmployed : \YooKassa\Model\Payout\PayoutSelfEmployed --- ***Description*** Данные самозанятого, который получит выплату **Type:** PayoutSelfEmployed **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $status : string --- ***Description*** Текущее состояние выплаты **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### public $test : bool --- ***Description*** Признак тестовой операции **Type:** bool **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Summary** Сумма выплаты **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_cancellation_details : ?\YooKassa\Model\Payout\PayoutCancellationDetails --- **Summary** Комментарий к статусу canceled: кто отменил выплаты и по какой причине **Type:** PayoutCancellationDetails **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_created_at : ?\DateTime --- **Summary** Время создания выплаты. Пример: ~`2017-11-03T11:52:31.827Z` **Type:** DateTime **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_deal : ?\YooKassa\Model\Deal\PayoutDealInfo --- **Summary** Сделка, в рамках которой нужно провести выплату. Присутствует, если вы проводите Безопасную сделку **Type:** PayoutDealInfo **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_description : ?string --- **Summary** Описание транзакции (не более 128 символов). Например: «Выплата по договору 37». **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_id : ?string --- **Summary** Идентификатор выплаты. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Summary** Метаданные выплаты указанные мерчантом **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_payout_destination : ?\YooKassa\Model\Payout\AbstractPayoutDestination --- **Summary** Способ проведения выплаты **Type:** AbstractPayoutDestination **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_receipt : ?\YooKassa\Model\Payout\IncomeReceipt --- **Summary** Данные чека, зарегистрированного в ФНС. Присутствует, если вы делаете выплату самозанятому. **Type:** IncomeReceipt **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_self_employed : ?\YooKassa\Model\Payout\PayoutSelfEmployed --- **Summary** Данные самозанятого, который получит выплату. Присутствует, если вы делаете выплату самозанятому **Type:** PayoutSelfEmployed **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_status : ?string --- **Summary** Текущее состояние выплаты **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) #### protected $_test : ?bool --- **Summary** Признак тестовой операции **Type:** ?bool **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма выплаты #### public getCancellationDetails() : \YooKassa\Model\Payout\PayoutCancellationDetails|null ```php public getCancellationDetails() : \YooKassa\Model\Payout\PayoutCancellationDetails|null ``` **Summary** Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\PayoutCancellationDetails|null - Комментарий к статусу canceled #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \DateTime|null - Время создания заказа #### public getDeal() : \YooKassa\Model\Deal\PayoutDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PayoutDealInfo|null ``` **Summary** Возвращает сделку, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Deal\PayoutDealInfo|null - Сделка, в рамках которой нужно провести выплату #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** string|null - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** string|null - Идентификатор выплаты #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает метаданные выплаты установленные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные выплаты указанные мерчантом #### public getPayoutDestination() : \YooKassa\Model\Payout\AbstractPayoutDestination|null ```php public getPayoutDestination() : \YooKassa\Model\Payout\AbstractPayoutDestination|null ``` **Summary** Возвращает используемый способ проведения выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\AbstractPayoutDestination|null - Способ проведения выплаты #### public getReceipt() : \YooKassa\Model\Payout\IncomeReceipt|null ```php public getReceipt() : \YooKassa\Model\Payout\IncomeReceipt|null ``` **Summary** Возвращает данные чека, зарегистрированного в ФНС. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\IncomeReceipt|null - Данные чека, зарегистрированного в ФНС #### public getSelfEmployed() : \YooKassa\Model\Payout\PayoutSelfEmployed|null ```php public getSelfEmployed() : \YooKassa\Model\Payout\PayoutSelfEmployed|null ``` **Summary** Возвращает данные самозанятого, который получит выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** \YooKassa\Model\Payout\PayoutSelfEmployed|null - Данные самозанятого, который получит выплату #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает состояние выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** string|null - Текущее состояние выплаты #### public getTest() : bool|null ```php public getTest() : bool|null ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) **Returns:** bool|null - Признак тестовой операции #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма выплаты | **Returns:** self - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\Payout\PayoutCancellationDetails|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\PayoutCancellationDetails OR array OR null | cancellation_details | Комментарий к статусу canceled | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания выплаты. Пример: ~`2017-11-03T11:52:31.827Z` | **Returns:** self - #### public setDeal() : self ```php public setDeal(\YooKassa\Model\Deal\PayoutDealInfo|array|null $deal = null) : self ``` **Summary** Устанавливает сделку, в рамках которой нужно провести выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Deal\PayoutDealInfo OR array OR null | deal | Сделка, в рамках которой нужно провести выплату | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Описание транзакции (не более 128 символов). Например: «Выплата по договору 37». | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор выплаты | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает метаданные выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Метаданные выплаты указанные мерчантом | **Returns:** self - #### public setPayoutDestination() : $this ```php public setPayoutDestination(\YooKassa\Model\Payout\AbstractPayoutDestination|array|null $payout_destination) : $this ``` **Summary** Устанавливает используемый способ проведения выплаты. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\AbstractPayoutDestination OR array OR null | payout_destination | Способ проведения выплаты | **Returns:** $this - #### public setReceipt() : self ```php public setReceipt(\YooKassa\Model\Payout\IncomeReceipt|array|null $receipt = null) : self ``` **Summary** Устанавливает данные чека, зарегистрированного в ФНС. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\IncomeReceipt OR array OR null | receipt | Данные чека, зарегистрированного в ФНС | **Returns:** self - #### public setSelfEmployed() : self ```php public setSelfEmployed(\YooKassa\Model\Payout\PayoutSelfEmployed|array|null $self_employed = null) : self ``` **Summary** Устанавливает данные самозанятого, который получит выплату. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payout\PayoutSelfEmployed OR array OR null | self_employed | Данные самозанятого, который получит выплату | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус выплаты **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус выплаты | **Returns:** self - #### public setTest() : self ```php public setTest(bool|null $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payout\Payout](../classes/YooKassa-Model-Payout-Payout.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool OR null | test | Признак тестовой операции | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentsRequestSerializer.md000064400000004566150364342670025053 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentsRequestSerializer ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель PaymentsRequestSerializer. **Description:** Класс объекта осуществляющего сериализацию запроса к API для получения списка платежей. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [serialize()](../classes/YooKassa-Request-Payments-PaymentsRequestSerializer.md#method_serialize) | | Сериализует объект запроса к API для дальнейшей его отправки. | --- ### Details * File: [lib/Request/Payments/PaymentsRequestSerializer.php](../../lib/Request/Payments/PaymentsRequestSerializer.php) * Package: YooKassa\Request * Class Hierarchy: * \YooKassa\Request\Payments\PaymentsRequestSerializer * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public serialize() : array ```php public serialize(\YooKassa\Request\Payments\PaymentsRequestInterface $request) : array ``` **Summary** Сериализует объект запроса к API для дальнейшей его отправки. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentsRequestSerializer](../classes/YooKassa-Request-Payments-PaymentsRequestSerializer.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Request\Payments\PaymentsRequestInterface | request | Сериализуемый объект | **Returns:** array - Массив с информацией, отправляемый в дальнейшем в API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-BankCardSource.md000064400000011567150364342670024476 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\BankCardSource ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, представляющий модель BankCardSource. **Description:** Источник данных банковской карты. Возможные значения: - apple_pay - Источник данных ApplePay - google_pay - Источник данных GooglePay - mir_pay - Источник данных MirPay --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [APPLE_PAY](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardSource.md#constant_APPLE_PAY) | | Источник данных ApplePay | | public | [GOOGLE_PAY](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardSource.md#constant_GOOGLE_PAY) | | Источник данных GooglePay | | public | [MIR_PAY](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardSource.md#constant_MIR_PAY) | | Источник данных MirPay | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payment-PaymentMethod-BankCardSource.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payment/PaymentMethod/BankCardSource.php](../../lib/Model/Payment/PaymentMethod/BankCardSource.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payment\PaymentMethod\BankCardSource * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### APPLE_PAY Источник данных ApplePay ```php APPLE_PAY = 'apple_pay' ``` ###### GOOGLE_PAY Источник данных GooglePay ```php GOOGLE_PAY = 'google_pay' ``` ###### MIR_PAY Источник данных MirPay ```php MIR_PAY = 'mir_pay' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md000064400000053615150364342670026443 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentDataBankCardCard. **Description:** Данные банковской карты (необходимы, если вы собираете данные карты пользователей на своей стороне). --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$cardholder](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#property_cardholder) | | Имя владельца карты. | | public | [$csc](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#property_csc) | | Код CVC2 или CVV2, 3 или 4 символа, печатается на обратной стороне карты. | | public | [$expiry_month](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#property_expiry_month) | | Срок действия, месяц, MM. | | public | [$expiry_year](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#property_expiry_year) | | Срок действия, год, YYYY. | | public | [$expiryMonth](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#property_expiryMonth) | | Срок действия, месяц, MM. | | public | [$expiryYear](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#property_expiryYear) | | Срок действия, год, YYYY. | | public | [$number](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#property_number) | | Номер банковской карты. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCardholder()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#method_getCardholder) | | Возвращает имя держателя карты. | | public | [getCsc()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#method_getCsc) | | Возвращает CVV2/CVC2 код. | | public | [getExpiryMonth()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#method_getExpiryMonth) | | Возвращает месяц срока действия карты. | | public | [getExpiryYear()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#method_getExpiryYear) | | Возвращает год срока действия карты. | | public | [getNumber()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#method_getNumber) | | Возвращает номер банковской карты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCardholder()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#method_setCardholder) | | Устанавливает имя держателя карты. | | public | [setCsc()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#method_setCsc) | | Устанавливает CVV2/CVC2 код. | | public | [setExpiryMonth()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#method_setExpiryMonth) | | Устанавливает месяц срока действия карты. | | public | [setExpiryYear()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#method_setExpiryYear) | | Устанавливает год срока действия карты. | | public | [setNumber()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md#method_setNumber) | | Устанавливает номер банковской карты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataBankCardCard.php](../../lib/Request/Payments/PaymentData/PaymentDataBankCardCard.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $cardholder : string --- ***Description*** Имя владельца карты. **Type:** string **Details:** #### public $csc : string --- ***Description*** Код CVC2 или CVV2, 3 или 4 символа, печатается на обратной стороне карты. **Type:** string **Details:** #### public $expiry_month : string --- ***Description*** Срок действия, месяц, MM. **Type:** string **Details:** #### public $expiry_year : string --- ***Description*** Срок действия, год, YYYY. **Type:** string **Details:** #### public $expiryMonth : string --- ***Description*** Срок действия, месяц, MM. **Type:** string **Details:** #### public $expiryYear : string --- ***Description*** Срок действия, год, YYYY. **Type:** string **Details:** #### public $number : string --- ***Description*** Номер банковской карты. **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCardholder() : string|null ```php public getCardholder() : string|null ``` **Summary** Возвращает имя держателя карты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md) **Returns:** string|null - Имя держателя карты #### public getCsc() : string|null ```php public getCsc() : string|null ``` **Summary** Возвращает CVV2/CVC2 код. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md) **Returns:** string|null - CVV2/CVC2 код #### public getExpiryMonth() : string|null ```php public getExpiryMonth() : string|null ``` **Summary** Возвращает месяц срока действия карты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md) **Returns:** string|null - Срок действия, месяц, MM #### public getExpiryYear() : string|null ```php public getExpiryYear() : string|null ``` **Summary** Возвращает год срока действия карты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md) **Returns:** string|null - Срок действия, год, YYYY #### public getNumber() : string|null ```php public getNumber() : string|null ``` **Summary** Возвращает номер банковской карты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md) **Returns:** string|null - Номер банковской карты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCardholder() : self ```php public setCardholder(string|null $cardholder = null) : self ``` **Summary** Устанавливает имя держателя карты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | cardholder | Имя держателя карты | **Returns:** self - #### public setCsc() : self ```php public setCsc(string|null $csc = null) : self ``` **Summary** Устанавливает CVV2/CVC2 код. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | csc | CVV2/CVC2 код | **Returns:** self - #### public setExpiryMonth() : self ```php public setExpiryMonth(string|null $expiry_month = null) : self ``` **Summary** Устанавливает месяц срока действия карты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | expiry_month | Срок действия, месяц, MM | **Returns:** self - #### public setExpiryYear() : self ```php public setExpiryYear(string|null $expiry_year = null) : self ``` **Summary** Устанавливает год срока действия карты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | expiry_year | Срок действия, год, YYYY | **Returns:** self - #### public setNumber() : self ```php public setNumber(string|null $number = null) : self ``` **Summary** Устанавливает номер банковской карты. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataBankCardCard](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataBankCardCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | number | Номер банковской карты | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md000064400000017664150364342670030730 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Interface: PayerBankDetailsInterface ### Namespace: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank](../namespaces/yookassa-model-payment-paymentmethod-b2b-sberbank.md) --- **Summary:** Interface PayerBankDetailsInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAccount()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md#method_getAccount) | | Возвращает номер счета организации. | | public | [getAddress()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md#method_getAddress) | | Возвращает адрес организации. | | public | [getBankBik()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md#method_getBankBik) | | Возвращает БИК банка организации. | | public | [getBankBranch()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md#method_getBankBranch) | | Возвращает отделение банка организации. | | public | [getBankName()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md#method_getBankName) | | Возвращает наименование банка организации. | | public | [getFullName()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md#method_getFullName) | | Возвращает полное наименование организации. | | public | [getInn()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md#method_getInn) | | Возвращает ИНН организации. | | public | [getKpp()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md#method_getKpp) | | Возвращает КПП организации. | | public | [getShortName()](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md#method_getShortName) | | Возвращает сокращенное наименование организации. | --- ### Details * File: [lib/Model/Payment/PaymentMethod/B2b/Sberbank/PayerBankDetailsInterface.php](../../lib/Model/Payment/PaymentMethod/B2b/Sberbank/PayerBankDetailsInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Полное наименование организации | | property | | Сокращенное наименование организации | | property | | Адрес организации | | property | | ИНН организации | | property | | КПП организации | | property | | Наименование банка организации | | property | | Отделение банка организации | | property | | БИК банка организации | | property | | Номер счета организации | --- ## Methods #### public getFullName() : string|null ```php public getFullName() : string|null ``` **Summary** Возвращает полное наименование организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetailsInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md) **Returns:** string|null - Полное наименование организации #### public getShortName() : string|null ```php public getShortName() : string|null ``` **Summary** Возвращает сокращенное наименование организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetailsInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md) **Returns:** string|null - Сокращенное наименование организации #### public getAddress() : string|null ```php public getAddress() : string|null ``` **Summary** Возвращает адрес организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetailsInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md) **Returns:** string|null - Адрес организации #### public getInn() : string|null ```php public getInn() : string|null ``` **Summary** Возвращает ИНН организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetailsInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md) **Returns:** string|null - ИНН организации #### public getKpp() : string|null ```php public getKpp() : string|null ``` **Summary** Возвращает КПП организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetailsInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md) **Returns:** string|null - КПП организации #### public getBankName() : string|null ```php public getBankName() : string|null ``` **Summary** Возвращает наименование банка организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetailsInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md) **Returns:** string|null - Наименование банка организации #### public getBankBranch() : string|null ```php public getBankBranch() : string|null ``` **Summary** Возвращает отделение банка организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetailsInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md) **Returns:** string|null - Отделение банка организации #### public getBankBik() : string|null ```php public getBankBik() : string|null ``` **Summary** Возвращает БИК банка организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetailsInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md) **Returns:** string|null - БИК банка организации #### public getAccount() : string|null ```php public getAccount() : string|null ``` **Summary** Возвращает номер счета организации. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\B2b\Sberbank\PayerBankDetailsInterface](../classes/YooKassa-Model-Payment-PaymentMethod-B2b-Sberbank-PayerBankDetailsInterface.md) **Returns:** string|null - Номер счета организации --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-PayoutDestinationFactory.md000064400000006434150364342670023750 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payout\PayoutDestinationFactory ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель PayoutDestinationFactory. **Description:** Фабрика создания объекта платежных методов из массива. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [factory()](../classes/YooKassa-Model-Payout-PayoutDestinationFactory.md#method_factory) | | Фабричный метод создания объекта платежных данных по типу. | | public | [factoryFromArray()](../classes/YooKassa-Model-Payout-PayoutDestinationFactory.md#method_factoryFromArray) | | Фабричный метод создания объекта платежных данных из массива. | --- ### Details * File: [lib/Model/Payout/PayoutDestinationFactory.php](../../lib/Model/Payout/PayoutDestinationFactory.php) * Package: YooKassa\Model * Class Hierarchy: * \YooKassa\Model\Payout\PayoutDestinationFactory * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public factory() : \YooKassa\Model\Payout\AbstractPayoutDestination ```php public factory(string|null $type) : \YooKassa\Model\Payout\AbstractPayoutDestination ``` **Summary** Фабричный метод создания объекта платежных данных по типу. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationFactory](../classes/YooKassa-Model-Payout-PayoutDestinationFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежных данных | **Returns:** \YooKassa\Model\Payout\AbstractPayoutDestination - #### public factoryFromArray() : \YooKassa\Model\Payout\AbstractPayoutDestination ```php public factoryFromArray(array $data, null|string $type = null) : \YooKassa\Model\Payout\AbstractPayoutDestination ``` **Summary** Фабричный метод создания объекта платежных данных из массива. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationFactory](../classes/YooKassa-Model-Payout-PayoutDestinationFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | data | Массив платежных данных | | null OR string | type | Тип платежных данных | **Returns:** \YooKassa\Model\Payout\AbstractPayoutDestination - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-ResponseProcessingException.md000064400000010647150364342670025500 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\ResponseProcessingException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- **Summary:** Запрос был принят на обработку, но она не завершена. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [HTTP_CODE](../classes/YooKassa-Common-Exceptions-ResponseProcessingException.md#constant_HTTP_CODE) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$retryAfter](../classes/YooKassa-Common-Exceptions-ResponseProcessingException.md#property_retryAfter) | | | | public | [$type](../classes/YooKassa-Common-Exceptions-ResponseProcessingException.md#property_type) | | | | protected | [$responseBody](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseBody) | | | | protected | [$responseHeaders](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseHeaders) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-ResponseProcessingException.md#method___construct) | | Constructor. | | public | [getResponseBody()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseBody) | | | | public | [getResponseHeaders()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseHeaders) | | | --- ### Details * File: [lib/Common/Exceptions/ResponseProcessingException.php](../../lib/Common/Exceptions/ResponseProcessingException.php) * Package: Default * Class Hierarchy: * [\Exception](\Exception) * [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) * \YooKassa\Common\Exceptions\ResponseProcessingException --- ## Constants ###### HTTP_CODE ```php HTTP_CODE = 202 ``` --- ## Properties #### public $retryAfter : mixed --- **Type:** mixed **Details:** #### public $type : mixed --- **Type:** mixed **Details:** #### protected $responseBody : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) #### protected $responseHeaders : array --- **Type:** array **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array $responseHeaders = [], ?string $responseBody = '') : mixed ``` **Summary** Constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ResponseProcessingException](../classes/YooKassa-Common-Exceptions-ResponseProcessingException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | responseHeaders | HTTP header | | ?string | responseBody | HTTP body | **Returns:** mixed - #### public getResponseBody() : ?string ```php public getResponseBody() : ?string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** ?string - #### public getResponseHeaders() : string[] ```php public getResponseHeaders() : string[] ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** string[] - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-PaymentData-PaymentDataFactory.md000064400000006761150364342670025613 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\PaymentData\PaymentDataFactory ### Namespace: [\YooKassa\Request\Payments\PaymentData](../namespaces/yookassa-request-payments-paymentdata.md) --- **Summary:** Класс, представляющий модель PaymentDataFactory. **Description:** Фабрика создания объекта платежных данных из массива. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [factory()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataFactory.md#method_factory) | | Фабричный метод создания объекта платежных данных по типу. | | public | [factoryFromArray()](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataFactory.md#method_factoryFromArray) | | Фабричный метод создания объекта платежных данных из массива. | --- ### Details * File: [lib/Request/Payments/PaymentData/PaymentDataFactory.php](../../lib/Request/Payments/PaymentData/PaymentDataFactory.php) * Package: YooKassa\Request * Class Hierarchy: * \YooKassa\Request\Payments\PaymentData\PaymentDataFactory * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public factory() : \YooKassa\Request\Payments\PaymentData\AbstractPaymentData ```php public factory(string|null $type = null) : \YooKassa\Request\Payments\PaymentData\AbstractPaymentData ``` **Summary** Фабричный метод создания объекта платежных данных по типу. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataFactory](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип платежных данных | **Returns:** \YooKassa\Request\Payments\PaymentData\AbstractPaymentData - #### public factoryFromArray() : \YooKassa\Request\Payments\PaymentData\AbstractPaymentData ```php public factoryFromArray(array|null $data = null, string|null $type = null) : \YooKassa\Request\Payments\PaymentData\AbstractPaymentData ``` **Summary** Фабричный метод создания объекта платежных данных из массива. **Details:** * Inherited From: [\YooKassa\Request\Payments\PaymentData\PaymentDataFactory](../classes/YooKassa-Request-Payments-PaymentData-PaymentDataFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | Массив платежных данных | | string OR null | type | Тип платежных данных | **Returns:** \YooKassa\Request\Payments\PaymentData\AbstractPaymentData - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Refunds-RefundsRequest.md000064400000123234150364342670022427 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Refunds\RefundsRequest ### Namespace: [\YooKassa\Request\Refunds](../namespaces/yookassa-request-refunds.md) --- **Summary:** Класс, представляющий модель RefundsRequest. **Description:** Класс объекта запроса к API списка возвратов магазина. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LIMIT_VALUE](../classes/YooKassa-Request-Refunds-RefundsRequest.md#constant_MAX_LIMIT_VALUE) | | Максимальное количество объектов возвратов в выборке | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$createdAtGt](../classes/YooKassa-Request-Refunds-RefundsRequest.md#property_createdAtGt) | | Время создания, от (не включая) | | public | [$createdAtGte](../classes/YooKassa-Request-Refunds-RefundsRequest.md#property_createdAtGte) | | Время создания, от (включительно) | | public | [$createdAtLt](../classes/YooKassa-Request-Refunds-RefundsRequest.md#property_createdAtLt) | | Время создания, до (не включая) | | public | [$createdAtLte](../classes/YooKassa-Request-Refunds-RefundsRequest.md#property_createdAtLte) | | Время создания, до (включительно) | | public | [$cursor](../classes/YooKassa-Request-Refunds-RefundsRequest.md#property_cursor) | | Токен для получения следующей страницы выборки | | public | [$limit](../classes/YooKassa-Request-Refunds-RefundsRequest.md#property_limit) | | Ограничение количества объектов возврата, отображаемых на одной странице выдачи | | public | [$paymentId](../classes/YooKassa-Request-Refunds-RefundsRequest.md#property_paymentId) | | Идентификатор платежа | | public | [$status](../classes/YooKassa-Request-Refunds-RefundsRequest.md#property_status) | | Статус возврата | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [builder()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_builder) | | Возвращает инстанс билдера объектов запросов списка возвратов магазина. | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCreatedAtGt()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_getCreatedAtGt) | | Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCreatedAtGte()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_getCreatedAtGte) | | Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCreatedAtLt()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_getCreatedAtLt) | | Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCreatedAtLte()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_getCreatedAtLte) | | Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCursor()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_getCursor) | | Возвращает токен для получения следующей страницы выборки. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [getLimit()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_getLimit) | | Ограничение количества объектов платежа. | | public | [getPaymentId()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_getPaymentId) | | Возвращает идентификатор платежа если он задан или null. | | public | [getStatus()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_getStatus) | | Возвращает статус выбираемых возвратов или null, если он до этого не был установлен. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasCreatedAtGt()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_hasCreatedAtGt) | | Проверяет, была ли установлена дата создания от которой выбираются возвраты. | | public | [hasCreatedAtGte()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_hasCreatedAtGte) | | Проверяет, была ли установлена дата создания от которой выбираются возвраты. | | public | [hasCreatedAtLt()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_hasCreatedAtLt) | | Проверяет, была ли установлена дата создания до которой выбираются возвраты. | | public | [hasCreatedAtLte()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_hasCreatedAtLte) | | Проверяет, была ли установлена дата создания до которой выбираются возвраты. | | public | [hasCursor()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_hasCursor) | | Проверяет, был ли установлен токен следующей страницы. | | public | [hasLimit()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_hasLimit) | | Проверяет, было ли установлено ограничение количества объектов платежа. | | public | [hasPaymentId()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_hasPaymentId) | | Проверяет, был ли задан идентификатор платежа. | | public | [hasStatus()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_hasStatus) | | Проверяет, был ли установлен статус выбираемых возвратов. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCreatedAtGt()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_setCreatedAtGt) | | Устанавливает дату создания от которой выбираются возвраты. | | public | [setCreatedAtGte()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_setCreatedAtGte) | | Устанавливает дату создания от которой выбираются возвраты. | | public | [setCreatedAtLt()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_setCreatedAtLt) | | Устанавливает дату создания до которой выбираются возвраты. | | public | [setCreatedAtLte()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_setCreatedAtLte) | | Устанавливает дату создания до которой выбираются возвраты. | | public | [setCursor()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_setCursor) | | Устанавливает токен следующей страницы выборки. | | public | [setLimit()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_setLimit) | | Устанавливает ограничение количества объектов платежа. | | public | [setPaymentId()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_setPaymentId) | | Устанавливает идентификатор платежа или null, если требуется его удалить. | | public | [setStatus()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_setStatus) | | Устанавливает статус выбираемых возвратов. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | public | [validate()](../classes/YooKassa-Request-Refunds-RefundsRequest.md#method_validate) | | Проверяет валидность текущего объекта запроса. | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_setValidationError) | | Устанавливает ошибку валидации. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Refunds/RefundsRequest.php](../../lib/Request/Refunds/RefundsRequest.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) * \YooKassa\Request\Refunds\RefundsRequest * Implements: * [\YooKassa\Request\Refunds\RefundsRequestInterface](../classes/YooKassa-Request-Refunds-RefundsRequestInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LIMIT_VALUE Максимальное количество объектов возвратов в выборке ```php MAX_LIMIT_VALUE = 100 ``` --- ## Properties #### public $createdAtGt : \DateTime --- ***Description*** Время создания, от (не включая) **Type:** \DateTime **Details:** #### public $createdAtGte : \DateTime --- ***Description*** Время создания, от (включительно) **Type:** \DateTime **Details:** #### public $createdAtLt : \DateTime --- ***Description*** Время создания, до (не включая) **Type:** \DateTime **Details:** #### public $createdAtLte : \DateTime --- ***Description*** Время создания, до (включительно) **Type:** \DateTime **Details:** #### public $cursor : string --- ***Description*** Токен для получения следующей страницы выборки **Type:** string **Details:** #### public $limit : null|int --- ***Description*** Ограничение количества объектов возврата, отображаемых на одной странице выдачи **Type:** null|int **Details:** #### public $paymentId : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** #### public $status : string --- ***Description*** Статус возврата **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public builder() : \YooKassa\Request\Refunds\RefundsRequestBuilder ```php Static public builder() : \YooKassa\Request\Refunds\RefundsRequestBuilder ``` **Summary** Возвращает инстанс билдера объектов запросов списка возвратов магазина. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** \YooKassa\Request\Refunds\RefundsRequestBuilder - Билдер объектов запросов списка возвратов #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCreatedAtGt() : null|\DateTime ```php public getCreatedAtGt() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** null|\DateTime - Время создания, от (не включая) #### public getCreatedAtGte() : null|\DateTime ```php public getCreatedAtGte() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** null|\DateTime - Время создания, от (включительно) #### public getCreatedAtLt() : null|\DateTime ```php public getCreatedAtLt() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** null|\DateTime - Время создания, до (не включая) #### public getCreatedAtLte() : null|\DateTime ```php public getCreatedAtLte() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** null|\DateTime - Время создания, до (включительно) #### public getCursor() : null|string ```php public getCursor() : null|string ``` **Summary** Возвращает токен для получения следующей страницы выборки. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** null|string - Токен для получения следующей страницы выборки #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string|null - Последняя произошедшая ошибка валидации #### public getLimit() : null|int ```php public getLimit() : null|int ``` **Summary** Ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** null|int - Ограничение количества объектов платежа #### public getPaymentId() : null|string ```php public getPaymentId() : null|string ``` **Summary** Возвращает идентификатор платежа если он задан или null. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** null|string - Идентификатор платежа #### public getStatus() : null|string ```php public getStatus() : null|string ``` **Summary** Возвращает статус выбираемых возвратов или null, если он до этого не был установлен. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** null|string - Статус выбираемых возвратов #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasCreatedAtGt() : bool ```php public hasCreatedAtGt() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCreatedAtGte() : bool ```php public hasCreatedAtGte() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCreatedAtLt() : bool ```php public hasCreatedAtLt() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCreatedAtLte() : bool ```php public hasCreatedAtLte() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCursor() : bool ```php public hasCursor() : bool ``` **Summary** Проверяет, был ли установлен токен следующей страницы. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** bool - True если токен был установлен, false если нет #### public hasLimit() : bool ```php public hasLimit() : bool ``` **Summary** Проверяет, было ли установлено ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** bool - True если было установлено, false если нет #### public hasPaymentId() : bool ```php public hasPaymentId() : bool ``` **Summary** Проверяет, был ли задан идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** bool - True если идентификатор был задан, false если нет #### public hasStatus() : bool ```php public hasStatus() : bool ``` **Summary** Проверяет, был ли установлен статус выбираемых возвратов. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** bool - True если статус был установлен, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCreatedAtGt() : void ```php public setCreatedAtGt(null|\DateTime|int|string $value) : void ``` **Summary** Устанавливает дату создания от которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, от (не включая) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** void - #### public setCreatedAtGte() : void ```php public setCreatedAtGte(null|\DateTime|int|string $value) : void ``` **Summary** Устанавливает дату создания от которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, от (включительно) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** void - #### public setCreatedAtLt() : void ```php public setCreatedAtLt(null|\DateTime|int|string $value) : void ``` **Summary** Устанавливает дату создания до которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, до (не включая) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** void - #### public setCreatedAtLte() : void ```php public setCreatedAtLte(null|\DateTime|int|string $value) : void ``` **Summary** Устанавливает дату создания до которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | value | Время создания, до (включительно) или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Генерируется если была передана дата в невалидном формате (была передана строка или число, которые не удалось преобразовать в валидную дату) | | \Exception|\YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если была передана дата с не тем типом (передана не строка, не число и не значение типа DateTime) | **Returns:** void - #### public setCursor() : void ```php public setCursor(string|null $value) : void ``` **Summary** Устанавливает токен следующей страницы выборки. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Токен следующей страницы выборки или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод была передана не строка | **Returns:** void - #### public setLimit() : void ```php public setLimit(null|int|string $value) : void ``` **Summary** Устанавливает ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR int OR string | value | Ограничение количества объектов платежа или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается, если в метод было передано не целое число | **Returns:** void - #### public setPaymentId() : void ```php public setPaymentId(null|string $value) : void ``` **Summary** Устанавливает идентификатор платежа или null, если требуется его удалить. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | value | Идентификатор платежа | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если длина переданной строки не равна 36 символам | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод была передана не строка | **Returns:** void - #### public setStatus() : void ```php public setStatus(string|null $value) : void ``` **Summary** Устанавливает статус выбираемых возвратов. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Статус выбираемых платежей или null, чтобы удалить значение | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если переданное значение не является валидным статусом | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в метод была передана не строка | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public validate() : bool ```php public validate() : bool ``` **Summary** Проверяет валидность текущего объекта запроса. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsRequest](../classes/YooKassa-Request-Refunds-RefundsRequest.md) **Returns:** bool - True если объект валиден, false если нет #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setValidationError() : void ```php protected setValidationError(string $value) : void ``` **Summary** Устанавливает ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** void - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Refunds-RefundsResponse.md000064400000045012150364342670022572 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Refunds\RefundsResponse ### Namespace: [\YooKassa\Request\Refunds](../namespaces/yookassa-request-refunds.md) --- **Summary:** Класс, представляющий модель RefundsResponse. **Description:** Класс объекта ответа от API со списком возвратов магазина. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$items](../classes/YooKassa-Request-Refunds-RefundsResponse.md#property_items) | | Массив возвратов | | public | [$nextCursor](../classes/YooKassa-Request-AbstractListResponse.md#property_nextCursor) | | Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. | | public | [$type](../classes/YooKassa-Request-AbstractListResponse.md#property_type) | | Формат выдачи результатов запроса. Возможное значение: `list` (список). | | protected | [$_items](../classes/YooKassa-Request-Refunds-RefundsResponse.md#property__items) | | | | protected | [$_next_cursor](../classes/YooKassa-Request-AbstractListResponse.md#property__next_cursor) | | Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. | | protected | [$_type](../classes/YooKassa-Request-AbstractListResponse.md#property__type) | | Формат выдачи результатов запроса. Возможное значение: `list` (список). | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getItems()](../classes/YooKassa-Request-Refunds-RefundsResponse.md#method_getItems) | | Возвращает список возвратов. | | public | [getNextCursor()](../classes/YooKassa-Request-AbstractListResponse.md#method_getNextCursor) | | Возвращает токен следующей страницы, если он задан, или null. | | public | [getType()](../classes/YooKassa-Request-AbstractListResponse.md#method_getType) | | Возвращает формат выдачи результатов запроса. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasNextCursor()](../classes/YooKassa-Request-AbstractListResponse.md#method_hasNextCursor) | | Проверяет, имеется ли в ответе токен следующей страницы. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Refunds/RefundsResponse.php](../../lib/Request/Refunds/RefundsResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) * \YooKassa\Request\Refunds\RefundsResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $items : \YooKassa\Model\Refund\RefundInterface[]|\YooKassa\Common\ListObjectInterface|null --- ***Description*** Массив возвратов **Type:** ListObjectInterface|null **Details:** #### public $nextCursor : string --- ***Description*** Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### public $type : string --- ***Description*** Формат выдачи результатов запроса. Возможное значение: `list` (список). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### protected $_items : ?\YooKassa\Common\ListObject --- **Type:** ListObject Массив возвратов **Details:** #### protected $_next_cursor : ?string --- **Summary** Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) #### protected $_type : string --- **Summary** Формат выдачи результатов запроса. Возможное значение: `list` (список). **Type:** string **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getItems() : \YooKassa\Model\Refund\RefundInterface[]|\YooKassa\Common\ListObjectInterface ```php public getItems() : \YooKassa\Model\Refund\RefundInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список возвратов. **Details:** * Inherited From: [\YooKassa\Request\Refunds\RefundsResponse](../classes/YooKassa-Request-Refunds-RefundsResponse.md) **Returns:** \YooKassa\Model\Refund\RefundInterface[]|\YooKassa\Common\ListObjectInterface - Список возвратов #### public getNextCursor() : null|string ```php public getNextCursor() : null|string ``` **Summary** Возвращает токен следующей страницы, если он задан, или null. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** null|string - Токен следующей страницы #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает формат выдачи результатов запроса. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasNextCursor() : bool ```php public hasNextCursor() : bool ``` **Summary** Проверяет, имеется ли в ответе токен следующей страницы. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** bool - True если токен следующей страницы есть, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-PersonalData-PersonalDataInterface.md000064400000027772150364342670024237 0ustar00# [YooKassa API SDK](../home.md) # Interface: PersonalDataInterface ### Namespace: [\YooKassa\Model\PersonalData](../namespaces/yookassa-model-personaldata.md) --- **Summary:** Interface PersonalDataInterface. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | * [public MIN_LENGTH_ID](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#constant_MIN_LENGTH_ID) * [public MAX_LENGTH_ID](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#constant_MAX_LENGTH_ID) --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getCancellationDetails()](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#method_getCancellationDetails) | | Возвращает cancellation_details. | | public | [getCreatedAt()](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#method_getCreatedAt) | | Возвращает created_at. | | public | [getExpiresAt()](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#method_getExpiresAt) | | Возвращает expires_at. | | public | [getId()](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#method_getId) | | Возвращает id. | | public | [getMetadata()](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#method_getMetadata) | | Возвращает metadata. | | public | [getStatus()](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#method_getStatus) | | Возвращает статус персональных данных. | | public | [getType()](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#method_getType) | | Возвращает тип персональных данных. | | public | [setCancellationDetails()](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#method_setCancellationDetails) | | Устанавливает cancellation_details. | | public | [setCreatedAt()](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#method_setCreatedAt) | | Устанавливает время создания персональных данных. | | public | [setExpiresAt()](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#method_setExpiresAt) | | Устанавливает срок жизни объекта персональных данных. | | public | [setId()](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#method_setId) | | Устанавливает id. | | public | [setMetadata()](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#method_setMetadata) | | Устанавливает metadata. | | public | [setStatus()](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#method_setStatus) | | Устанавливает статус персональных данных. | | public | [setType()](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md#method_setType) | | Устанавливает тип персональных данных. | --- ### Details * File: [lib/Model/PersonalData/PersonalDataInterface.php](../../lib/Model/PersonalData/PersonalDataInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Interface | | author | | cms@yoomoney.ru | | property | | Идентификатор персональных данных | | property | | Тип персональных данных | | property | | Текущий статус персональных данных | | property | | Время создания персональных данных | | property | | Время создания персональных данных | | property | | Срок жизни объекта персональных данных | | property | | Срок жизни объекта персональных данных | | property | | Комментарий к отмене выплаты | | property | | Комментарий к отмене выплаты | | property | | Метаданные выплаты указанные мерчантом | --- ## Constants ###### MIN_LENGTH_ID ```php MIN_LENGTH_ID = 36 : int ``` ###### MAX_LENGTH_ID ```php MAX_LENGTH_ID = 50 : int ``` --- ## Methods #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает id. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) **Returns:** string|null - #### public setId() : self ```php public setId(string|null $id) : self ``` **Summary** Устанавливает id. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | идентификатор персональных данных, сохраненных в ЮKassa | **Returns:** self - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) **Returns:** string|null - Тип персональных данных #### public setType() : self ```php public setType(string|null $type) : self ``` **Summary** Устанавливает тип персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Тип персональных данных | **Returns:** self - #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) **Returns:** string|null - Статус персональных данных #### public setStatus() : self ```php public setStatus(string|null $status) : self ``` **Summary** Устанавливает статус персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус персональных данных | **Returns:** self - #### public getCancellationDetails() : ?\YooKassa\Model\PersonalData\PersonalDataCancellationDetails ```php public getCancellationDetails() : ?\YooKassa\Model\PersonalData\PersonalDataCancellationDetails ``` **Summary** Возвращает cancellation_details. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) **Returns:** ?\YooKassa\Model\PersonalData\PersonalDataCancellationDetails - #### public setCancellationDetails() : self ```php public setCancellationDetails(null|array|\YooKassa\Model\PersonalData\PersonalDataCancellationDetails $cancellation_details) : self ``` **Summary** Устанавливает cancellation_details. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\PersonalData\PersonalDataCancellationDetails | cancellation_details | | **Returns:** self - #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает created_at. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) **Returns:** \DateTime|null - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at) : self ``` **Summary** Устанавливает время создания персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания персональных данных | **Returns:** self - #### public getExpiresAt() : \DateTime|null ```php public getExpiresAt() : \DateTime|null ``` **Summary** Возвращает expires_at. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) **Returns:** \DateTime|null - #### public setExpiresAt() : self ```php public setExpiresAt(\DateTime|string|null $expires_at = null) : self ``` **Summary** Устанавливает срок жизни объекта персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at | Срок жизни объекта персональных данных | **Returns:** self - #### public getMetadata() : ?\YooKassa\Model\Metadata ```php public getMetadata() : ?\YooKassa\Model\Metadata ``` **Summary** Возвращает metadata. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) **Returns:** ?\YooKassa\Model\Metadata - #### public setMetadata() : self ```php public setMetadata(null|array|\YooKassa\Model\Metadata $metadata = null) : self ``` **Summary** Устанавливает metadata. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalDataInterface](../classes/YooKassa-Model-PersonalData-PersonalDataInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Metadata | metadata | любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа) | **Returns:** self - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md000064400000055573150364342670024610 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payout\PayoutDestinationBankCardCard ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель PayoutDestinationBankCardCard. **Description:** Данные банковской карты. Необходим при оплате PCI-DSS данными. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [ISO_3166_CODE_LENGTH](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#constant_ISO_3166_CODE_LENGTH) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$card_type](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#property_card_type) | | Тип банковской карты | | public | [$cardType](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#property_cardType) | | Тип банковской карты | | public | [$first6](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#property_first6) | | Первые 6 цифр номера карты | | public | [$issuer_country](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#property_issuer_country) | | Код страны, в которой выпущена карта | | public | [$issuer_name](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#property_issuer_name) | | Тип банковской карты | | public | [$issuerCountry](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#property_issuerCountry) | | Код страны, в которой выпущена карта | | public | [$issuerName](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#property_issuerName) | | Тип банковской карты | | public | [$last4](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#property_last4) | | Последние 4 цифры номера карты | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCardType()](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#method_getCardType) | | Возвращает тип банковской карты. | | public | [getFirst6()](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#method_getFirst6) | | Возвращает первые 6 цифр номера карты. | | public | [getIssuerCountry()](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#method_getIssuerCountry) | | Возвращает код страны, в которой выпущена карта. Передается в формате ISO-3166 alpha-2. | | public | [getIssuerName()](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#method_getIssuerName) | | Возвращает наименование банка, выпустившего карту. | | public | [getLast4()](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#method_getLast4) | | Возвращает последние 4 цифры номера карты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCardType()](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#method_setCardType) | | Устанавливает тип банковской карты. | | public | [setFirst6()](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#method_setFirst6) | | Устанавливает первые 6 цифр номера карты. | | public | [setIssuerCountry()](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#method_setIssuerCountry) | | Устанавливает код страны, в которой выпущена карта. Передается в формате ISO-3166 alpha-2. | | public | [setIssuerName()](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#method_setIssuerName) | | Устанавливает наименование банка, выпустившего карту. | | public | [setLast4()](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md#method_setLast4) | | Устанавливает последние 4 цифры номера карты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payout/PayoutDestinationBankCardCard.php](../../lib/Model/Payout/PayoutDestinationBankCardCard.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payout\PayoutDestinationBankCardCard * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### ISO_3166_CODE_LENGTH ```php ISO_3166_CODE_LENGTH = 2 : int ``` --- ## Properties #### public $card_type : string --- ***Description*** Тип банковской карты **Type:** string **Details:** #### public $cardType : string --- ***Description*** Тип банковской карты **Type:** string **Details:** #### public $first6 : string --- ***Description*** Первые 6 цифр номера карты **Type:** string **Details:** #### public $issuer_country : string --- ***Description*** Код страны, в которой выпущена карта **Type:** string **Details:** #### public $issuer_name : string --- ***Description*** Тип банковской карты **Type:** string **Details:** #### public $issuerCountry : string --- ***Description*** Код страны, в которой выпущена карта **Type:** string **Details:** #### public $issuerName : string --- ***Description*** Тип банковской карты **Type:** string **Details:** #### public $last4 : string --- ***Description*** Последние 4 цифры номера карты **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCardType() : string|null ```php public getCardType() : string|null ``` **Summary** Возвращает тип банковской карты. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationBankCardCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md) **Returns:** string|null - Тип банковской карты #### public getFirst6() : string|null ```php public getFirst6() : string|null ``` **Summary** Возвращает первые 6 цифр номера карты. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationBankCardCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md) **Returns:** string|null - Первые 6 цифр номера карты #### public getIssuerCountry() : string|null ```php public getIssuerCountry() : string|null ``` **Summary** Возвращает код страны, в которой выпущена карта. Передается в формате ISO-3166 alpha-2. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationBankCardCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md) **Returns:** string|null - Код страны, в которой выпущена карта #### public getIssuerName() : string|null ```php public getIssuerName() : string|null ``` **Summary** Возвращает наименование банка, выпустившего карту. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationBankCardCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md) **Returns:** string|null - Наименование банка, выпустившего карту #### public getLast4() : string|null ```php public getLast4() : string|null ``` **Summary** Возвращает последние 4 цифры номера карты. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationBankCardCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md) **Returns:** string|null - Последние 4 цифры номера карты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCardType() : self ```php public setCardType(string|null $card_type = null) : self ``` **Summary** Устанавливает тип банковской карты. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationBankCardCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | card_type | Тип банковской карты | **Returns:** self - #### public setFirst6() : self ```php public setFirst6(string|null $first6 = null) : self ``` **Summary** Устанавливает первые 6 цифр номера карты. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationBankCardCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | first6 | Первые 6 цифр номера карты | **Returns:** self - #### public setIssuerCountry() : self ```php public setIssuerCountry(string|null $issuer_country = null) : self ``` **Summary** Устанавливает код страны, в которой выпущена карта. Передается в формате ISO-3166 alpha-2. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationBankCardCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | issuer_country | Код страны, в которой выпущена карта | **Returns:** self - #### public setIssuerName() : self ```php public setIssuerName(string|null $issuer_name = null) : self ``` **Summary** Устанавливает наименование банка, выпустившего карту. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationBankCardCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | issuer_name | Наименование банка, выпустившего карту | **Returns:** self - #### public setLast4() : self ```php public setLast4(string|null $last4 = null) : self ``` **Summary** Устанавливает последние 4 цифры номера карты. **Details:** * Inherited From: [\YooKassa\Model\Payout\PayoutDestinationBankCardCard](../classes/YooKassa-Model-Payout-PayoutDestinationBankCardCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | last4 | Последние 4 цифры номера карты | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationRedirect.md000064400000043147150364342670026471 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\SelfEmployed\SelfEmployedConfirmationRedirect ### Namespace: [\YooKassa\Model\SelfEmployed](../namespaces/yookassa-model-selfemployed.md) --- **Summary:** Класс, представляющий модель SelfEmployedConfirmationRedirect. **Description:** Перенаправление пользователя на сайт сервиса Мой налог для выдачи прав ЮMoney. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$confirmation_url](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationRedirect.md#property_confirmation_url) | | URL на который необходимо перенаправить плательщика для подтверждения оплаты | | public | [$confirmationUrl](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationRedirect.md#property_confirmationUrl) | | URL на который необходимо перенаправить плательщика для подтверждения оплаты | | public | [$type](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md#property_type) | | Тип сценария подтверждения. | | protected | [$_type](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md#property__type) | | Код сценария подтверждения. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationRedirect.md#method___construct) | | Конструктор SelfEmployedConfirmationRedirect. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getConfirmationUrl()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationRedirect.md#method_getConfirmationUrl) | | Возвращает url, на который необходимо перенаправить самозанятого. | | public | [getType()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md#method_getType) | | Возвращает код сценария подтверждения. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setConfirmationUrl()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationRedirect.md#method_setConfirmationUrl) | | Устанавливает url, на который необходимо перенаправить самозанятого. | | public | [setType()](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md#method_setType) | | Устанавливает код сценария подтверждения. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/SelfEmployed/SelfEmployedConfirmationRedirect.php](../../lib/Model/SelfEmployed/SelfEmployedConfirmationRedirect.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md) * \YooKassa\Model\SelfEmployed\SelfEmployedConfirmationRedirect * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $confirmation_url : string --- ***Description*** URL на который необходимо перенаправить плательщика для подтверждения оплаты **Type:** string **Details:** #### public $confirmationUrl : string --- ***Description*** URL на который необходимо перенаправить плательщика для подтверждения оплаты **Type:** string **Details:** #### public $type : string --- ***Description*** Тип сценария подтверждения. **Type:** string **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md) #### protected $_type : ?string --- **Summary** Код сценария подтверждения. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** Конструктор SelfEmployedConfirmationRedirect. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmationRedirect](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationRedirect.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getConfirmationUrl() : string|null ```php public getConfirmationUrl() : string|null ``` **Summary** Возвращает url, на который необходимо перенаправить самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmationRedirect](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationRedirect.md) **Returns:** string|null - #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает код сценария подтверждения. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setConfirmationUrl() : self ```php public setConfirmationUrl(string|null $confirmation_url = null) : self ``` **Summary** Устанавливает url, на который необходимо перенаправить самозанятого. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmationRedirect](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmationRedirect.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | confirmation_url | URL, на который необходимо перенаправить самозанятого для выдачи прав | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает код сценария подтверждения. **Details:** * Inherited From: [\YooKassa\Model\SelfEmployed\SelfEmployedConfirmation](../classes/YooKassa-Model-SelfEmployed-SelfEmployedConfirmation.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Код сценария подтверждения | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Helpers-TypeCast.md000064400000013400150364342670017543 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Helpers\TypeCast ### Namespace: [\YooKassa\Helpers](../namespaces/yookassa-helpers.md) --- **Summary:** Класс, представляющий модель TypeCast. **Description:** Класс для преобразования типов значений. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [canCastToBoolean()](../classes/YooKassa-Helpers-TypeCast.md#method_canCastToBoolean) | | Проверяет можно ли преобразовать переданное значение в буллево значение. | | public | [canCastToDateTime()](../classes/YooKassa-Helpers-TypeCast.md#method_canCastToDateTime) | | Проверяет, можно ли преобразовать переданное значение в объект даты-времени. | | public | [canCastToEnumString()](../classes/YooKassa-Helpers-TypeCast.md#method_canCastToEnumString) | | Проверяет можно ли преобразовать переданное значение в строку из перечисления. | | public | [canCastToString()](../classes/YooKassa-Helpers-TypeCast.md#method_canCastToString) | | Проверяет, может ли переданное значение быть преобразовано в строку. | | public | [castToDateTime()](../classes/YooKassa-Helpers-TypeCast.md#method_castToDateTime) | | Преобразует переданне значение в объект типа DateTime. | --- ### Details * File: [lib/Helpers/TypeCast.php](../../lib/Helpers/TypeCast.php) * Package: YooKassa\Helpers * Class Hierarchy: * \YooKassa\Helpers\TypeCast * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public canCastToBoolean() : bool ```php Static public canCastToBoolean(mixed $value) : bool ``` **Summary** Проверяет можно ли преобразовать переданное значение в буллево значение. **Details:** * Inherited From: [\YooKassa\Helpers\TypeCast](../classes/YooKassa-Helpers-TypeCast.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение преобразуется в bool, false если нет #### public canCastToDateTime() : bool ```php Static public canCastToDateTime(mixed $value) : bool ``` **Summary** Проверяет, можно ли преобразовать переданное значение в объект даты-времени. **Details:** * Inherited From: [\YooKassa\Helpers\TypeCast](../classes/YooKassa-Helpers-TypeCast.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Провеяремое значение | **Returns:** bool - True если значение можно преобразовать в объект даты, false если нет #### public canCastToEnumString() : bool ```php Static public canCastToEnumString(mixed $value) : bool ``` **Summary** Проверяет можно ли преобразовать переданное значение в строку из перечисления. **Details:** * Inherited From: [\YooKassa\Helpers\TypeCast](../classes/YooKassa-Helpers-TypeCast.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение преобразовать в строку можно, false если нет #### public canCastToString() : bool ```php Static public canCastToString(mixed $value) : bool ``` **Summary** Проверяет, может ли переданное значение быть преобразовано в строку. **Details:** * Inherited From: [\YooKassa\Helpers\TypeCast](../classes/YooKassa-Helpers-TypeCast.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение преобразовать в строку можно, false если нет #### public castToDateTime() : null|\DateTime ```php Static public castToDateTime(\DateTime|int|string $value) : null|\DateTime ``` **Summary** Преобразует переданне значение в объект типа DateTime. **Details:** * Inherited From: [\YooKassa\Helpers\TypeCast](../classes/YooKassa-Helpers-TypeCast.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR int OR string | value | Преобразуемое значение | **Returns:** null|\DateTime - Объект типа DateTime или null, если при парсинг даты не удался --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-AbstractListResponse.md000064400000041557150364342670022171 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Request\AbstractListResponse ### Namespace: [\YooKassa\Request](../namespaces/yookassa-request.md) --- **Summary:** Абстрактный класс для объектов, содержащих список объектов-моделей в ответе на запрос. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$nextCursor](../classes/YooKassa-Request-AbstractListResponse.md#property_nextCursor) | | Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. | | public | [$type](../classes/YooKassa-Request-AbstractListResponse.md#property_type) | | Формат выдачи результатов запроса. Возможное значение: `list` (список). | | protected | [$_next_cursor](../classes/YooKassa-Request-AbstractListResponse.md#property__next_cursor) | | Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. | | protected | [$_type](../classes/YooKassa-Request-AbstractListResponse.md#property__type) | | Формат выдачи результатов запроса. Возможное значение: `list` (список). | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Request-AbstractListResponse.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getItems()](../classes/YooKassa-Request-AbstractListResponse.md#method_getItems) | | Возвращает список объектов в ответе на запрос | | public | [getNextCursor()](../classes/YooKassa-Request-AbstractListResponse.md#method_getNextCursor) | | Возвращает токен следующей страницы, если он задан, или null. | | public | [getType()](../classes/YooKassa-Request-AbstractListResponse.md#method_getType) | | Возвращает формат выдачи результатов запроса. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasNextCursor()](../classes/YooKassa-Request-AbstractListResponse.md#method_hasNextCursor) | | Проверяет, имеется ли в ответе токен следующей страницы. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/AbstractListResponse.php](../../lib/Request/AbstractListResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\AbstractListResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $nextCursor : string --- ***Description*** Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. **Type:** string **Details:** #### public $type : string --- ***Description*** Формат выдачи результатов запроса. Возможное значение: `list` (список). **Type:** string **Details:** #### protected $_next_cursor : ?string --- **Summary** Указатель на следующий фрагмент списка. Обязательный параметр, если размер списка больше размера выдачи (`limit`) и конец выдачи не достигнут. **Type:** ?string **Details:** #### protected $_type : string --- **Summary** Формат выдачи результатов запроса. Возможное значение: `list` (список). **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(iterable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable | sourceArray | | **Returns:** void - #### public getItems() : \YooKassa\Common\ListObjectInterface ```php Abstract public getItems() : \YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список объектов в ответе на запрос **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** \YooKassa\Common\ListObjectInterface - #### public getNextCursor() : null|string ```php public getNextCursor() : null|string ``` **Summary** Возвращает токен следующей страницы, если он задан, или null. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** null|string - Токен следующей страницы #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает формат выдачи результатов запроса. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasNextCursor() : bool ```php public hasNextCursor() : bool ``` **Summary** Проверяет, имеется ли в ответе токен следующей страницы. **Details:** * Inherited From: [\YooKassa\Request\AbstractListResponse](../classes/YooKassa-Request-AbstractListResponse.md) **Returns:** bool - True если токен следующей страницы есть, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-ReceiptItemAmount.md000064400000044244150364342670022446 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\ReceiptItemAmount ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Class ReceiptItemAmount. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$currency](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md#property_currency) | | Код валюты | | public | [$value](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md#property_value) | | Сумма | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md#method___construct) | | MonetaryAmount constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCurrency()](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md#method_getCurrency) | | Возвращает валюту. | | public | [getIntegerValue()](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md#method_getIntegerValue) | | Возвращает сумму в копейках в виде целого числа. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [getValue()](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md#method_getValue) | | Возвращает значение суммы. | | public | [increase()](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md#method_increase) | | Увеличивает сумму на указанное значение. | | public | [jsonSerialize()](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [multiply()](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md#method_multiply) | | Умножает текущую сумму на указанный коэффициент | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCurrency()](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md#method_setCurrency) | | Устанавливает код валюты. | | public | [setValue()](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md#method_setValue) | | Устанавливает значение суммы. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Receipt/ReceiptItemAmount.php](../../lib/Model/Receipt/ReceiptItemAmount.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Receipt\ReceiptItemAmount * Implements: * [\YooKassa\Model\AmountInterface](../classes/YooKassa-Model-AmountInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $currency : string --- ***Description*** Код валюты **Type:** string **Details:** #### public $value : int --- ***Description*** Сумма **Type:** int **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(null|array|\YooKassa\Model\Receipt\numeric $value = null, null|string $currency = null) : mixed ``` **Summary** MonetaryAmount constructor. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemAmount](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Receipt\numeric | value | Сумма | | null OR string | currency | Код валюты | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCurrency() : string ```php public getCurrency() : string ``` **Summary** Возвращает валюту. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemAmount](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md) **Returns:** string - Код валюты #### public getIntegerValue() : int ```php public getIntegerValue() : int ``` **Summary** Возвращает сумму в копейках в виде целого числа. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemAmount](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md) **Returns:** int - Сумма в копейках/центах #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public getValue() : string ```php public getValue() : string ``` **Summary** Возвращает значение суммы. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemAmount](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md) **Returns:** string - Сумма #### public increase() : void ```php public increase(float|null $value) : void ``` **Summary** Увеличивает сумму на указанное значение. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemAmount](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | float OR null | value | Значение, которое будет прибавлено к текущему | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\EmptyPropertyValueException | Выбрасывается если передано пустое значение | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если было передано не число | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если после сложения получилась сумма меньше или равная нулю | **Returns:** void - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemAmount](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public multiply() : void ```php public multiply(float|null $coefficient) : void ``` **Summary** Умножает текущую сумму на указанный коэффициент **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemAmount](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | float OR null | coefficient | Множитель | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\EmptyPropertyValueException | Выбрасывается если передано пустое значение | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если было передано не число | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если переданное значение меньше или равно нулю, либо если после умножения получили значение равное нулю | **Returns:** void - #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCurrency() : self ```php public setCurrency(string|null $currency = null) : self ``` **Summary** Устанавливает код валюты. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemAmount](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | currency | Код валюты | **Returns:** self - #### public setValue() : void ```php public setValue(mixed $value) : void ``` **Summary** Устанавливает значение суммы. **Details:** * Inherited From: [\YooKassa\Model\Receipt\ReceiptItemAmount](../classes/YooKassa-Model-Receipt-ReceiptItemAmount.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Сумма | **Returns:** void - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-SettlementType.md000064400000011753150364342670022035 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\SettlementType ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** SettlementType - Тип расчета. **Description:** Тип расчета передается в запросе на создание чека в массиве `settlements`, в параметре `type`. Возможные значения: - `cashless` - Безналичный расчет - `prepayment` - Предоплата (аванс) - `postpayment` - Постоплата (кредит) - `consideration` - Встречное предоставление --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [CASHLESS](../classes/YooKassa-Model-Receipt-SettlementType.md#constant_CASHLESS) | | Безналичный расчет | | public | [PREPAYMENT](../classes/YooKassa-Model-Receipt-SettlementType.md#constant_PREPAYMENT) | | Предоплата (аванс) | | public | [POSTPAYMENT](../classes/YooKassa-Model-Receipt-SettlementType.md#constant_POSTPAYMENT) | | Постоплата (кредит) | | public | [CONSIDERATION](../classes/YooKassa-Model-Receipt-SettlementType.md#constant_CONSIDERATION) | | Встречное предоставление | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Receipt-SettlementType.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Receipt/SettlementType.php](../../lib/Model/Receipt/SettlementType.php) * Package: Default * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Receipt\SettlementType --- ## Constants ###### CASHLESS Безналичный расчет ```php CASHLESS = 'cashless' ``` ###### PREPAYMENT Предоплата (аванс) ```php PREPAYMENT = 'prepayment' ``` ###### POSTPAYMENT Постоплата (кредит) ```php POSTPAYMENT = 'postpayment' ``` ###### CONSIDERATION Встречное предоставление ```php CONSIDERATION = 'consideration' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md000064400000071534150364342670023315 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\PaymentMethod\BankCard ### Namespace: [\YooKassa\Model\Payment\PaymentMethod](../namespaces/yookassa-model-payment-paymentmethod.md) --- **Summary:** Класс, описывающий модель BankCard. **Description:** Объект банковской карты --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [ISO_3166_CODE_LENGTH](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#constant_ISO_3166_CODE_LENGTH) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$card_type](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#property_card_type) | | Тип банковской карты | | public | [$cardType](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#property_cardType) | | Тип банковской карты | | public | [$expiry_month](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#property_expiry_month) | | Срок действия, месяц | | public | [$expiry_year](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#property_expiry_year) | | Срок действия, год | | public | [$expiryMonth](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#property_expiryMonth) | | Срок действия, месяц | | public | [$expiryYear](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#property_expiryYear) | | Срок действия, год | | public | [$first6](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#property_first6) | | Первые 6 цифр номера карты | | public | [$issuer_country](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#property_issuer_country) | | Код страны, в которой выпущена карта | | public | [$issuer_name](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#property_issuer_name) | | Тип банковской карты | | public | [$issuerCountry](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#property_issuerCountry) | | Код страны, в которой выпущена карта | | public | [$issuerName](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#property_issuerName) | | Тип банковской карты | | public | [$last4](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#property_last4) | | Последние 4 цифры номера карты | | public | [$source](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#property_source) | | Тип банковской карты | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCardType()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_getCardType) | | Возвращает тип банковской карты. | | public | [getExpiryMonth()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_getExpiryMonth) | | Возвращает срок действия, месяц, MM. | | public | [getExpiryYear()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_getExpiryYear) | | Возвращает срок действия, год, YYYY. | | public | [getFirst6()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_getFirst6) | | Возвращает первые 6 цифр номера карты (BIN). | | public | [getIssuerCountry()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_getIssuerCountry) | | Возвращает код страны, в которой выпущена карта. Передается в формате ISO-3166 alpha-2. | | public | [getIssuerName()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_getIssuerName) | | Возвращает наименование банка, выпустившего карту. | | public | [getLast4()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_getLast4) | | Возвращает последние 4 цифры номера карты. | | public | [getSource()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_getSource) | | Возвращает источник данных банковской карты. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCardType()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_setCardType) | | Устанавливает тип банковской карты. | | public | [setExpiryMonth()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_setExpiryMonth) | | Устанавливает срок действия, месяц, MM. | | public | [setExpiryYear()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_setExpiryYear) | | Устанавливает срок действия, год, YYYY. | | public | [setFirst6()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_setFirst6) | | Устанавливает первые 6 цифр номера карты (BIN). | | public | [setIssuerCountry()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_setIssuerCountry) | | Устанавливает код страны, в которой выпущена карта. | | public | [setIssuerName()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_setIssuerName) | | Устанавливает наименование банка, выпустившего карту. | | public | [setLast4()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_setLast4) | | Устанавливает последние 4 цифры номера карты. | | public | [setSource()](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md#method_setSource) | | Устанавливает источник данных банковской карты. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/PaymentMethod/BankCard.php](../../lib/Model/Payment/PaymentMethod/BankCard.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payment\PaymentMethod\BankCard * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### ISO_3166_CODE_LENGTH ```php ISO_3166_CODE_LENGTH = 2 : int ``` --- ## Properties #### public $card_type : string --- ***Description*** Тип банковской карты **Type:** string **Details:** #### public $cardType : string --- ***Description*** Тип банковской карты **Type:** string **Details:** #### public $expiry_month : string --- ***Description*** Срок действия, месяц **Type:** string **Details:** #### public $expiry_year : string --- ***Description*** Срок действия, год **Type:** string **Details:** #### public $expiryMonth : string --- ***Description*** Срок действия, месяц **Type:** string **Details:** #### public $expiryYear : string --- ***Description*** Срок действия, год **Type:** string **Details:** #### public $first6 : string --- ***Description*** Первые 6 цифр номера карты **Type:** string **Details:** #### public $issuer_country : string --- ***Description*** Код страны, в которой выпущена карта **Type:** string **Details:** #### public $issuer_name : string --- ***Description*** Тип банковской карты **Type:** string **Details:** #### public $issuerCountry : string --- ***Description*** Код страны, в которой выпущена карта **Type:** string **Details:** #### public $issuerName : string --- ***Description*** Тип банковской карты **Type:** string **Details:** #### public $last4 : string --- ***Description*** Последние 4 цифры номера карты **Type:** string **Details:** #### public $source : string --- ***Description*** Тип банковской карты **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCardType() : string|null ```php public getCardType() : string|null ``` **Summary** Возвращает тип банковской карты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) **Returns:** string|null - Тип банковской карты #### public getExpiryMonth() : string|null ```php public getExpiryMonth() : string|null ``` **Summary** Возвращает срок действия, месяц, MM. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) **Returns:** string|null - Срок действия, месяц, MM #### public getExpiryYear() : string|null ```php public getExpiryYear() : string|null ``` **Summary** Возвращает срок действия, год, YYYY. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) **Returns:** string|null - Срок действия, год, YYYY #### public getFirst6() : string|null ```php public getFirst6() : string|null ``` **Summary** Возвращает первые 6 цифр номера карты (BIN). **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) **Returns:** string|null - Первые 6 цифр номера карты (BIN) #### public getIssuerCountry() : string|null ```php public getIssuerCountry() : string|null ``` **Summary** Возвращает код страны, в которой выпущена карта. Передается в формате ISO-3166 alpha-2. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) **Returns:** string|null - Код страны, в которой выпущена карта #### public getIssuerName() : string|null ```php public getIssuerName() : string|null ``` **Summary** Возвращает наименование банка, выпустившего карту. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) **Returns:** string|null - Наименование банка, выпустившего карту #### public getLast4() : string|null ```php public getLast4() : string|null ``` **Summary** Возвращает последние 4 цифры номера карты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) **Returns:** string|null - Последние 4 цифры номера карты #### public getSource() : string|null ```php public getSource() : string|null ``` **Summary** Возвращает источник данных банковской карты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) **Returns:** string|null - Источник данных банковской карты #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCardType() : self ```php public setCardType(string|null $card_type = null) : self ``` **Summary** Устанавливает тип банковской карты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | card_type | Тип банковской карты | **Returns:** self - #### public setExpiryMonth() : self ```php public setExpiryMonth(string|null $expiry_month = null) : self ``` **Summary** Устанавливает срок действия, месяц, MM. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | expiry_month | Срок действия, месяц, MM. | **Returns:** self - #### public setExpiryYear() : self ```php public setExpiryYear(string|null $expiry_year = null) : self ``` **Summary** Устанавливает срок действия, год, YYYY. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | expiry_year | Срок действия, год, YYYY. | **Returns:** self - #### public setFirst6() : self ```php public setFirst6(string|null $first6 = null) : self ``` **Summary** Устанавливает первые 6 цифр номера карты (BIN). **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | first6 | Первые 6 цифр номера карты (BIN). При оплате картой, [сохраненной в ЮKassa](/developers/payment-acceptance/scenario-extensions/recurring-payments) и других сервисах, переданный BIN может не соответствовать значениям `last4`, `expiry_year`, `expiry_month`. | **Returns:** self - #### public setIssuerCountry() : self ```php public setIssuerCountry(string|null $issuer_country = null) : self ``` **Summary** Устанавливает код страны, в которой выпущена карта. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | issuer_country | Код страны, в которой выпущена карта. Передается в формате [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#iso:pub:PUB500001:en). Пример: ~`RU`. | **Returns:** self - #### public setIssuerName() : self ```php public setIssuerName(string|null $issuer_name = null) : self ``` **Summary** Устанавливает наименование банка, выпустившего карту. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | issuer_name | Наименование банка, выпустившего карту. | **Returns:** self - #### public setLast4() : self ```php public setLast4(string|null $last4 = null) : self ``` **Summary** Устанавливает последние 4 цифры номера карты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | last4 | Последние 4 цифры номера карты. | **Returns:** self - #### public setSource() : self ```php public setSource(string|null $source = null) : self ``` **Summary** Устанавливает источник данных банковской карты. **Details:** * Inherited From: [\YooKassa\Model\Payment\PaymentMethod\BankCard](../classes/YooKassa-Model-Payment-PaymentMethod-BankCard.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | source | Источник данных банковской карты | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-PersonalData-PersonalDataResponse.md000064400000106133150364342670024512 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\PersonalData\PersonalDataResponse ### Namespace: [\YooKassa\Request\PersonalData](../namespaces/yookassa-request-personaldata.md) --- **Summary:** Класс, представляющий модель PersonalDataResponse. **Description:** Информация о персональных данных --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$cancellation_details](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_cancellation_details) | | Комментарий к отмене выплаты | | public | [$cancellationDetails](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_cancellationDetails) | | Комментарий к отмене выплаты | | public | [$created_at](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_created_at) | | Время создания персональных данных | | public | [$createdAt](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_createdAt) | | Время создания персональных данных | | public | [$expires_at](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_expires_at) | | Срок жизни объекта персональных данных | | public | [$expiresAt](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_expiresAt) | | Срок жизни объекта персональных данных | | public | [$id](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_id) | | Идентификатор персональных данных | | public | [$metadata](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_metadata) | | Метаданные выплаты указанные мерчантом | | public | [$status](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_status) | | Текущий статус персональных данных | | public | [$type](../classes/YooKassa-Model-PersonalData-PersonalData.md#property_type) | | Тип персональных данных | | protected | [$_cancellation_details](../classes/YooKassa-Model-PersonalData-PersonalData.md#property__cancellation_details) | | Комментарий к статусу canceled: кто и по какой причине аннулировал хранение данных. | | protected | [$_created_at](../classes/YooKassa-Model-PersonalData-PersonalData.md#property__created_at) | | Время создания персональных данных. | | protected | [$_expires_at](../classes/YooKassa-Model-PersonalData-PersonalData.md#property__expires_at) | | Срок жизни объекта персональных данных — время, до которого вы можете использовать персональные данные при проведении операций. | | protected | [$_id](../classes/YooKassa-Model-PersonalData-PersonalData.md#property__id) | | Идентификатор персональных данных, сохраненных в ЮKassa. | | protected | [$_metadata](../classes/YooKassa-Model-PersonalData-PersonalData.md#property__metadata) | | Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). | | protected | [$_status](../classes/YooKassa-Model-PersonalData-PersonalData.md#property__status) | | Статус персональных данных. | | protected | [$_type](../classes/YooKassa-Model-PersonalData-PersonalData.md#property__type) | | Тип персональных данных — цель, для которой вы будете использовать данные. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCancellationDetails()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_getCancellationDetails) | | Возвращает комментарий к статусу canceled: кто и по какой причине аннулировал хранение данных. | | public | [getCreatedAt()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_getCreatedAt) | | Возвращает время создания персональных данных. | | public | [getExpiresAt()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_getExpiresAt) | | Возвращает срок жизни объекта персональных данных. | | public | [getId()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_getId) | | Возвращает идентификатор персональных данных, сохраненных в ЮKassa. | | public | [getMetadata()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_getMetadata) | | Возвращает любые дополнительные данные. | | public | [getStatus()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_getStatus) | | Возвращает статус персональных данных. | | public | [getType()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_getType) | | Возвращает тип персональных данных. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCancellationDetails()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_setCancellationDetails) | | Устанавливает Комментарий к статусу canceled: кто и по какой причине аннулировал хранение данных. | | public | [setCreatedAt()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_setCreatedAt) | | Устанавливает время создания персональных данных. | | public | [setExpiresAt()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_setExpiresAt) | | Устанавливает срок жизни объекта персональных данных. | | public | [setId()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_setId) | | Устанавливает идентификатор персональных данных, сохраненных в ЮKassa. | | public | [setMetadata()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_setMetadata) | | Устанавливает любые дополнительные данные. | | public | [setStatus()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_setStatus) | | Устанавливает статус персональных данных. | | public | [setType()](../classes/YooKassa-Model-PersonalData-PersonalData.md#method_setType) | | Устанавливает тип персональных данных. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/PersonalData/PersonalDataResponse.php](../../lib/Request/PersonalData/PersonalDataResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) * \YooKassa\Request\PersonalData\PersonalDataResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $cancellation_details : \YooKassa\Model\PersonalData\PersonalDataCancellationDetails --- ***Description*** Комментарий к отмене выплаты **Type:** PersonalDataCancellationDetails **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### public $cancellationDetails : \YooKassa\Model\PersonalData\PersonalDataCancellationDetails --- ***Description*** Комментарий к отмене выплаты **Type:** PersonalDataCancellationDetails **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### public $created_at : \DateTime --- ***Description*** Время создания персональных данных **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### public $createdAt : \DateTime --- ***Description*** Время создания персональных данных **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### public $expires_at : null|\DateTime --- ***Description*** Срок жизни объекта персональных данных **Type:** DateTime **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### public $expiresAt : null|\DateTime --- ***Description*** Срок жизни объекта персональных данных **Type:** DateTime **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### public $id : string --- ***Description*** Идентификатор персональных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные выплаты указанные мерчантом **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### public $status : string --- ***Description*** Текущий статус персональных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### public $type : string --- ***Description*** Тип персональных данных **Type:** string **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### protected $_cancellation_details : ?\YooKassa\Model\PersonalData\PersonalDataCancellationDetails --- **Summary** Комментарий к статусу canceled: кто и по какой причине аннулировал хранение данных. **Type:** PersonalDataCancellationDetails **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### protected $_created_at : ?\DateTime --- **Summary** Время создания персональных данных. ***Description*** Указывается по [UTC](https://ru.wikipedia.org/wiki/Всемирное_координированное_время) и передается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). Пример: ~`2017-11-03T11:52:31.827Z` **Type:** DateTime **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### protected $_expires_at : ?\DateTime --- **Summary** Срок жизни объекта персональных данных — время, до которого вы можете использовать персональные данные при проведении операций. ***Description*** Указывается только для объекта в статусе ~`active`. Указывается по [UTC](https://ru.wikipedia.org/wiki/Всемирное_координированное_время) и передается в формате [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). Пример: ~`2017-11-03T11:52:31.827Z` **Type:** DateTime **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### protected $_id : ?string --- **Summary** Идентификатор персональных данных, сохраненных в ЮKassa. **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Summary** Любые дополнительные данные, которые нужны вам для работы (например, ваш внутренний идентификатор заказа). ***Description*** Передаются в виде набора пар «ключ-значение» и возвращаются в ответе от ЮKassa. Ограничения: максимум 16 ключей, имя ключа не больше 32 символов, значение ключа не больше 512 символов, тип данных — строка в формате UTF-8. **Type:** Metadata **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### protected $_status : ?string --- **Summary** Статус персональных данных. ***Description*** Возможные значения: * `waiting_for_operation` — данные сохранены, но не использованы при проведении выплаты; * `active` — данные сохранены и использованы при проведении выплаты; данные можно использовать повторно до срока, указанного в параметре `expires_at`; * `canceled` — хранение данных отменено, данные удалены, инициатор и причина отмены указаны в объекте `cancellation_details` (финальный и неизменяемый статус). **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) #### protected $_type : ?string --- **Summary** Тип персональных данных — цель, для которой вы будете использовать данные. ***Description*** Возможное значение: `sbp_payout_recipient` — выплаты с [проверкой получателя](/developers/payouts/scenario-extensions/recipient-check). **Type:** ?string **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCancellationDetails() : \YooKassa\Model\PersonalData\PersonalDataCancellationDetails|null ```php public getCancellationDetails() : \YooKassa\Model\PersonalData\PersonalDataCancellationDetails|null ``` **Summary** Возвращает комментарий к статусу canceled: кто и по какой причине аннулировал хранение данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) **Returns:** \YooKassa\Model\PersonalData\PersonalDataCancellationDetails|null - Комментарий к статусу canceled #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) **Returns:** \DateTime|null - Время создания персональных данных #### public getExpiresAt() : \DateTime|null ```php public getExpiresAt() : \DateTime|null ``` **Summary** Возвращает срок жизни объекта персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) **Returns:** \DateTime|null - Срок жизни объекта персональных данных #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор персональных данных, сохраненных в ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) **Returns:** string|null - #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает любые дополнительные данные. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) **Returns:** \YooKassa\Model\Metadata|null - Любые дополнительные данные #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) **Returns:** string|null - Статус персональных данных #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) **Returns:** string|null - Тип персональных данных #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\PersonalData\PersonalDataCancellationDetails|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает Комментарий к статусу canceled: кто и по какой причине аннулировал хранение данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\PersonalData\PersonalDataCancellationDetails OR array OR null | cancellation_details | Комментарий к статусу canceled | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания персональных данных. | **Returns:** self - #### public setExpiresAt() : self ```php public setExpiresAt(\DateTime|string|null $expires_at = null) : self ``` **Summary** Устанавливает срок жизни объекта персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at | Срок жизни объекта персональных данных | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор персональных данных, сохраненных в ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор персональных данных, сохраненных в ЮKassa. | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает любые дополнительные данные. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Любые дополнительные данные | **Returns:** self - #### public setStatus() : $this ```php public setStatus(string|null $status = null) : $this ``` **Summary** Устанавливает статус персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус персональных данных | **Returns:** $this - #### public setType() : self ```php public setType(?string $type = null) : self ``` **Summary** Устанавливает тип персональных данных. **Details:** * Inherited From: [\YooKassa\Model\PersonalData\PersonalData](../classes/YooKassa-Model-PersonalData-PersonalData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | ?string | type | Тип персональных данных | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-PayoutDealInfo.md000064400000033324150364342670021202 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Deal\PayoutDealInfo ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Класс, представляющий модель PayoutDealInfo. **Description:** Сделка, в рамках которой нужно провести выплату. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_ID](../classes/YooKassa-Model-Deal-PayoutDealInfo.md#constant_MAX_LENGTH_ID) | | | | public | [MIN_LENGTH_ID](../classes/YooKassa-Model-Deal-PayoutDealInfo.md#constant_MIN_LENGTH_ID) | | | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$id](../classes/YooKassa-Model-Deal-PayoutDealInfo.md#property_id) | | Идентификатор сделки | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getId()](../classes/YooKassa-Model-Deal-PayoutDealInfo.md#method_getId) | | Возвращает Id сделки. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setId()](../classes/YooKassa-Model-Deal-PayoutDealInfo.md#method_setId) | | Устанавливает Id сделки. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Deal/PayoutDealInfo.php](../../lib/Model/Deal/PayoutDealInfo.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Deal\PayoutDealInfo * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_ID ```php MAX_LENGTH_ID = 50 : int ``` ###### MIN_LENGTH_ID ```php MIN_LENGTH_ID = 36 : int ``` --- ## Properties #### public $id : string --- ***Description*** Идентификатор сделки **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\PayoutDealInfo](../classes/YooKassa-Model-Deal-PayoutDealInfo.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает Id сделки. **Details:** * Inherited From: [\YooKassa\Model\Deal\PayoutDealInfo](../classes/YooKassa-Model-Deal-PayoutDealInfo.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор сделки. | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Notification-NotificationEventType.md000064400000015601150364342670024370 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Notification\NotificationEventType ### Namespace: [\YooKassa\Model\Notification](../namespaces/yookassa-model-notification.md) --- **Summary:** NotificationEventType - Тип уведомления. **Description:** Возможные значения: - `payment.waiting_for_capture` - Успешно оплачен покупателем, ожидает подтверждения магазином (capture или aviso) - `payment.succeeded` - Успешно оплачен и подтвержден магазином - `payment.canceled` - Неуспех оплаты или отменен магазином - `refund.succeeded` - Успешный возврат - `deal.closed` - Сделка перешла в статус closed - `payout.canceled` - Выплата перешла в статус canceled - `payout.succeeded` - Выплата перешла в статус succeeded --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [PAYMENT_WAITING_FOR_CAPTURE](../classes/YooKassa-Model-Notification-NotificationEventType.md#constant_PAYMENT_WAITING_FOR_CAPTURE) | | Успешно оплачен покупателем, ожидает подтверждения магазином | | public | [PAYMENT_SUCCEEDED](../classes/YooKassa-Model-Notification-NotificationEventType.md#constant_PAYMENT_SUCCEEDED) | | Успешно оплачен и подтвержден магазином | | public | [PAYMENT_CANCELED](../classes/YooKassa-Model-Notification-NotificationEventType.md#constant_PAYMENT_CANCELED) | | Неуспех оплаты или отменен магазином | | public | [REFUND_SUCCEEDED](../classes/YooKassa-Model-Notification-NotificationEventType.md#constant_REFUND_SUCCEEDED) | | Успешный возврат | | public | [DEAL_CLOSED](../classes/YooKassa-Model-Notification-NotificationEventType.md#constant_DEAL_CLOSED) | | Сделка перешла в статус closed | | public | [PAYOUT_CANCELED](../classes/YooKassa-Model-Notification-NotificationEventType.md#constant_PAYOUT_CANCELED) | | Выплата перешла в статус canceled | | public | [PAYOUT_SUCCEEDED](../classes/YooKassa-Model-Notification-NotificationEventType.md#constant_PAYOUT_SUCCEEDED) | | Выплата перешла в статус succeeded | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Notification-NotificationEventType.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Notification/NotificationEventType.php](../../lib/Model/Notification/NotificationEventType.php) * Package: Default * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Notification\NotificationEventType --- ## Constants ###### PAYMENT_WAITING_FOR_CAPTURE Успешно оплачен покупателем, ожидает подтверждения магазином ```php PAYMENT_WAITING_FOR_CAPTURE = 'payment.waiting_for_capture' ``` ###### PAYMENT_SUCCEEDED Успешно оплачен и подтвержден магазином ```php PAYMENT_SUCCEEDED = 'payment.succeeded' ``` ###### PAYMENT_CANCELED Неуспех оплаты или отменен магазином ```php PAYMENT_CANCELED = 'payment.canceled' ``` ###### REFUND_SUCCEEDED Успешный возврат ```php REFUND_SUCCEEDED = 'refund.succeeded' ``` ###### DEAL_CLOSED Сделка перешла в статус closed ```php DEAL_CLOSED = 'deal.closed' ``` ###### PAYOUT_CANCELED Выплата перешла в статус canceled ```php PAYOUT_CANCELED = 'payout.canceled' ``` ###### PAYOUT_SUCCEEDED Выплата перешла в статус succeeded ```php PAYOUT_SUCCEEDED = 'payout.succeeded' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-ReceiptResponseFactory.md000064400000004462150364342670024263 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Receipts\ReceiptResponseFactory ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Фабричный класс для работы с чеками. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [factory()](../classes/YooKassa-Request-Receipts-ReceiptResponseFactory.md#method_factory) | | Фабричный метод для работы с чеками. | --- ### Details * File: [lib/Request/Receipts/ReceiptResponseFactory.php](../../lib/Request/Receipts/ReceiptResponseFactory.php) * Package: Default * Class Hierarchy: * \YooKassa\Request\Receipts\ReceiptResponseFactory --- ## Methods #### public factory() : \YooKassa\Request\Receipts\AbstractReceiptResponse|\YooKassa\Request\Receipts\PaymentReceiptResponse|\YooKassa\Request\Receipts\RefundReceiptResponse|\YooKassa\Request\Receipts\SimpleReceiptResponse ```php public factory(array $data) : \YooKassa\Request\Receipts\AbstractReceiptResponse|\YooKassa\Request\Receipts\PaymentReceiptResponse|\YooKassa\Request\Receipts\RefundReceiptResponse|\YooKassa\Request\Receipts\SimpleReceiptResponse ``` **Summary** Фабричный метод для работы с чеками. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptResponseFactory](../classes/YooKassa-Request-Receipts-ReceiptResponseFactory.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | data | Массив с данными чека | **Returns:** \YooKassa\Request\Receipts\AbstractReceiptResponse|\YooKassa\Request\Receipts\PaymentReceiptResponse|\YooKassa\Request\Receipts\RefundReceiptResponse|\YooKassa\Request\Receipts\SimpleReceiptResponse - Объект чека определенного типа --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Webhook-Webhook.md000064400000041553150364342670020451 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Webhook\Webhook ### Namespace: [\YooKassa\Model\Webhook](../namespaces/yookassa-model-webhook.md) --- **Summary:** Класс Webhook содержит информацию о подписке на одно событие. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$event](../classes/YooKassa-Model-Webhook-Webhook.md#property_event) | | Событие, о котором уведомляет ЮKassa | | public | [$id](../classes/YooKassa-Model-Webhook-Webhook.md#property_id) | | Идентификатор webhook | | public | [$url](../classes/YooKassa-Model-Webhook-Webhook.md#property_url) | | URL, на который ЮKassa будет отправлять уведомления | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getEvent()](../classes/YooKassa-Model-Webhook-Webhook.md#method_getEvent) | | Возвращает событие, о котором уведомляет ЮKassa. | | public | [getId()](../classes/YooKassa-Model-Webhook-Webhook.md#method_getId) | | Возвращает идентификатор webhook. | | public | [getUrl()](../classes/YooKassa-Model-Webhook-Webhook.md#method_getUrl) | | Возвращает URL, на который ЮKassa будет отправлять уведомления. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setEvent()](../classes/YooKassa-Model-Webhook-Webhook.md#method_setEvent) | | Устанавливает событие, о котором уведомляет ЮKassa. | | public | [setId()](../classes/YooKassa-Model-Webhook-Webhook.md#method_setId) | | Устанавливает идентификатор webhook. | | public | [setUrl()](../classes/YooKassa-Model-Webhook-Webhook.md#method_setUrl) | | Устанавливает URL, на который ЮKassa будет отправлять уведомления. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Webhook/Webhook.php](../../lib/Model/Webhook/Webhook.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Webhook\Webhook * Implements: * [\YooKassa\Model\Webhook\WebhookInterface](../classes/YooKassa-Model-Webhook-WebhookInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $event : string --- ***Description*** Событие, о котором уведомляет ЮKassa **Type:** string **Details:** #### public $id : string --- ***Description*** Идентификатор webhook **Type:** string **Details:** #### public $url : string --- ***Description*** URL, на который ЮKassa будет отправлять уведомления **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getEvent() : string ```php public getEvent() : string ``` **Summary** Возвращает событие, о котором уведомляет ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\Webhook\Webhook](../classes/YooKassa-Model-Webhook-Webhook.md) **Returns:** string - Событие, о котором уведомляет ЮKassa #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор webhook. **Details:** * Inherited From: [\YooKassa\Model\Webhook\Webhook](../classes/YooKassa-Model-Webhook-Webhook.md) **Returns:** string|null - Идентификатор webhook #### public getUrl() : string ```php public getUrl() : string ``` **Summary** Возвращает URL, на который ЮKassa будет отправлять уведомления. **Details:** * Inherited From: [\YooKassa\Model\Webhook\Webhook](../classes/YooKassa-Model-Webhook-Webhook.md) **Returns:** string - URL, на который ЮKassa будет отправлять уведомления #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setEvent() : self ```php public setEvent(string|null $event = null) : self ``` **Summary** Устанавливает событие, о котором уведомляет ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\Webhook\Webhook](../classes/YooKassa-Model-Webhook-Webhook.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | event | Событие, о котором уведомляет ЮKassa | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор webhook. **Details:** * Inherited From: [\YooKassa\Model\Webhook\Webhook](../classes/YooKassa-Model-Webhook-Webhook.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор webhook | **Returns:** self - #### public setUrl() : self ```php public setUrl(string|null $url = null) : self ``` **Summary** Устанавливает URL, на который ЮKassa будет отправлять уведомления. **Details:** * Inherited From: [\YooKassa\Model\Webhook\Webhook](../classes/YooKassa-Model-Webhook-Webhook.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | url | URL, на который ЮKassa будет отправлять уведомления | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md000064400000044772150364342670025634 0ustar00# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Request\Payments\AbstractPaymentRequestBuilder ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель AbstractPaymentRequestBuilder. **Description:** Базовый класс билдера объекта платежного запроса, передаваемого в методы клиента API. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$amount](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#property_amount) | | Сумма | | protected | [$currentObject](../classes/YooKassa-Common-AbstractRequestBuilder.md#property_currentObject) | | Инстанс собираемого запроса. | | protected | [$receipt](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#property_receipt) | | Объект с информацией о чеке | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. | | public | [addReceiptItem()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_addReceiptItem) | | Добавляет в чек товар | | public | [addReceiptShipping()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_addReceiptShipping) | | Добавляет в чек доставку товара. | | public | [addTransfer()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_addTransfer) | | Добавляет трансфер. | | public | [build()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_build) | | Строит запрос, валидирует его и возвращает, если все прошло нормально. | | public | [setAmount()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setAmount) | | Устанавливает сумму. | | public | [setCurrency()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setCurrency) | | Устанавливает валюту в которой будет происходить подтверждение оплаты заказа. | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива. | | public | [setReceipt()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceipt) | | Устанавливает чек. | | public | [setReceiptEmail()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceiptEmail) | | Устанавливает адрес электронной почты получателя чека. | | public | [setReceiptItems()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceiptItems) | | Устанавливает список товаров для создания чека. | | public | [setReceiptPhone()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setReceiptPhone) | | Устанавливает телефон получателя чека. | | public | [setTaxSystemCode()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setTaxSystemCode) | | Устанавливает код системы налогообложения. | | public | [setTransfers()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_setTransfers) | | Устанавливает трансферы. | | protected | [initCurrentObject()](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md#method_initCurrentObject) | | Инициализирует пустой запрос | --- ### Details * File: [lib/Request/Payments/AbstractPaymentRequestBuilder.php](../../lib/Request/Payments/AbstractPaymentRequestBuilder.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) * \YooKassa\Request\Payments\AbstractPaymentRequestBuilder * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### protected $amount : ?\YooKassa\Model\MonetaryAmount --- **Summary** Сумма **Type:** MonetaryAmount **Details:** #### protected $currentObject : ?\YooKassa\Common\AbstractRequestInterface --- **Summary** Инстанс собираемого запроса. **Type:** AbstractRequestInterface **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) #### protected $receipt : ?\YooKassa\Model\Receipt\Receipt --- **Summary** Объект с информацией о чеке **Type:** Receipt **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public addReceiptItem() : self ```php public addReceiptItem(string $title, string $price, float $quantity, int $vatCode, null|string $paymentMode = null, null|string $paymentSubject = null, null|mixed $productCode = null, null|mixed $countryOfOriginCode = null, null|mixed $customsDeclarationNumber = null, null|mixed $excise = null) : self ``` **Summary** Добавляет в чек товар **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) * See Also: * [](\YooKassa\Request\Payments\PaymentSubject) * [](\YooKassa\Request\Payments\PaymentMode) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | title | Название или описание товара | | string | price | Цена товара в валюте, заданной в заказе | | float | quantity | Количество товара | | int | vatCode | Ставка НДС | | null OR string | paymentMode | значение перечисления PaymentMode | | null OR string | paymentSubject | значение перечисления PaymentSubject | | null OR mixed | productCode | | | null OR mixed | countryOfOriginCode | | | null OR mixed | customsDeclarationNumber | | | null OR mixed | excise | | **Returns:** self - Инстанс билдера запросов #### public addReceiptShipping() : self ```php public addReceiptShipping(string $title, string $price, int $vatCode, null|string $paymentMode = null, null|string $paymentSubject = null) : self ``` **Summary** Добавляет в чек доставку товара. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) * See Also: * [](\YooKassa\Request\Payments\PaymentSubject) * [](\YooKassa\Request\Payments\PaymentMode) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | title | Название доставки в чеке | | string | price | Стоимость доставки | | int | vatCode | Ставка НДС | | null OR string | paymentMode | значение перечисления PaymentMode | | null OR string | paymentSubject | значение перечисления PaymentSubject | **Returns:** self - Инстанс билдера запросов #### public addTransfer() : self ```php public addTransfer(array|\YooKassa\Request\Payments\TransferDataInterface $value) : self ``` **Summary** Добавляет трансфер. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Payments\TransferDataInterface | value | Трансфер | **Returns:** self - Инстанс билдера запросов #### public build() : \YooKassa\Common\AbstractRequestInterface ```php public build(array $options = null) : \YooKassa\Common\AbstractRequestInterface ``` **Summary** Строит запрос, валидирует его и возвращает, если все прошло нормально. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | options | Массив свойств запроса, если нужно их установить перед сборкой | **Returns:** \YooKassa\Common\AbstractRequestInterface - Инстанс собранного запроса #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|\YooKassa\Request\Payments\numeric $value, string|null $currency = null) : self ``` **Summary** Устанавливает сумму. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR \YooKassa\Request\Payments\numeric | value | Сумма оплаты | | string OR null | currency | Валюта | **Returns:** self - Инстанс билдера запросов #### public setCurrency() : self ```php public setCurrency(string $value) : self ``` **Summary** Устанавливает валюту в которой будет происходить подтверждение оплаты заказа. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Валюта в которой подтверждается оплата | **Returns:** self - Инстанс билдера запросов #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(iterable|null $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable OR null | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### public setReceipt() : self ```php public setReceipt(array|\YooKassa\Model\Receipt\ReceiptInterface $value) : self ``` **Summary** Устанавливает чек. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\ReceiptInterface | value | Инстанс чека или ассоциативный массив с данными чека | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Генерируется если было передано значение невалидного типа | **Returns:** self - Инстанс билдера запросов #### public setReceiptEmail() : self ```php public setReceiptEmail(string|null $value) : self ``` **Summary** Устанавливает адрес электронной почты получателя чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Email получателя чека | **Returns:** self - Инстанс билдера запросов #### public setReceiptItems() : self ```php public setReceiptItems(array $value = []) : self ``` **Summary** Устанавливает список товаров для создания чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array | value | Массив товаров в заказе | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если хотя бы один из товаров имеет неверную структуру | **Returns:** self - Инстанс билдера запросов #### public setReceiptPhone() : self ```php public setReceiptPhone(string|null $value) : self ``` **Summary** Устанавливает телефон получателя чека. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Телефон получателя чека | **Returns:** self - Инстанс билдера запросов #### public setTaxSystemCode() : self ```php public setTaxSystemCode(int|null $value) : self ``` **Summary** Устанавливает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | value | Код системы налогообложения. Число 1-6. | **Returns:** self - Инстанс билдера запросов #### public setTransfers() : self ```php public setTransfers(array|\YooKassa\Request\Payments\TransferDataInterface[]|\YooKassa\Common\ListObjectInterface $value) : self ``` **Summary** Устанавливает трансферы. **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Request\Payments\TransferDataInterface[] OR \YooKassa\Common\ListObjectInterface | value | Массив трансферов | **Returns:** self - Инстанс билдера запросов #### protected initCurrentObject() : \YooKassa\Common\AbstractRequestInterface|null ```php protected initCurrentObject() : \YooKassa\Common\AbstractRequestInterface|null ``` **Summary** Инициализирует пустой запрос **Details:** * Inherited From: [\YooKassa\Request\Payments\AbstractPaymentRequestBuilder](../classes/YooKassa-Request-Payments-AbstractPaymentRequestBuilder.md) **Returns:** \YooKassa\Common\AbstractRequestInterface|null - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneydocs/classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md000064400000042251150364342670032442 0ustar00yookassa-sdk-php# [YooKassa API SDK](../home.md) # Abstract Class: \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes ### Namespace: [\YooKassa\Request\Payments\ConfirmationAttributes](../namespaces/yookassa-request-payments-confirmationattributes.md) --- **Summary:** Класс, представляющий модель AbstractConfirmationAttributes. **Description:** Данные, необходимые для инициирования выбранного сценария подтверждения платежа пользователем. Подробнее о [сценариях подтверждения](/developers/payment-acceptance/getting-started/payment-process#user-confirmation) --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property_locale) | | Язык интерфейса, писем и смс, которые будет видеть или получать пользователь | | public | [$type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property_type) | | Код сценария подтверждения | | protected | [$_locale](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property__locale) | | | | protected | [$_type](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#property__type) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getLocale()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_getLocale) | | Возвращает язык интерфейса, писем и смс | | public | [getType()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_getType) | | Возвращает код сценария подтверждения | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setLocale()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_setLocale) | | Устанавливает язык интерфейса, писем и смс | | public | [setType()](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md#method_setType) | | Устанавливает код сценария подтверждения. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/ConfirmationAttributes/AbstractConfirmationAttributes.php](../../lib/Request/Payments/ConfirmationAttributes/AbstractConfirmationAttributes.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $locale : string --- ***Description*** Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Type:** string **Details:** #### public $type : string --- ***Description*** Код сценария подтверждения **Type:** string **Details:** #### protected $_locale : ?string --- **Type:** ?string Язык интерфейса, писем и смс, которые будет видеть или получать пользователь **Details:** #### protected $_type : ?string --- **Type:** ?string Код сценария подтверждения **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getLocale() : string|null ```php public getLocale() : string|null ``` **Summary** Возвращает язык интерфейса, писем и смс **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) **Returns:** string|null - Язык интерфейса, писем и смс #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает код сценария подтверждения **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) **Returns:** string|null - Код сценария подтверждения #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setLocale() : self ```php public setLocale(string|null $locale = null) : self ``` **Summary** Устанавливает язык интерфейса, писем и смс **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | locale | Язык интерфейса, писем и смс | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает код сценария подтверждения. **Details:** * Inherited From: [\YooKassa\Request\Payments\ConfirmationAttributes\AbstractConfirmationAttributes](../classes/YooKassa-Request-Payments-ConfirmationAttributes-AbstractConfirmationAttributes.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | Код сценария подтверждения | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-Leg.md000064400000051637150364342670020360 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\Leg ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель Leg. **Description:** Маршрут авиа перелета --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [ISO8601](../classes/YooKassa-Request-Payments-Leg.md#constant_ISO8601) | | Формат даты. | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$carrier_code](../classes/YooKassa-Request-Payments-Leg.md#property_carrier_code) | | Код авиакомпании по справочнику | | public | [$carrierCode](../classes/YooKassa-Request-Payments-Leg.md#property_carrierCode) | | Код авиакомпании по справочнику | | public | [$departure_airport](../classes/YooKassa-Request-Payments-Leg.md#property_departure_airport) | | Трёхбуквенный IATA-код аэропорта вылета | | public | [$departure_date](../classes/YooKassa-Request-Payments-Leg.md#property_departure_date) | | Дата вылета в формате YYYY-MM-DD ISO 8601:2004 | | public | [$departureAirport](../classes/YooKassa-Request-Payments-Leg.md#property_departureAirport) | | Трёхбуквенный IATA-код аэропорта вылета | | public | [$departureDate](../classes/YooKassa-Request-Payments-Leg.md#property_departureDate) | | Дата вылета в формате YYYY-MM-DD ISO 8601:2004 | | public | [$destination_airport](../classes/YooKassa-Request-Payments-Leg.md#property_destination_airport) | | Трёхбуквенный IATA-код аэропорта прилёта | | public | [$destinationAirport](../classes/YooKassa-Request-Payments-Leg.md#property_destinationAirport) | | Трёхбуквенный IATA-код аэропорта прилёта | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCarrierCode()](../classes/YooKassa-Request-Payments-Leg.md#method_getCarrierCode) | | Возвращает carrier_code. | | public | [getDepartureAirport()](../classes/YooKassa-Request-Payments-Leg.md#method_getDepartureAirport) | | Возвращает departure_airport. | | public | [getDepartureDate()](../classes/YooKassa-Request-Payments-Leg.md#method_getDepartureDate) | | Возвращает departure_date. | | public | [getDestinationAirport()](../classes/YooKassa-Request-Payments-Leg.md#method_getDestinationAirport) | | Возвращает destination_airport. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Request-Payments-Leg.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCarrierCode()](../classes/YooKassa-Request-Payments-Leg.md#method_setCarrierCode) | | Устанавливает carrier_code. | | public | [setDepartureAirport()](../classes/YooKassa-Request-Payments-Leg.md#method_setDepartureAirport) | | Устанавливает departure_airport. | | public | [setDepartureDate()](../classes/YooKassa-Request-Payments-Leg.md#method_setDepartureDate) | | Устанавливает departure_date. | | public | [setDestinationAirport()](../classes/YooKassa-Request-Payments-Leg.md#method_setDestinationAirport) | | Устанавливает destination_airport. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/Leg.php](../../lib/Request/Payments/Leg.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\Payments\Leg * Implements: * [\YooKassa\Request\Payments\LegInterface](../classes/YooKassa-Request-Payments-LegInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### ISO8601 Формат даты. ```php ISO8601 = 'Y-m-d' ``` --- ## Properties #### public $carrier_code : string --- ***Description*** Код авиакомпании по справочнику **Type:** string **Details:** #### public $carrierCode : string --- ***Description*** Код авиакомпании по справочнику **Type:** string **Details:** #### public $departure_airport : string --- ***Description*** Трёхбуквенный IATA-код аэропорта вылета **Type:** string **Details:** #### public $departure_date : string --- ***Description*** Дата вылета в формате YYYY-MM-DD ISO 8601:2004 **Type:** string **Details:** #### public $departureAirport : string --- ***Description*** Трёхбуквенный IATA-код аэропорта вылета **Type:** string **Details:** #### public $departureDate : string --- ***Description*** Дата вылета в формате YYYY-MM-DD ISO 8601:2004 **Type:** string **Details:** #### public $destination_airport : string --- ***Description*** Трёхбуквенный IATA-код аэропорта прилёта **Type:** string **Details:** #### public $destinationAirport : string --- ***Description*** Трёхбуквенный IATA-код аэропорта прилёта **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCarrierCode() : string|null ```php public getCarrierCode() : string|null ``` **Summary** Возвращает carrier_code. **Details:** * Inherited From: [\YooKassa\Request\Payments\Leg](../classes/YooKassa-Request-Payments-Leg.md) **Returns:** string|null - #### public getDepartureAirport() : string|null ```php public getDepartureAirport() : string|null ``` **Summary** Возвращает departure_airport. **Details:** * Inherited From: [\YooKassa\Request\Payments\Leg](../classes/YooKassa-Request-Payments-Leg.md) **Returns:** string|null - #### public getDepartureDate() : \DateTime|null ```php public getDepartureDate() : \DateTime|null ``` **Summary** Возвращает departure_date. **Details:** * Inherited From: [\YooKassa\Request\Payments\Leg](../classes/YooKassa-Request-Payments-Leg.md) **Returns:** \DateTime|null - #### public getDestinationAirport() : string|null ```php public getDestinationAirport() : string|null ``` **Summary** Возвращает destination_airport. **Details:** * Inherited From: [\YooKassa\Request\Payments\Leg](../classes/YooKassa-Request-Payments-Leg.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Request\Payments\Leg](../classes/YooKassa-Request-Payments-Leg.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCarrierCode() : self ```php public setCarrierCode(string|null $value = null) : self ``` **Summary** Устанавливает carrier_code. **Details:** * Inherited From: [\YooKassa\Request\Payments\Leg](../classes/YooKassa-Request-Payments-Leg.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Код авиакомпании по справочнику [IATA](https://www.iata.org/publications/Pages/code-search.aspx). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setDepartureAirport() : self ```php public setDepartureAirport(string|null $value = null) : self ``` **Summary** Устанавливает departure_airport. **Details:** * Inherited From: [\YooKassa\Request\Payments\Leg](../classes/YooKassa-Request-Payments-Leg.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Код аэропорта вылета по справочнику [IATA](https://www.iata.org/publications/Pages/code-search.aspx), например LED. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setDepartureDate() : self ```php public setDepartureDate(\DateTime|string|null $value = null) : self ``` **Summary** Устанавливает departure_date. **Details:** * Inherited From: [\YooKassa\Request\Payments\Leg](../classes/YooKassa-Request-Payments-Leg.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | value | Дата вылета в формате YYYY-MM-DD по стандарту [ISO 8601:2004](http://www.iso.org/iso/catalogue_detail?csnumber=40874). | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public setDestinationAirport() : self ```php public setDestinationAirport(string|null $value = null) : self ``` **Summary** Устанавливает destination_airport. **Details:** * Inherited From: [\YooKassa\Request\Payments\Leg](../classes/YooKassa-Request-Payments-Leg.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Код аэропорта прилета по справочнику [IATA](https://www.iata.org/publications/Pages/code-search.aspx), например AMS. | ##### Throws: | Type | Description | | ---- | ----------- | | \Exception | | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-Payment.md000064400000215320150364342670020502 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\Payment ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Класс, представляющий модель Payment. **Description:** Данные о платеже. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Payment-Payment.md#constant_MAX_LENGTH_DESCRIPTION) | | Максимальная длина строки описания платежа | | public | [MAX_LENGTH_MERCHANT_CUSTOMER_ID](../classes/YooKassa-Model-Payment-Payment.md#constant_MAX_LENGTH_MERCHANT_CUSTOMER_ID) | | Максимальная длина строки идентификатора покупателя в вашей системе | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Payment-Payment.md#property_amount) | | Сумма заказа | | public | [$authorization_details](../classes/YooKassa-Model-Payment-Payment.md#property_authorization_details) | | Данные об авторизации платежа | | public | [$authorizationDetails](../classes/YooKassa-Model-Payment-Payment.md#property_authorizationDetails) | | Данные об авторизации платежа | | public | [$cancellation_details](../classes/YooKassa-Model-Payment-Payment.md#property_cancellation_details) | | Комментарий к отмене платежа | | public | [$cancellationDetails](../classes/YooKassa-Model-Payment-Payment.md#property_cancellationDetails) | | Комментарий к отмене платежа | | public | [$captured_at](../classes/YooKassa-Model-Payment-Payment.md#property_captured_at) | | Время подтверждения платежа магазином | | public | [$capturedAt](../classes/YooKassa-Model-Payment-Payment.md#property_capturedAt) | | Время подтверждения платежа магазином | | public | [$confirmation](../classes/YooKassa-Model-Payment-Payment.md#property_confirmation) | | Способ подтверждения платежа | | public | [$created_at](../classes/YooKassa-Model-Payment-Payment.md#property_created_at) | | Время создания заказа | | public | [$createdAt](../classes/YooKassa-Model-Payment-Payment.md#property_createdAt) | | Время создания заказа | | public | [$deal](../classes/YooKassa-Model-Payment-Payment.md#property_deal) | | Данные о сделке, в составе которой проходит платеж | | public | [$description](../classes/YooKassa-Model-Payment-Payment.md#property_description) | | Описание транзакции | | public | [$expires_at](../classes/YooKassa-Model-Payment-Payment.md#property_expires_at) | | Время, до которого можно бесплатно отменить или подтвердить платеж | | public | [$expiresAt](../classes/YooKassa-Model-Payment-Payment.md#property_expiresAt) | | Время, до которого можно бесплатно отменить или подтвердить платеж | | public | [$id](../classes/YooKassa-Model-Payment-Payment.md#property_id) | | Идентификатор платежа | | public | [$income_amount](../classes/YooKassa-Model-Payment-Payment.md#property_income_amount) | | Сумма платежа, которую получит магазин | | public | [$incomeAmount](../classes/YooKassa-Model-Payment-Payment.md#property_incomeAmount) | | Сумма платежа, которую получит магазин | | public | [$merchant_customer_id](../classes/YooKassa-Model-Payment-Payment.md#property_merchant_customer_id) | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | public | [$merchantCustomerId](../classes/YooKassa-Model-Payment-Payment.md#property_merchantCustomerId) | | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона | | public | [$metadata](../classes/YooKassa-Model-Payment-Payment.md#property_metadata) | | Метаданные платежа указанные мерчантом | | public | [$paid](../classes/YooKassa-Model-Payment-Payment.md#property_paid) | | Признак оплаты заказа | | public | [$payment_method](../classes/YooKassa-Model-Payment-Payment.md#property_payment_method) | | Способ проведения платежа | | public | [$paymentMethod](../classes/YooKassa-Model-Payment-Payment.md#property_paymentMethod) | | Способ проведения платежа | | public | [$receipt_registration](../classes/YooKassa-Model-Payment-Payment.md#property_receipt_registration) | | Состояние регистрации фискального чека | | public | [$receiptRegistration](../classes/YooKassa-Model-Payment-Payment.md#property_receiptRegistration) | | Состояние регистрации фискального чека | | public | [$recipient](../classes/YooKassa-Model-Payment-Payment.md#property_recipient) | | Получатель платежа | | public | [$refundable](../classes/YooKassa-Model-Payment-Payment.md#property_refundable) | | Возможность провести возврат по API | | public | [$refunded_amount](../classes/YooKassa-Model-Payment-Payment.md#property_refunded_amount) | | Сумма возвращенных средств платежа | | public | [$refundedAmount](../classes/YooKassa-Model-Payment-Payment.md#property_refundedAmount) | | Сумма возвращенных средств платежа | | public | [$status](../classes/YooKassa-Model-Payment-Payment.md#property_status) | | Текущее состояние платежа | | public | [$test](../classes/YooKassa-Model-Payment-Payment.md#property_test) | | Признак тестовой операции | | public | [$transfers](../classes/YooKassa-Model-Payment-Payment.md#property_transfers) | | Данные о распределении платежа между магазинами | | protected | [$_amount](../classes/YooKassa-Model-Payment-Payment.md#property__amount) | | | | protected | [$_authorization_details](../classes/YooKassa-Model-Payment-Payment.md#property__authorization_details) | | Данные об авторизации платежа | | protected | [$_cancellation_details](../classes/YooKassa-Model-Payment-Payment.md#property__cancellation_details) | | Комментарий к статусу canceled: кто отменил платеж и по какой причине | | protected | [$_captured_at](../classes/YooKassa-Model-Payment-Payment.md#property__captured_at) | | | | protected | [$_confirmation](../classes/YooKassa-Model-Payment-Payment.md#property__confirmation) | | | | protected | [$_created_at](../classes/YooKassa-Model-Payment-Payment.md#property__created_at) | | | | protected | [$_deal](../classes/YooKassa-Model-Payment-Payment.md#property__deal) | | | | protected | [$_description](../classes/YooKassa-Model-Payment-Payment.md#property__description) | | | | protected | [$_expires_at](../classes/YooKassa-Model-Payment-Payment.md#property__expires_at) | | Время, до которого можно бесплатно отменить или подтвердить платеж. В указанное время платеж в статусе `waiting_for_capture` будет автоматически отменен. | | protected | [$_id](../classes/YooKassa-Model-Payment-Payment.md#property__id) | | | | protected | [$_income_amount](../classes/YooKassa-Model-Payment-Payment.md#property__income_amount) | | | | protected | [$_merchant_customer_id](../classes/YooKassa-Model-Payment-Payment.md#property__merchant_customer_id) | | | | protected | [$_metadata](../classes/YooKassa-Model-Payment-Payment.md#property__metadata) | | | | protected | [$_paid](../classes/YooKassa-Model-Payment-Payment.md#property__paid) | | | | protected | [$_payment_method](../classes/YooKassa-Model-Payment-Payment.md#property__payment_method) | | | | protected | [$_receipt_registration](../classes/YooKassa-Model-Payment-Payment.md#property__receipt_registration) | | | | protected | [$_recipient](../classes/YooKassa-Model-Payment-Payment.md#property__recipient) | | | | protected | [$_refundable](../classes/YooKassa-Model-Payment-Payment.md#property__refundable) | | | | protected | [$_refunded_amount](../classes/YooKassa-Model-Payment-Payment.md#property__refunded_amount) | | | | protected | [$_status](../classes/YooKassa-Model-Payment-Payment.md#property__status) | | | | protected | [$_test](../classes/YooKassa-Model-Payment-Payment.md#property__test) | | Признак тестовой операции. | | protected | [$_transfers](../classes/YooKassa-Model-Payment-Payment.md#property__transfers) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getAmount) | | Возвращает сумму. | | public | [getAuthorizationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_getAuthorizationDetails) | | Возвращает данные об авторизации платежа. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_getCancellationDetails) | | Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [getCapturedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getCapturedAt) | | Возвращает время подтверждения платежа магазином или null, если время не задано. | | public | [getConfirmation()](../classes/YooKassa-Model-Payment-Payment.md#method_getConfirmation) | | Возвращает способ подтверждения платежа. | | public | [getCreatedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getCreatedAt) | | Возвращает время создания заказа. | | public | [getDeal()](../classes/YooKassa-Model-Payment-Payment.md#method_getDeal) | | Возвращает данные о сделке, в составе которой проходит платеж. | | public | [getDescription()](../classes/YooKassa-Model-Payment-Payment.md#method_getDescription) | | Возвращает описание транзакции | | public | [getExpiresAt()](../classes/YooKassa-Model-Payment-Payment.md#method_getExpiresAt) | | Возвращает время до которого можно бесплатно отменить или подтвердить платеж, или null, если оно не задано. | | public | [getId()](../classes/YooKassa-Model-Payment-Payment.md#method_getId) | | Возвращает идентификатор платежа. | | public | [getIncomeAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getIncomeAmount) | | Возвращает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa. | | public | [getMerchantCustomerId()](../classes/YooKassa-Model-Payment-Payment.md#method_getMerchantCustomerId) | | Возвращает идентификатор покупателя в вашей системе. | | public | [getMetadata()](../classes/YooKassa-Model-Payment-Payment.md#method_getMetadata) | | Возвращает метаданные платежа установленные мерчантом | | public | [getPaid()](../classes/YooKassa-Model-Payment-Payment.md#method_getPaid) | | Проверяет, был ли уже оплачен заказ. | | public | [getPaymentMethod()](../classes/YooKassa-Model-Payment-Payment.md#method_getPaymentMethod) | | Возвращает используемый способ проведения платежа. | | public | [getReceiptRegistration()](../classes/YooKassa-Model-Payment-Payment.md#method_getReceiptRegistration) | | Возвращает состояние регистрации фискального чека. | | public | [getRecipient()](../classes/YooKassa-Model-Payment-Payment.md#method_getRecipient) | | Возвращает получателя платежа. | | public | [getRefundable()](../classes/YooKassa-Model-Payment-Payment.md#method_getRefundable) | | Проверяет возможность провести возврат по API. | | public | [getRefundedAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_getRefundedAmount) | | Возвращает сумму возвращенных средств. | | public | [getStatus()](../classes/YooKassa-Model-Payment-Payment.md#method_getStatus) | | Возвращает состояние платежа. | | public | [getTest()](../classes/YooKassa-Model-Payment-Payment.md#method_getTest) | | Возвращает признак тестовой операции. | | public | [getTransfers()](../classes/YooKassa-Model-Payment-Payment.md#method_getTransfers) | | Возвращает массив распределения денег между магазинами. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setAmount) | | Устанавливает сумму платежа. | | public | [setAuthorizationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_setAuthorizationDetails) | | Устанавливает данные об авторизации платежа. | | public | [setCancellationDetails()](../classes/YooKassa-Model-Payment-Payment.md#method_setCancellationDetails) | | Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. | | public | [setCapturedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setCapturedAt) | | Устанавливает время подтверждения платежа магазином | | public | [setConfirmation()](../classes/YooKassa-Model-Payment-Payment.md#method_setConfirmation) | | Устанавливает способ подтверждения платежа. | | public | [setCreatedAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setCreatedAt) | | Устанавливает время создания заказа. | | public | [setDeal()](../classes/YooKassa-Model-Payment-Payment.md#method_setDeal) | | Устанавливает данные о сделке, в составе которой проходит платеж. | | public | [setDescription()](../classes/YooKassa-Model-Payment-Payment.md#method_setDescription) | | Устанавливает описание транзакции | | public | [setExpiresAt()](../classes/YooKassa-Model-Payment-Payment.md#method_setExpiresAt) | | Устанавливает время до которого можно бесплатно отменить или подтвердить платеж. | | public | [setId()](../classes/YooKassa-Model-Payment-Payment.md#method_setId) | | Устанавливает идентификатор платежа. | | public | [setIncomeAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setIncomeAmount) | | Устанавливает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa | | public | [setMerchantCustomerId()](../classes/YooKassa-Model-Payment-Payment.md#method_setMerchantCustomerId) | | Устанавливает идентификатор покупателя в вашей системе. | | public | [setMetadata()](../classes/YooKassa-Model-Payment-Payment.md#method_setMetadata) | | Устанавливает метаданные платежа. | | public | [setPaid()](../classes/YooKassa-Model-Payment-Payment.md#method_setPaid) | | Устанавливает флаг оплаты заказа. | | public | [setPaymentMethod()](../classes/YooKassa-Model-Payment-Payment.md#method_setPaymentMethod) | | Устанавливает используемый способ проведения платежа. | | public | [setReceiptRegistration()](../classes/YooKassa-Model-Payment-Payment.md#method_setReceiptRegistration) | | Устанавливает состояние регистрации фискального чека | | public | [setRecipient()](../classes/YooKassa-Model-Payment-Payment.md#method_setRecipient) | | Устанавливает получателя платежа. | | public | [setRefundable()](../classes/YooKassa-Model-Payment-Payment.md#method_setRefundable) | | Устанавливает возможность провести возврат по API. | | public | [setRefundedAmount()](../classes/YooKassa-Model-Payment-Payment.md#method_setRefundedAmount) | | Устанавливает сумму возвращенных средств. | | public | [setStatus()](../classes/YooKassa-Model-Payment-Payment.md#method_setStatus) | | Устанавливает статус платежа | | public | [setTest()](../classes/YooKassa-Model-Payment-Payment.md#method_setTest) | | Устанавливает признак тестовой операции. | | public | [setTransfers()](../classes/YooKassa-Model-Payment-Payment.md#method_setTransfers) | | Устанавливает массив распределения денег между магазинами. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Payment/Payment.php](../../lib/Model/Payment/Payment.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Payment\Payment * Implements: * [\YooKassa\Model\Payment\PaymentInterface](../classes/YooKassa-Model-Payment-PaymentInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Максимальная длина строки описания платежа ```php MAX_LENGTH_DESCRIPTION = 128 ``` ###### MAX_LENGTH_MERCHANT_CUSTOMER_ID Максимальная длина строки идентификатора покупателя в вашей системе ```php MAX_LENGTH_MERCHANT_CUSTOMER_ID = 200 ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма заказа **Type:** AmountInterface **Details:** #### public $authorization_details : \YooKassa\Model\Payment\AuthorizationDetailsInterface --- ***Description*** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** #### public $authorizationDetails : \YooKassa\Model\Payment\AuthorizationDetailsInterface --- ***Description*** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** #### public $cancellation_details : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене платежа **Type:** CancellationDetailsInterface **Details:** #### public $cancellationDetails : \YooKassa\Model\CancellationDetailsInterface --- ***Description*** Комментарий к отмене платежа **Type:** CancellationDetailsInterface **Details:** #### public $captured_at : \DateTime --- ***Description*** Время подтверждения платежа магазином **Type:** \DateTime **Details:** #### public $capturedAt : \DateTime --- ***Description*** Время подтверждения платежа магазином **Type:** \DateTime **Details:** #### public $confirmation : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation --- ***Description*** Способ подтверждения платежа **Type:** AbstractConfirmation **Details:** #### public $created_at : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** #### public $createdAt : \DateTime --- ***Description*** Время создания заказа **Type:** \DateTime **Details:** #### public $deal : \YooKassa\Model\Deal\PaymentDealInfo --- ***Description*** Данные о сделке, в составе которой проходит платеж **Type:** PaymentDealInfo **Details:** #### public $description : string --- ***Description*** Описание транзакции **Type:** string **Details:** #### public $expires_at : \DateTime --- ***Description*** Время, до которого можно бесплатно отменить или подтвердить платеж **Type:** \DateTime **Details:** #### public $expiresAt : \DateTime --- ***Description*** Время, до которого можно бесплатно отменить или подтвердить платеж **Type:** \DateTime **Details:** #### public $id : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** #### public $income_amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма платежа, которую получит магазин **Type:** AmountInterface **Details:** #### public $incomeAmount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма платежа, которую получит магазин **Type:** AmountInterface **Details:** #### public $merchant_customer_id : string --- ***Description*** Идентификатор покупателя в вашей системе, например электронная почта или номер телефона **Type:** string **Details:** #### public $merchantCustomerId : string --- ***Description*** Идентификатор покупателя в вашей системе, например электронная почта или номер телефона **Type:** string **Details:** #### public $metadata : \YooKassa\Model\Metadata --- ***Description*** Метаданные платежа указанные мерчантом **Type:** Metadata **Details:** #### public $paid : bool --- ***Description*** Признак оплаты заказа **Type:** bool **Details:** #### public $payment_method : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения платежа **Type:** AbstractPaymentMethod **Details:** #### public $paymentMethod : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- ***Description*** Способ проведения платежа **Type:** AbstractPaymentMethod **Details:** #### public $receipt_registration : string --- ***Description*** Состояние регистрации фискального чека **Type:** string **Details:** #### public $receiptRegistration : string --- ***Description*** Состояние регистрации фискального чека **Type:** string **Details:** #### public $recipient : \YooKassa\Model\Payment\RecipientInterface --- ***Description*** Получатель платежа **Type:** RecipientInterface **Details:** #### public $refundable : bool --- ***Description*** Возможность провести возврат по API **Type:** bool **Details:** #### public $refunded_amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возвращенных средств платежа **Type:** AmountInterface **Details:** #### public $refundedAmount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возвращенных средств платежа **Type:** AmountInterface **Details:** #### public $status : string --- ***Description*** Текущее состояние платежа **Type:** string **Details:** #### public $test : bool --- ***Description*** Признак тестовой операции **Type:** bool **Details:** #### public $transfers : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Payment\TransferInterface[] --- ***Description*** Данные о распределении платежа между магазинами **Type:** TransferInterface[] **Details:** #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface **Details:** #### protected $_authorization_details : ?\YooKassa\Model\Payment\AuthorizationDetailsInterface --- **Summary** Данные об авторизации платежа **Type:** AuthorizationDetailsInterface **Details:** #### protected $_cancellation_details : ?\YooKassa\Model\CancellationDetailsInterface --- **Summary** Комментарий к статусу canceled: кто отменил платеж и по какой причине **Type:** CancellationDetailsInterface **Details:** #### protected $_captured_at : ?\DateTime --- **Type:** DateTime Время подтверждения платежа магазином **Details:** #### protected $_confirmation : ?\YooKassa\Model\Payment\Confirmation\AbstractConfirmation --- **Type:** AbstractConfirmation Способ подтверждения платежа **Details:** #### protected $_created_at : ?\DateTime --- **Type:** DateTime Время создания заказа **Details:** #### protected $_deal : ?\YooKassa\Model\Deal\PaymentDealInfo --- **Type:** PaymentDealInfo Данные о сделке, в составе которой проходит платеж. Необходимо передавать, если вы проводите Безопасную сделку **Details:** #### protected $_description : ?string --- **Type:** ?string Описание платежа **Details:** #### protected $_expires_at : ?\DateTime --- **Summary** Время, до которого можно бесплатно отменить или подтвердить платеж. В указанное время платеж в статусе `waiting_for_capture` будет автоматически отменен. **Type:** DateTime Время, до которого можно бесплатно отменить или подтвердить платеж **Details:** #### protected $_id : ?string --- **Type:** ?string Идентификатор платежа **Details:** #### protected $_income_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface **Details:** #### protected $_merchant_customer_id : ?string --- **Type:** ?string Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов. Присутствует, если вы хотите запомнить банковскую карту и отобразить ее при повторном платеже в виджете ЮKassa **Details:** #### protected $_metadata : ?\YooKassa\Model\Metadata --- **Type:** Metadata Метаданные платежа указанные мерчантом **Details:** #### protected $_paid : bool --- **Type:** bool Признак оплаты заказа **Details:** #### protected $_payment_method : ?\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod --- **Type:** AbstractPaymentMethod Способ проведения платежа **Details:** #### protected $_receipt_registration : ?string --- **Type:** ?string Состояние регистрации фискального чека **Details:** #### protected $_recipient : ?\YooKassa\Model\Payment\RecipientInterface --- **Type:** RecipientInterface Получатель платежа **Details:** #### protected $_refundable : bool --- **Type:** bool Возможность провести возврат по API **Details:** #### protected $_refunded_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface Сумма возвращенных средств платежа **Details:** #### protected $_status : ?string --- **Type:** ?string Текущее состояние платежа **Details:** #### protected $_test : bool --- **Summary** Признак тестовой операции. **Type:** bool **Details:** #### protected $_transfers : ?\YooKassa\Common\ListObject --- **Type:** ListObject Данные о распределении платежа между магазинами **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма платежа #### public getAuthorizationDetails() : null|\YooKassa\Model\Payment\AuthorizationDetailsInterface ```php public getAuthorizationDetails() : null|\YooKassa\Model\Payment\AuthorizationDetailsInterface ``` **Summary** Возвращает данные об авторизации платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\Payment\AuthorizationDetailsInterface - Данные об авторизации платежа #### public getCancellationDetails() : null|\YooKassa\Model\CancellationDetailsInterface ```php public getCancellationDetails() : null|\YooKassa\Model\CancellationDetailsInterface ``` **Summary** Возвращает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\CancellationDetailsInterface - Комментарий к статусу canceled #### public getCapturedAt() : null|\DateTime ```php public getCapturedAt() : null|\DateTime ``` **Summary** Возвращает время подтверждения платежа магазином или null, если время не задано. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\DateTime - Время подтверждения платежа магазином #### public getConfirmation() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null ```php public getConfirmation() : \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null ``` **Summary** Возвращает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\Confirmation\AbstractConfirmation|null - Способ подтверждения платежа #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \DateTime|null - Время создания заказа #### public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ```php public getDeal() : \YooKassa\Model\Deal\PaymentDealInfo|null ``` **Summary** Возвращает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Deal\PaymentDealInfo|null - Данные о сделке, в составе которой проходит платеж #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - #### public getExpiresAt() : null|\DateTime ```php public getExpiresAt() : null|\DateTime ``` **Summary** Возвращает время до которого можно бесплатно отменить или подтвердить платеж, или null, если оно не задано. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\DateTime - Время, до которого можно бесплатно отменить или подтвердить платеж #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Идентификатор платежа #### public getIncomeAmount() : \YooKassa\Model\AmountInterface|null ```php public getIncomeAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма платежа, которую получит магазин #### public getMerchantCustomerId() : string|null ```php public getMerchantCustomerId() : string|null ``` **Summary** Возвращает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Идентификатор покупателя в вашей системе #### public getMetadata() : \YooKassa\Model\Metadata|null ```php public getMetadata() : \YooKassa\Model\Metadata|null ``` **Summary** Возвращает метаданные платежа установленные мерчантом **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Metadata|null - Метаданные платежа указанные мерчантом #### public getPaid() : bool ```php public getPaid() : bool ``` **Summary** Проверяет, был ли уже оплачен заказ. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Признак оплаты заказа, true если заказ оплачен, false если нет #### public getPaymentMethod() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null ```php public getPaymentMethod() : \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null ``` **Summary** Возвращает используемый способ проведения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|null - Способ проведения платежа #### public getReceiptRegistration() : string|null ```php public getReceiptRegistration() : string|null ``` **Summary** Возвращает состояние регистрации фискального чека. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Состояние регистрации фискального чека #### public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ```php public getRecipient() : null|\YooKassa\Model\Payment\RecipientInterface ``` **Summary** Возвращает получателя платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** null|\YooKassa\Model\Payment\RecipientInterface - Получатель платежа или null, если получатель не задан #### public getRefundable() : bool ```php public getRefundable() : bool ``` **Summary** Проверяет возможность провести возврат по API. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Возможность провести возврат по API, true если есть, false если нет #### public getRefundedAmount() : \YooKassa\Model\AmountInterface|null ```php public getRefundedAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму возвращенных средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма возвращенных средств платежа #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает состояние платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** string|null - Текущее состояние платежа #### public getTest() : bool ```php public getTest() : bool ``` **Summary** Возвращает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** bool - Признак тестовой операции #### public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface ```php public getTransfers() : \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает массив распределения денег между магазинами. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) **Returns:** \YooKassa\Model\Payment\TransferInterface[]|\YooKassa\Common\ListObjectInterface - Массив распределения денег #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма платежа | **Returns:** self - #### public setAuthorizationDetails() : self ```php public setAuthorizationDetails(\YooKassa\Model\Payment\AuthorizationDetailsInterface|array|null $authorization_details = null) : self ``` **Summary** Устанавливает данные об авторизации платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\AuthorizationDetailsInterface OR array OR null | authorization_details | Данные об авторизации платежа | **Returns:** self - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\CancellationDetailsInterface|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает комментарий к статусу canceled: кто отменил платеж и по какой причине. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\CancellationDetailsInterface OR array OR null | cancellation_details | Комментарий к статусу canceled | **Returns:** self - #### public setCapturedAt() : self ```php public setCapturedAt(\DateTime|string|null $captured_at = null) : self ``` **Summary** Устанавливает время подтверждения платежа магазином **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | captured_at | Время подтверждения платежа магазином | **Returns:** self - #### public setConfirmation() : self ```php public setConfirmation(\YooKassa\Model\Payment\Confirmation\AbstractConfirmation|array|null $confirmation = null) : self ``` **Summary** Устанавливает способ подтверждения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\Confirmation\AbstractConfirmation OR array OR null | confirmation | Способ подтверждения платежа | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания заказа | **Returns:** self - #### public setDeal() : self ```php public setDeal(null|array|\YooKassa\Model\Deal\PaymentDealInfo $deal = null) : self ``` **Summary** Устанавливает данные о сделке, в составе которой проходит платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\PaymentDealInfo | deal | Данные о сделке, в составе которой проходит платеж | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает описание транзакции **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | | **Returns:** self - #### public setExpiresAt() : self ```php public setExpiresAt(\DateTime|string|null $expires_at = null) : self ``` **Summary** Устанавливает время до которого можно бесплатно отменить или подтвердить платеж. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | expires_at | Время, до которого можно бесплатно отменить или подтвердить платеж | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор платежа | **Returns:** self - #### public setIncomeAmount() : self ```php public setIncomeAmount(\YooKassa\Model\AmountInterface|array|null $income_amount = null) : self ``` **Summary** Устанавливает сумму платежа, которую получит магазин, значение `amount` за вычетом комиссии ЮKassa **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | income_amount | | **Returns:** self - #### public setMerchantCustomerId() : self ```php public setMerchantCustomerId(string|null $merchant_customer_id = null) : self ``` **Summary** Устанавливает идентификатор покупателя в вашей системе. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | merchant_customer_id | Идентификатор покупателя в вашей системе, например электронная почта или номер телефона. Не более 200 символов | **Returns:** self - #### public setMetadata() : self ```php public setMetadata(\YooKassa\Model\Metadata|array|null $metadata = null) : self ``` **Summary** Устанавливает метаданные платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Metadata OR array OR null | metadata | Метаданные платежа указанные мерчантом | **Returns:** self - #### public setPaid() : self ```php public setPaid(bool $paid) : self ``` **Summary** Устанавливает флаг оплаты заказа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | paid | Признак оплаты заказа | **Returns:** self - #### public setPaymentMethod() : self ```php public setPaymentMethod(\YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod|array|null $payment_method) : self ``` **Summary** Устанавливает используемый способ проведения платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\PaymentMethod\AbstractPaymentMethod OR array OR null | payment_method | Способ проведения платежа | **Returns:** self - #### public setReceiptRegistration() : self ```php public setReceiptRegistration(string|null $receipt_registration = null) : self ``` **Summary** Устанавливает состояние регистрации фискального чека **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | receipt_registration | Состояние регистрации фискального чека | **Returns:** self - #### public setRecipient() : self ```php public setRecipient(\YooKassa\Model\Payment\RecipientInterface|array|null $recipient = null) : self ``` **Summary** Устанавливает получателя платежа. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Payment\RecipientInterface OR array OR null | recipient | Объект с информацией о получателе платежа | **Returns:** self - #### public setRefundable() : self ```php public setRefundable(bool $refundable) : self ``` **Summary** Устанавливает возможность провести возврат по API. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | refundable | Возможность провести возврат по API | **Returns:** self - #### public setRefundedAmount() : self ```php public setRefundedAmount(\YooKassa\Model\AmountInterface|array|null $refunded_amount = null) : self ``` **Summary** Устанавливает сумму возвращенных средств. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | refunded_amount | Сумма возвращенных средств платежа | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус платежа **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус платежа | **Returns:** self - #### public setTest() : self ```php public setTest(bool $test = null) : self ``` **Summary** Устанавливает признак тестовой операции. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | test | Признак тестовой операции | **Returns:** self - #### public setTransfers() : self ```php public setTransfers(\YooKassa\Common\ListObjectInterface|array|null $transfers = null) : self ``` **Summary** Устанавливает массив распределения денег между магазинами. **Details:** * Inherited From: [\YooKassa\Model\Payment\Payment](../classes/YooKassa-Model-Payment-Payment.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | transfers | Массив распределения денег | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Payments-FraudData.md000064400000034114150364342670021473 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Payments\FraudData ### Namespace: [\YooKassa\Request\Payments](../namespaces/yookassa-request-payments.md) --- **Summary:** Класс, представляющий модель FraudData. **Description:** Информация для проверки операции на мошенничество --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$topped_up_phone](../classes/YooKassa-Request-Payments-FraudData.md#property_topped_up_phone) | | Номер телефона для пополнения | | public | [$toppedUpPhone](../classes/YooKassa-Request-Payments-FraudData.md#property_toppedUpPhone) | | Номер телефона для пополнения | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getToppedUpPhone()](../classes/YooKassa-Request-Payments-FraudData.md#method_getToppedUpPhone) | | Возвращает номер телефона для пополнения. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setToppedUpPhone()](../classes/YooKassa-Request-Payments-FraudData.md#method_setToppedUpPhone) | | Устанавливает Номер телефона для пополнения. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Payments/FraudData.php](../../lib/Request/Payments/FraudData.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Request\Payments\FraudData * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $topped_up_phone : string --- ***Description*** Номер телефона для пополнения **Type:** string **Details:** #### public $toppedUpPhone : string --- ***Description*** Номер телефона для пополнения **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getToppedUpPhone() : string|null ```php public getToppedUpPhone() : string|null ``` **Summary** Возвращает номер телефона для пополнения. **Details:** * Inherited From: [\YooKassa\Request\Payments\FraudData](../classes/YooKassa-Request-Payments-FraudData.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setToppedUpPhone() : self ```php public setToppedUpPhone(string|null $topped_up_phone = null) : self ``` **Summary** Устанавливает Номер телефона для пополнения. **Details:** * Inherited From: [\YooKassa\Request\Payments\FraudData](../classes/YooKassa-Request-Payments-FraudData.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | topped_up_phone | Номер телефона для пополнения. Не более 15 символов. Пример: ~`79110000000` | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-ReceiptsRequest.md000064400000122103150364342670022741 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Receipts\ReceiptsRequest ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Класс объекта запроса к API списка возвратов магазина. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LIMIT_VALUE](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#constant_MAX_LIMIT_VALUE) | | Максимальное количество объектов чеков в выборке | | public | [LENGTH_PAYMENT_ID](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#constant_LENGTH_PAYMENT_ID) | | Длина идентификатора платежа | | public | [LENGTH_REFUND_ID](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#constant_LENGTH_REFUND_ID) | | Длина идентификатора платежа | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$createdAtGt](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#property_createdAtGt) | | Время создания, от (не включая) | | public | [$createdAtGte](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#property_createdAtGte) | | Время создания, от (включительно) | | public | [$createdAtLt](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#property_createdAtLt) | | Время создания, до (не включая) | | public | [$createdAtLte](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#property_createdAtLte) | | Время создания, до (включительно) | | public | [$cursor](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#property_cursor) | | Токен для получения следующей страницы выборки | | public | [$limit](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#property_limit) | | Ограничение количества объектов возврата, отображаемых на одной странице выдачи | | public | [$paymentId](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#property_paymentId) | | Идентификатор платежа | | public | [$refundId](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#property_refundId) | | Идентификатор возврата | | public | [$status](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#property_status) | | Статус возврата | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [builder()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_builder) | | Возвращает инстанс билдера объектов запросов списка возвратов магазина. | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCreatedAtGt()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_getCreatedAtGt) | | Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCreatedAtGte()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_getCreatedAtGte) | | Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCreatedAtLt()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_getCreatedAtLt) | | Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCreatedAtLte()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_getCreatedAtLte) | | Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. | | public | [getCursor()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_getCursor) | | Возвращает токен для получения следующей страницы выборки. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [getLimit()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_getLimit) | | Ограничение количества объектов платежа. | | public | [getPaymentId()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_getPaymentId) | | Возвращает идентификатор платежа если он задан или null. | | public | [getRefundId()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_getRefundId) | | Возвращает идентификатор возврата. | | public | [getStatus()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_getStatus) | | Возвращает статус выбираемых возвратов или null, если он до этого не был установлен. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasCreatedAtGt()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_hasCreatedAtGt) | | Проверяет, была ли установлена дата создания от которой выбираются возвраты. | | public | [hasCreatedAtGte()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_hasCreatedAtGte) | | Проверяет, была ли установлена дата создания от которой выбираются возвраты. | | public | [hasCreatedAtLt()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_hasCreatedAtLt) | | Проверяет, была ли установлена дата создания до которой выбираются возвраты. | | public | [hasCreatedAtLte()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_hasCreatedAtLte) | | Проверяет, была ли установлена дата создания до которой выбираются возвраты. | | public | [hasCursor()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_hasCursor) | | Проверяет, был ли установлен токен следующей страницы. | | public | [hasLimit()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_hasLimit) | | Проверяет, было ли установлено ограничение количества объектов платежа. | | public | [hasPaymentId()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_hasPaymentId) | | Проверяет, был ли задан идентификатор платежа. | | public | [hasRefundId()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_hasRefundId) | | Проверяет, был ли установлен идентификатор возврата. | | public | [hasStatus()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_hasStatus) | | Проверяет, был ли установлен статус выбираемых возвратов. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCreatedAtGt()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_setCreatedAtGt) | | Устанавливает дату создания от которой выбираются возвраты. | | public | [setCreatedAtGte()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_setCreatedAtGte) | | Устанавливает дату создания от которой выбираются возвраты. | | public | [setCreatedAtLt()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_setCreatedAtLt) | | Устанавливает дату создания до которой выбираются возвраты. | | public | [setCreatedAtLte()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_setCreatedAtLte) | | Устанавливает дату создания до которой выбираются возвраты. | | public | [setCursor()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_setCursor) | | Устанавливает токен следующей страницы выборки. | | public | [setLimit()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_setLimit) | | Устанавливает ограничение количества объектов платежа. | | public | [setPaymentId()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_setPaymentId) | | Устанавливает идентификатор платежа или null, если требуется его удалить. | | public | [setRefundId()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_setRefundId) | | Устанавливает идентификатор возврата. | | public | [setStatus()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_setStatus) | | Устанавливает статус выбираемых чеков | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | public | [validate()](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md#method_validate) | | Проверяет валидность текущего объекта запроса. | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_setValidationError) | | Устанавливает ошибку валидации. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Receipts/ReceiptsRequest.php](../../lib/Request/Receipts/ReceiptsRequest.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) * \YooKassa\Request\Receipts\ReceiptsRequest * Implements: * [\YooKassa\Request\Receipts\ReceiptsRequestInterface](../classes/YooKassa-Request-Receipts-ReceiptsRequestInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LIMIT_VALUE Максимальное количество объектов чеков в выборке ```php MAX_LIMIT_VALUE = 100 ``` ###### LENGTH_PAYMENT_ID Длина идентификатора платежа ```php LENGTH_PAYMENT_ID = 36 ``` ###### LENGTH_REFUND_ID Длина идентификатора платежа ```php LENGTH_REFUND_ID = 36 ``` --- ## Properties #### public $createdAtGt : \DateTime --- ***Description*** Время создания, от (не включая) **Type:** \DateTime **Details:** #### public $createdAtGte : \DateTime --- ***Description*** Время создания, от (включительно) **Type:** \DateTime **Details:** #### public $createdAtLt : \DateTime --- ***Description*** Время создания, до (не включая) **Type:** \DateTime **Details:** #### public $createdAtLte : \DateTime --- ***Description*** Время создания, до (включительно) **Type:** \DateTime **Details:** #### public $cursor : string --- ***Description*** Токен для получения следующей страницы выборки **Type:** string **Details:** #### public $limit : null|int --- ***Description*** Ограничение количества объектов возврата, отображаемых на одной странице выдачи **Type:** null|int **Details:** #### public $paymentId : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** #### public $refundId : string --- ***Description*** Идентификатор возврата **Type:** string **Details:** #### public $status : string --- ***Description*** Статус возврата **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public builder() : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ```php Static public builder() : \YooKassa\Request\Receipts\ReceiptsRequestBuilder ``` **Summary** Возвращает инстанс билдера объектов запросов списка возвратов магазина. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** \YooKassa\Request\Receipts\ReceiptsRequestBuilder - Билдер объектов запросов списка возвратов #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCreatedAtGt() : null|\DateTime ```php public getCreatedAtGt() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** null|\DateTime - Время создания, от (не включая) #### public getCreatedAtGte() : null|\DateTime ```php public getCreatedAtGte() : null|\DateTime ``` **Summary** Возвращает дату создания от которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** null|\DateTime - Время создания, от (включительно) #### public getCreatedAtLt() : null|\DateTime ```php public getCreatedAtLt() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** null|\DateTime - Время создания, до (не включая) #### public getCreatedAtLte() : null|\DateTime ```php public getCreatedAtLte() : null|\DateTime ``` **Summary** Возвращает дату создания до которой будут возвращены возвраты или null, если дата не была установлена. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** null|\DateTime - Время создания, до (включительно) #### public getCursor() : null|string ```php public getCursor() : null|string ``` **Summary** Возвращает токен для получения следующей страницы выборки. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** null|string - Токен для получения следующей страницы выборки #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string|null - Последняя произошедшая ошибка валидации #### public getLimit() : null|int ```php public getLimit() : null|int ``` **Summary** Ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** null|int - Ограничение количества объектов платежа #### public getPaymentId() : null|string ```php public getPaymentId() : null|string ``` **Summary** Возвращает идентификатор платежа если он задан или null. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** null|string - Идентификатор платежа #### public getRefundId() : string|null ```php public getRefundId() : string|null ``` **Summary** Возвращает идентификатор возврата. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** string|null - Идентификатор возврата #### public getStatus() : null|string ```php public getStatus() : null|string ``` **Summary** Возвращает статус выбираемых возвратов или null, если он до этого не был установлен. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** null|string - Статус выбираемых возвратов #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasCreatedAtGt() : bool ```php public hasCreatedAtGt() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCreatedAtGte() : bool ```php public hasCreatedAtGte() : bool ``` **Summary** Проверяет, была ли установлена дата создания от которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCreatedAtLt() : bool ```php public hasCreatedAtLt() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCreatedAtLte() : bool ```php public hasCreatedAtLte() : bool ``` **Summary** Проверяет, была ли установлена дата создания до которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** bool - True если дата была установлена, false если нет #### public hasCursor() : bool ```php public hasCursor() : bool ``` **Summary** Проверяет, был ли установлен токен следующей страницы. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** bool - True если токен был установлен, false если нет #### public hasLimit() : bool ```php public hasLimit() : bool ``` **Summary** Проверяет, было ли установлено ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** bool - True если было установлено, false если нет #### public hasPaymentId() : bool ```php public hasPaymentId() : bool ``` **Summary** Проверяет, был ли задан идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** bool - True если идентификатор был задан, false если нет #### public hasRefundId() : bool ```php public hasRefundId() : bool ``` **Summary** Проверяет, был ли установлен идентификатор возврата. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** bool - True если идентификатор возврата был установлен, false если не был #### public hasStatus() : bool ```php public hasStatus() : bool ``` **Summary** Проверяет, был ли установлен статус выбираемых возвратов. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** bool - True если статус был установлен, false если нет #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCreatedAtGt() : self ```php public setCreatedAtGt(null|\DateTime|int|string $created_at_gt) : self ``` **Summary** Устанавливает дату создания от которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | created_at_gt | Время создания, от (не включая) или null, чтобы удалить значение | **Returns:** self - #### public setCreatedAtGte() : self ```php public setCreatedAtGte(null|\DateTime|int|string $_created_at_gte) : self ``` **Summary** Устанавливает дату создания от которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | _created_at_gte | Время создания, от (включительно) или null, чтобы удалить значение | **Returns:** self - #### public setCreatedAtLt() : self ```php public setCreatedAtLt(null|\DateTime|int|string $created_at_lt) : self ``` **Summary** Устанавливает дату создания до которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | created_at_lt | Время создания, до (не включая) или null, чтобы удалить значение | **Returns:** self - #### public setCreatedAtLte() : self ```php public setCreatedAtLte(null|\DateTime|int|string $created_at_lte) : self ``` **Summary** Устанавливает дату создания до которой выбираются возвраты. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \DateTime OR int OR string | created_at_lte | Время создания, до (включительно) или null, чтобы удалить значение | **Returns:** self - #### public setCursor() : self ```php public setCursor(string|null $cursor) : self ``` **Summary** Устанавливает токен следующей страницы выборки. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | cursor | Токен следующей страницы выборки или null, чтобы удалить значение | **Returns:** self - #### public setLimit() : self ```php public setLimit(null|int $limit) : self ``` **Summary** Устанавливает ограничение количества объектов платежа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR int | limit | Ограничение количества объектов платежа или null, чтобы удалить значение | **Returns:** self - #### public setPaymentId() : self ```php public setPaymentId(null|string $payment_id) : self ``` **Summary** Устанавливает идентификатор платежа или null, если требуется его удалить. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | payment_id | Идентификатор платежа | **Returns:** self - #### public setRefundId() : self ```php public setRefundId(string|null $refund_id) : self ``` **Summary** Устанавливает идентификатор возврата. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | refund_id | Идентификатор возврата, который ищется в API | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status) : self ``` **Summary** Устанавливает статус выбираемых чеков **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус выбираемых чеков или null, чтобы удалить значение | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public validate() : bool ```php public validate() : bool ``` **Summary** Проверяет валидность текущего объекта запроса. **Details:** * Inherited From: [\YooKassa\Request\Receipts\ReceiptsRequest](../classes/YooKassa-Request-Receipts-ReceiptsRequest.md) **Returns:** bool - True если объект валиден, false если нет #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setValidationError() : void ```php protected setValidationError(string $value) : void ``` **Summary** Устанавливает ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** void - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-Receipt.md000064400000115534150364342670020444 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\Receipt ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Класс данных для формирования чека в онлайн-кассе (для соблюдения 54-ФЗ). --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$additional_user_props](../classes/YooKassa-Model-Receipt-Receipt.md#property_additional_user_props) | | Дополнительный реквизит пользователя (тег в 54 ФЗ — 1084) | | public | [$additionalUserProps](../classes/YooKassa-Model-Receipt-Receipt.md#property_additionalUserProps) | | Дополнительный реквизит пользователя (тег в 54 ФЗ — 1084) | | public | [$customer](../classes/YooKassa-Model-Receipt-Receipt.md#property_customer) | | Информация о плательщике | | public | [$items](../classes/YooKassa-Model-Receipt-Receipt.md#property_items) | | Список товаров в заказе | | public | [$receipt_industry_details](../classes/YooKassa-Model-Receipt-Receipt.md#property_receipt_industry_details) | | Отраслевой реквизит чека (тег в 54 ФЗ — 1261) | | public | [$receipt_operational_details](../classes/YooKassa-Model-Receipt-Receipt.md#property_receipt_operational_details) | | Операционный реквизит чека (тег в 54 ФЗ — 1270) | | public | [$receiptIndustryDetails](../classes/YooKassa-Model-Receipt-Receipt.md#property_receiptIndustryDetails) | | Отраслевой реквизит чека (тег в 54 ФЗ — 1261) | | public | [$receiptOperationalDetails](../classes/YooKassa-Model-Receipt-Receipt.md#property_receiptOperationalDetails) | | Операционный реквизит чека (тег в 54 ФЗ — 1270) | | public | [$settlements](../classes/YooKassa-Model-Receipt-Receipt.md#property_settlements) | | Массив оплат, обеспечивающих выдачу товара | | public | [$shipping_items](../classes/YooKassa-Model-Receipt-Receipt.md#property_shipping_items) | | Список товаров в заказе, являющихся доставкой | | public | [$shippingItems](../classes/YooKassa-Model-Receipt-Receipt.md#property_shippingItems) | | Список товаров в заказе, являющихся доставкой | | public | [$tax_system_code](../classes/YooKassa-Model-Receipt-Receipt.md#property_tax_system_code) | | Код системы налогообложения. Число 1-6. | | public | [$taxSystemCode](../classes/YooKassa-Model-Receipt-Receipt.md#property_taxSystemCode) | | Код системы налогообложения. Число 1-6. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [addItem()](../classes/YooKassa-Model-Receipt-Receipt.md#method_addItem) | | Добавляет товар в чек. | | public | [addReceiptIndustryDetails()](../classes/YooKassa-Model-Receipt-Receipt.md#method_addReceiptIndustryDetails) | | Добавляет отраслевой реквизит чека. | | public | [addSettlement()](../classes/YooKassa-Model-Receipt-Receipt.md#method_addSettlement) | | Добавляет оплату в чек. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAdditionalUserProps()](../classes/YooKassa-Model-Receipt-Receipt.md#method_getAdditionalUserProps) | | Возвращает дополнительный реквизит пользователя. | | public | [getAmountValue()](../classes/YooKassa-Model-Receipt-Receipt.md#method_getAmountValue) | | Возвращает стоимость заказа исходя из состава чека. | | public | [getCustomer()](../classes/YooKassa-Model-Receipt-Receipt.md#method_getCustomer) | | Возвращает информацию о плательщике. | | public | [getItems()](../classes/YooKassa-Model-Receipt-Receipt.md#method_getItems) | | Возвращает список позиций в текущем чеке. | | public | [getObjectId()](../classes/YooKassa-Model-Receipt-Receipt.md#method_getObjectId) | | Возвращает Id объекта чека. | | public | [getReceiptIndustryDetails()](../classes/YooKassa-Model-Receipt-Receipt.md#method_getReceiptIndustryDetails) | | Возвращает отраслевой реквизит чека. | | public | [getReceiptOperationalDetails()](../classes/YooKassa-Model-Receipt-Receipt.md#method_getReceiptOperationalDetails) | | Возвращает операционный реквизит чека. | | public | [getSettlements()](../classes/YooKassa-Model-Receipt-Receipt.md#method_getSettlements) | | Возвращает массив оплат, обеспечивающих выдачу товара. | | public | [getShippingAmountValue()](../classes/YooKassa-Model-Receipt-Receipt.md#method_getShippingAmountValue) | | Возвращает стоимость доставки исходя из состава чека. | | public | [getTaxSystemCode()](../classes/YooKassa-Model-Receipt-Receipt.md#method_getTaxSystemCode) | | Возвращает код системы налогообложения. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Model-Receipt-Receipt.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [normalize()](../classes/YooKassa-Model-Receipt-Receipt.md#method_normalize) | | Подгоняет стоимость товаров в чеке к общей цене заказа. | | public | [notEmpty()](../classes/YooKassa-Model-Receipt-Receipt.md#method_notEmpty) | | Проверяет есть ли в чеке хотя бы одна позиция. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [removeItems()](../classes/YooKassa-Model-Receipt-Receipt.md#method_removeItems) | | Обнуляет список позиций в чеке. | | public | [setAdditionalUserProps()](../classes/YooKassa-Model-Receipt-Receipt.md#method_setAdditionalUserProps) | | Устанавливает дополнительный реквизит пользователя. | | public | [setCustomer()](../classes/YooKassa-Model-Receipt-Receipt.md#method_setCustomer) | | Устанавливает информацию о плательщике. | | public | [setItems()](../classes/YooKassa-Model-Receipt-Receipt.md#method_setItems) | | Устанавливает список позиций в чеке. | | public | [setReceiptIndustryDetails()](../classes/YooKassa-Model-Receipt-Receipt.md#method_setReceiptIndustryDetails) | | Устанавливает отраслевой реквизит чека. | | public | [setReceiptOperationalDetails()](../classes/YooKassa-Model-Receipt-Receipt.md#method_setReceiptOperationalDetails) | | Устанавливает операционный реквизит чека. | | public | [setSettlements()](../classes/YooKassa-Model-Receipt-Receipt.md#method_setSettlements) | | Возвращает массив оплат, обеспечивающих выдачу товара. | | public | [setTaxSystemCode()](../classes/YooKassa-Model-Receipt-Receipt.md#method_setTaxSystemCode) | | Устанавливает код системы налогообложения. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Receipt/Receipt.php](../../lib/Model/Receipt/Receipt.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Receipt\Receipt * Implements: * [\YooKassa\Model\Receipt\ReceiptInterface](../classes/YooKassa-Model-Receipt-ReceiptInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $additional_user_props : \YooKassa\Model\Receipt\AdditionalUserProps --- ***Description*** Дополнительный реквизит пользователя (тег в 54 ФЗ — 1084) **Type:** AdditionalUserProps **Details:** #### public $additionalUserProps : \YooKassa\Model\Receipt\AdditionalUserProps --- ***Description*** Дополнительный реквизит пользователя (тег в 54 ФЗ — 1084) **Type:** AdditionalUserProps **Details:** #### public $customer : \YooKassa\Model\Receipt\ReceiptCustomer --- ***Description*** Информация о плательщике **Type:** ReceiptCustomer **Details:** #### public $items : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\ReceiptItemInterface[] --- ***Description*** Список товаров в заказе **Type:** ReceiptItemInterface[] **Details:** #### public $receipt_industry_details : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\IndustryDetails[] --- ***Description*** Отраслевой реквизит чека (тег в 54 ФЗ — 1261) **Type:** IndustryDetails[] **Details:** #### public $receipt_operational_details : \YooKassa\Model\Receipt\OperationalDetails --- ***Description*** Операционный реквизит чека (тег в 54 ФЗ — 1270) **Type:** OperationalDetails **Details:** #### public $receiptIndustryDetails : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\IndustryDetails[] --- ***Description*** Отраслевой реквизит чека (тег в 54 ФЗ — 1261) **Type:** IndustryDetails[] **Details:** #### public $receiptOperationalDetails : \YooKassa\Model\Receipt\OperationalDetails --- ***Description*** Операционный реквизит чека (тег в 54 ФЗ — 1270) **Type:** OperationalDetails **Details:** #### public $settlements : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\SettlementInterface[] --- ***Description*** Массив оплат, обеспечивающих выдачу товара **Type:** SettlementInterface[] **Details:** #### public $shipping_items : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\ReceiptItemInterface[] --- ***Description*** Список товаров в заказе, являющихся доставкой **Type:** ReceiptItemInterface[] **Details:** #### public $shippingItems : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Receipt\ReceiptItemInterface[] --- ***Description*** Список товаров в заказе, являющихся доставкой **Type:** ReceiptItemInterface[] **Details:** #### public $tax_system_code : int --- ***Description*** Код системы налогообложения. Число 1-6. **Type:** int **Details:** #### public $taxSystemCode : int --- ***Description*** Код системы налогообложения. Число 1-6. **Type:** int **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public addItem() : void ```php public addItem(\YooKassa\Model\Receipt\ReceiptItemInterface[]|\YooKassa\Common\ListObjectInterface $value) : void ``` **Summary** Добавляет товар в чек. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\ReceiptItemInterface[] OR \YooKassa\Common\ListObjectInterface | value | Объект добавляемой в чек позиции | **Returns:** void - #### public addReceiptIndustryDetails() : self ```php public addReceiptIndustryDetails(\YooKassa\Model\Receipt\IndustryDetails|array $value) : self ``` **Summary** Добавляет отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\IndustryDetails OR array | value | Отраслевой реквизит чека. | **Returns:** self - #### public addSettlement() : self ```php public addSettlement(\YooKassa\Model\Receipt\SettlementInterface $value) : self ``` **Summary** Добавляет оплату в чек. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\SettlementInterface | value | Оплата | **Returns:** self - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAdditionalUserProps() : \YooKassa\Model\Receipt\AdditionalUserProps|null ```php public getAdditionalUserProps() : \YooKassa\Model\Receipt\AdditionalUserProps|null ``` **Summary** Возвращает дополнительный реквизит пользователя. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) **Returns:** \YooKassa\Model\Receipt\AdditionalUserProps|null - Дополнительный реквизит пользователя #### public getAmountValue() : int ```php public getAmountValue(bool $withShipping = true) : int ``` **Summary** Возвращает стоимость заказа исходя из состава чека. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | withShipping | Добавить ли к стоимости заказа стоимость доставки | **Returns:** int - Общая стоимость заказа в центах/копейках #### public getCustomer() : \YooKassa\Model\Receipt\ReceiptCustomer ```php public getCustomer() : \YooKassa\Model\Receipt\ReceiptCustomer ``` **Summary** Возвращает информацию о плательщике. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) **Returns:** \YooKassa\Model\Receipt\ReceiptCustomer - Информация о плательщике #### public getItems() : \YooKassa\Model\Receipt\ReceiptItemInterface[]|\YooKassa\Common\ListObjectInterface ```php public getItems() : \YooKassa\Model\Receipt\ReceiptItemInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список позиций в текущем чеке. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) **Returns:** \YooKassa\Model\Receipt\ReceiptItemInterface[]|\YooKassa\Common\ListObjectInterface - Список товаров в заказе #### public getObjectId() : null|string ```php public getObjectId() : null|string ``` **Summary** Возвращает Id объекта чека. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) **Returns:** null|string - Id объекта чека #### public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ```php public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) **Returns:** \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface - Отраслевой реквизит чека #### public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails|null ```php public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails|null ``` **Summary** Возвращает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) **Returns:** \YooKassa\Model\Receipt\OperationalDetails|null - Операционный реквизит чека #### public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) **Returns:** \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface - Массив оплат, обеспечивающих выдачу товара #### public getShippingAmountValue() : int ```php public getShippingAmountValue() : int ``` **Summary** Возвращает стоимость доставки исходя из состава чека. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) **Returns:** int - Стоимость доставки из состава чека в центах/копейках #### public getTaxSystemCode() : int|null ```php public getTaxSystemCode() : int|null ``` **Summary** Возвращает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) **Returns:** int|null - Код системы налогообложения. Число 1-6. #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public normalize() : void ```php public normalize(\YooKassa\Model\AmountInterface $orderAmount, bool $withShipping = false) : void ``` **Summary** Подгоняет стоимость товаров в чеке к общей цене заказа. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface | orderAmount | Общая стоимость заказа | | bool | withShipping | Поменять ли заодно и цену доставки | **Returns:** void - #### public notEmpty() : bool ```php public notEmpty() : bool ``` **Summary** Проверяет есть ли в чеке хотя бы одна позиция. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) **Returns:** bool - True если чек не пуст, false если в чеке нет ни одной позиции #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public removeItems() : self ```php public removeItems() : self ``` **Summary** Обнуляет список позиций в чеке. **Description** Если до этого в чеке уже были установлены значения, они удаляются. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) **Returns:** self - #### public setAdditionalUserProps() : self ```php public setAdditionalUserProps(\YooKassa\Model\Receipt\AdditionalUserProps|array $additional_user_props = null) : self ``` **Summary** Устанавливает дополнительный реквизит пользователя. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\AdditionalUserProps OR array | additional_user_props | Дополнительный реквизит пользователя | **Returns:** self - #### public setCustomer() : self ```php public setCustomer(\YooKassa\Model\Receipt\ReceiptCustomer|array|null $customer = null) : self ``` **Summary** Устанавливает информацию о плательщике. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\ReceiptCustomer OR array OR null | customer | | **Returns:** self - #### public setItems() : self ```php public setItems(array|\YooKassa\Common\ListObjectInterface $items) : self ``` **Summary** Устанавливает список позиций в чеке. **Description** Если до этого в чеке уже были установлены значения, они удаляются и полностью заменяются переданным списком позиций. Все передаваемые значения в массиве позиций должны быть объектами класса, реализующего интерфейс ReceiptItemInterface, в противном случае будет выброшено исключение InvalidPropertyValueTypeException. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Common\ListObjectInterface | items | Список товаров в заказе | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Validator\Exceptions\EmptyPropertyValueException | Выбрасывается если передали пустой массив значений | | \YooKassa\Validator\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в качестве значения был передан не массив и не итератор, либо если одно из переданных значений не реализует интерфейс ReceiptItemInterface | **Returns:** self - #### public setReceiptIndustryDetails() : self ```php public setReceiptIndustryDetails(array|\YooKassa\Common\ListObjectInterface|null $receipt_industry_details = null) : self ``` **Summary** Устанавливает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Common\ListObjectInterface OR null | receipt_industry_details | Отраслевой реквизит чека | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Validator\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданный аргумент - не массив | **Returns:** self - #### public setReceiptOperationalDetails() : self ```php public setReceiptOperationalDetails(array|\YooKassa\Model\Receipt\OperationalDetails|null $receipt_operational_details = null) : self ``` **Summary** Устанавливает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\OperationalDetails OR null | receipt_operational_details | Операционный реквизит чека | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Validator\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданный аргумент - не массив | **Returns:** self - #### public setSettlements() : self ```php public setSettlements(\YooKassa\Common\ListObjectInterface|array|null $settlements = null) : self ``` **Summary** Возвращает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | settlements | | **Returns:** self - #### public setTaxSystemCode() : self ```php public setTaxSystemCode(int|null $tax_system_code) : self ``` **Summary** Устанавливает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Receipt](../classes/YooKassa-Model-Receipt-Receipt.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | tax_system_code | Код системы налогообложения. Число 1-6 | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-AmountInterface.md000064400000011014150364342670020530 0ustar00# [YooKassa API SDK](../home.md) # Interface: AmountInterface ### Namespace: [\YooKassa\Model](../namespaces/yookassa-model.md) --- **Summary:** Interface AmountInterface. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getCurrency()](../classes/YooKassa-Model-AmountInterface.md#method_getCurrency) | | Возвращает валюту. | | public | [getIntegerValue()](../classes/YooKassa-Model-AmountInterface.md#method_getIntegerValue) | | Возвращает сумму в копейках в виде целого числа. | | public | [getValue()](../classes/YooKassa-Model-AmountInterface.md#method_getValue) | | Возвращает значение суммы. | | public | [setCurrency()](../classes/YooKassa-Model-AmountInterface.md#method_setCurrency) | | Устанавливает код валюты. | | public | [setValue()](../classes/YooKassa-Model-AmountInterface.md#method_setValue) | | Устанавливает значение суммы. | | public | [toArray()](../classes/YooKassa-Model-AmountInterface.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | --- ### Details * File: [lib/Model/AmountInterface.php](../../lib/Model/AmountInterface.php) * Package: \Default --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | property | | Сумма | | property | | Код валюты | --- ## Methods #### public getValue() : string ```php public getValue() : string ``` **Summary** Возвращает значение суммы. **Details:** * Inherited From: [\YooKassa\Model\AmountInterface](../classes/YooKassa-Model-AmountInterface.md) **Returns:** string - Сумма #### public setValue() : mixed ```php public setValue(\YooKassa\Model\numeric|string $value) : mixed ``` **Summary** Устанавливает значение суммы. **Details:** * Inherited From: [\YooKassa\Model\AmountInterface](../classes/YooKassa-Model-AmountInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\numeric OR string | value | Сумма | **Returns:** mixed - #### public getIntegerValue() : int ```php public getIntegerValue() : int ``` **Summary** Возвращает сумму в копейках в виде целого числа. **Details:** * Inherited From: [\YooKassa\Model\AmountInterface](../classes/YooKassa-Model-AmountInterface.md) **Returns:** int - Сумма в копейках/центах #### public getCurrency() : string ```php public getCurrency() : string ``` **Summary** Возвращает валюту. **Details:** * Inherited From: [\YooKassa\Model\AmountInterface](../classes/YooKassa-Model-AmountInterface.md) **Returns:** string - Код валюты #### public setCurrency() : mixed ```php public setCurrency(string $currency) : mixed ``` **Summary** Устанавливает код валюты. **Details:** * Inherited From: [\YooKassa\Model\AmountInterface](../classes/YooKassa-Model-AmountInterface.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | currency | Код валюты | **Returns:** mixed - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Model\AmountInterface](../classes/YooKassa-Model-AmountInterface.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Helpers-RawHeadersParser.md000064400000003341150364342670021214 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Helpers\RawHeadersParser ### Namespace: [\YooKassa\Helpers](../namespaces/yookassa-helpers.md) --- **Summary:** Класс, представляющий модель Random. **Description:** Класс хэлпера для генерации случайных значений, используется в тестах. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [parse()](../classes/YooKassa-Helpers-RawHeadersParser.md#method_parse) | | | --- ### Details * File: [lib/Helpers/RawHeadersParser.php](../../lib/Helpers/RawHeadersParser.php) * Package: YooKassa\Helpers * Class Hierarchy: * \YooKassa\Helpers\RawHeadersParser * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Methods #### public parse() : mixed ```php Static public parse(mixed $rawHeaders) : mixed ``` **Details:** * Inherited From: [\YooKassa\Helpers\RawHeadersParser](../classes/YooKassa-Helpers-RawHeadersParser.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | rawHeaders | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-ReceiptRegistrationStatus.md000064400000012433150364342670024257 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payment\ReceiptRegistrationStatus ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Класс, представляющий модель ReceiptRegistrationStatus. **Description:** Возможные статусы доставки данных для чека в онлайн-кассу. Состояние регистрации фискального чека: - `pending` - Чек ожидает доставки - `succeeded` - Успешно доставлен - `canceled` - Чек не доставлен --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [PENDING](../classes/YooKassa-Model-Payment-ReceiptRegistrationStatus.md#constant_PENDING) | | Состояние регистрации фискального чека: ожидает доставки | | public | [SUCCEEDED](../classes/YooKassa-Model-Payment-ReceiptRegistrationStatus.md#constant_SUCCEEDED) | | Состояние регистрации фискального чека: успешно доставлен | | public | [CANCELED](../classes/YooKassa-Model-Payment-ReceiptRegistrationStatus.md#constant_CANCELED) | | Состояние регистрации фискального чека: не доставлен | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payment-ReceiptRegistrationStatus.md#property_validValues) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payment/ReceiptRegistrationStatus.php](../../lib/Model/Payment/ReceiptRegistrationStatus.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payment\ReceiptRegistrationStatus * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### PENDING Состояние регистрации фискального чека: ожидает доставки ```php PENDING = 'pending' ``` ###### SUCCEEDED Состояние регистрации фискального чека: успешно доставлен ```php SUCCEEDED = 'succeeded' ``` ###### CANCELED Состояние регистрации фискального чека: не доставлен ```php CANCELED = 'canceled' ``` --- ## Properties #### protected $validValues : array --- **Type:** array Массив принимаемых enum'ом значений **Details:** --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payout-PayoutCancellationDetailsPartyCode.md000064400000012142150364342670025645 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Payout\PayoutCancellationDetailsPartyCode ### Namespace: [\YooKassa\Model\Payout](../namespaces/yookassa-model-payout.md) --- **Summary:** Класс, представляющий модель PayoutCancellationDetailsPartyCode. **Description:** Возможные инициаторы отмены выплаты. Возможные значения: - `yoo_money` - ЮKassa - `payout_network` - «Внешние» участники процесса выплаты (например, эмитент, сторонний платежный сервис) --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [YOO_MONEY](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsPartyCode.md#constant_YOO_MONEY) | | ЮKassa | | public | [PAYOUT_NETWORK](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsPartyCode.md#constant_PAYOUT_NETWORK) | | «Внешние» участники процесса выплаты (например, эмитент, сторонний платежный сервис) | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$validValues](../classes/YooKassa-Model-Payout-PayoutCancellationDetailsPartyCode.md#property_validValues) | | Возвращает список доступных значений | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getEnabledValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getEnabledValues) | | Возвращает значения в enum'е значения которых разрешены. | | public | [getValidValues()](../classes/YooKassa-Common-AbstractEnum.md#method_getValidValues) | | Возвращает все значения в enum'e. | | public | [valueExists()](../classes/YooKassa-Common-AbstractEnum.md#method_valueExists) | | Проверяет наличие значения в enum'e. | --- ### Details * File: [lib/Model/Payout/PayoutCancellationDetailsPartyCode.php](../../lib/Model/Payout/PayoutCancellationDetailsPartyCode.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) * \YooKassa\Model\Payout\PayoutCancellationDetailsPartyCode * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### YOO_MONEY ЮKassa ```php YOO_MONEY = 'yoo_money' ``` ###### PAYOUT_NETWORK «Внешние» участники процесса выплаты (например, эмитент, сторонний платежный сервис) ```php PAYOUT_NETWORK = 'payout_network' ``` --- ## Properties #### protected $validValues : array --- **Summary** Возвращает список доступных значений **Type:** array Массив принимаемых enum'ом значений **Details:** ##### Tags | Tag | Version | Description | | --- | ------- | ----------- | | return | | | --- ## Methods #### public getEnabledValues() : string[] ```php Static public getEnabledValues() : string[] ``` **Summary** Возвращает значения в enum'е значения которых разрешены. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** string[] - Массив разрешённых значений #### public getValidValues() : array ```php Static public getValidValues() : array ``` **Summary** Возвращает все значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) **Returns:** array - Массив значений в перечислении #### public valueExists() : bool ```php Static public valueExists(mixed $value) : bool ``` **Summary** Проверяет наличие значения в enum'e. **Details:** * Inherited From: [\YooKassa\Common\AbstractEnum](../classes/YooKassa-Common-AbstractEnum.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | value | Проверяемое значение | **Returns:** bool - True если значение имеется, false если нет --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Receipt-Supplier.md000064400000041743150364342670020654 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Receipt\Supplier ### Namespace: [\YooKassa\Model\Receipt](../namespaces/yookassa-model-receipt.md) --- **Summary:** Class Supplier. **Description:** Информация о поставщике товара или услуги. Можно передавать, если вы отправляете данные для формирования чека по сценарию [Сначала платеж, потом чек](https://yookassa.ru/developers/payment-acceptance/receipts/54fz/other-services/basics#receipt-after-payment). --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$inn](../classes/YooKassa-Model-Receipt-Supplier.md#property_inn) | | ИНН пользователя (10 или 12 цифр) | | public | [$name](../classes/YooKassa-Model-Receipt-Supplier.md#property_name) | | Наименование поставщика | | public | [$phone](../classes/YooKassa-Model-Receipt-Supplier.md#property_phone) | | Телефон пользователя. Указывается в формате ITU-T E.164 | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getInn()](../classes/YooKassa-Model-Receipt-Supplier.md#method_getInn) | | Возвращает ИНН пользователя (10 или 12 цифр). | | public | [getName()](../classes/YooKassa-Model-Receipt-Supplier.md#method_getName) | | Возвращает наименование поставщика. | | public | [getPhone()](../classes/YooKassa-Model-Receipt-Supplier.md#method_getPhone) | | Возвращает phone. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setInn()](../classes/YooKassa-Model-Receipt-Supplier.md#method_setInn) | | Устанавливает ИНН пользователя (10 или 12 цифр). | | public | [setName()](../classes/YooKassa-Model-Receipt-Supplier.md#method_setName) | | Устанавливает наименование поставщика. | | public | [setPhone()](../classes/YooKassa-Model-Receipt-Supplier.md#method_setPhone) | | Устанавливает Телефон пользователя. Указывается в формате ITU-T E.164. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Receipt/Supplier.php](../../lib/Model/Receipt/Supplier.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Receipt\Supplier * Implements: * [\YooKassa\Model\Receipt\SupplierInterface](../classes/YooKassa-Model-Receipt-SupplierInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $inn : string --- ***Description*** ИНН пользователя (10 или 12 цифр) **Type:** string **Details:** #### public $name : string --- ***Description*** Наименование поставщика **Type:** string **Details:** #### public $phone : string --- ***Description*** Телефон пользователя. Указывается в формате ITU-T E.164 **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getInn() : null|string ```php public getInn() : null|string ``` **Summary** Возвращает ИНН пользователя (10 или 12 цифр). **Details:** * Inherited From: [\YooKassa\Model\Receipt\Supplier](../classes/YooKassa-Model-Receipt-Supplier.md) **Returns:** null|string - ИНН пользователя #### public getName() : ?string ```php public getName() : ?string ``` **Summary** Возвращает наименование поставщика. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Supplier](../classes/YooKassa-Model-Receipt-Supplier.md) **Returns:** ?string - #### public getPhone() : string|null ```php public getPhone() : string|null ``` **Summary** Возвращает phone. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Supplier](../classes/YooKassa-Model-Receipt-Supplier.md) **Returns:** string|null - #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setInn() : self ```php public setInn(null|string $inn = null) : self ``` **Summary** Устанавливает ИНН пользователя (10 или 12 цифр). **Details:** * Inherited From: [\YooKassa\Model\Receipt\Supplier](../classes/YooKassa-Model-Receipt-Supplier.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | inn | ИНН пользователя (10 или 12 цифр) | **Returns:** self - #### public setName() : self ```php public setName(null|string $name = null) : self ``` **Summary** Устанавливает наименование поставщика. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Supplier](../classes/YooKassa-Model-Receipt-Supplier.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | name | Наименование поставщика | **Returns:** self - #### public setPhone() : self ```php public setPhone(null|string $phone = null) : self ``` **Summary** Устанавливает Телефон пользователя. Указывается в формате ITU-T E.164. **Details:** * Inherited From: [\YooKassa\Model\Receipt\Supplier](../classes/YooKassa-Model-Receipt-Supplier.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | phone | Номер телефона пользователя в формате ITU-T E.164 | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md000064400000141205150364342670024554 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Receipts\CreatePostReceiptRequest ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Класс объекта запроса к API на создание чека. --- ### Examples Пример использования билдера ```php try { $receiptBuilder = \YooKassa\Request\Receipts\CreatePostReceiptRequest::builder(); $receiptBuilder->setType(\YooKassa\Model\Receipt\ReceiptType::PAYMENT) ->setObjectId('24b94598-000f-5000-9000-1b68e7b15f3f', \YooKassa\Model\Receipt\ReceiptType::PAYMENT) // payment_id ->setCustomer([ 'email' => 'john.doe@merchant.com', 'phone' => '71111111111', ]) ->setItems([ [ 'description' => 'Платок Gucci', 'quantity' => '1.00', 'amount' => [ 'value' => '3000.00', 'currency' => 'RUB', ], 'vat_code' => 2, 'payment_mode' => 'full_payment', 'payment_subject' => 'commodity', ], ]) ->addSettlement([ [ 'type' => 'prepayment', 'amount' => [ 'value' => 100.00, 'currency' => 'RUB', ], ], ]) ->setSend(true) ; // Создаем объект запроса $request = $receiptBuilder->build(); // Можно изменить данные, если нужно $request->setOnBehalfOf('159753'); $request->getitems()->add(new \YooKassa\Model\Receipt\ReceiptItem([ 'description' => 'Платок Gucci Новый', 'quantity' => '1.00', 'amount' => [ 'value' => '3500.00', 'currency' => 'RUB', ], 'vat_code' => 2, 'payment_mode' => 'full_payment', 'payment_subject' => 'commodity', ])); $idempotenceKey = uniqid('', true); $response = $client->createReceipt($request, $idempotenceKey); } catch (Exception $e) { $response = $e; } var_dump($response); ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$additional_user_props](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_additional_user_props) | | Дополнительный реквизит пользователя. | | public | [$additionalUserProps](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_additionalUserProps) | | Дополнительный реквизит пользователя. | | public | [$customer](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_customer) | | Информация о плательщике | | public | [$items](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_items) | | Список товаров в заказе. Для чеков по 54-ФЗ можно передать не более 100 товаров, для чеков самозанятых — не более шести. | | public | [$object_id](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_object_id) | | Идентификатор объекта оплаты | | public | [$object_type](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_object_type) | | Тип объекта: приход "payment" или возврат "refund". | | public | [$objectId](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_objectId) | | Идентификатор объекта оплаты | | public | [$objectType](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_objectType) | | Тип объекта: приход "payment" или возврат "refund". | | public | [$on_behalf_of](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_on_behalf_of) | | Идентификатор магазина в ЮKassa. | | public | [$onBehalfOf](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_onBehalfOf) | | Идентификатор магазина в ЮKassa. | | public | [$receipt_industry_details](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_receipt_industry_details) | | Отраслевой реквизит предмета расчета. | | public | [$receipt_operational_details](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_receipt_operational_details) | | Операционный реквизит чека. | | public | [$receiptIndustryDetails](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_receiptIndustryDetails) | | Отраслевой реквизит предмета расчета. | | public | [$receiptOperationalDetails](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_receiptOperationalDetails) | | Операционный реквизит чека. | | public | [$send](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_send) | | Формирование чека в онлайн-кассе сразу после создания объекта чека. Сейчас можно передать только значение ~`true`. | | public | [$settlements](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_settlements) | | Список платежей | | public | [$tax_system_code](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_tax_system_code) | | Система налогообложения магазина (тег в 54 ФЗ — 1055). | | public | [$taxSystemCode](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_taxSystemCode) | | Система налогообложения магазина (тег в 54 ФЗ — 1055). | | public | [$type](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#property_type) | | Тип чека в онлайн-кассе: приход "payment" или возврат "refund". | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [builder()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_builder) | | Возвращает билдер объектов запросов создания платежа. | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAdditionalUserProps()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_getAdditionalUserProps) | | Возвращает дополнительный реквизит пользователя. | | public | [getCustomer()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_getCustomer) | | Возвращает информацию о плательщике. | | public | [getItems()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_getItems) | | Возвращает список позиций в текущем чеке. | | public | [getLastValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_getLastValidationError) | | Возвращает последнюю ошибку валидации. | | public | [getObjectId()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_getObjectId) | | Возвращает Id объекта чека. | | public | [getObjectType()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_getObjectType) | | Возвращает тип объекта чека. | | public | [getOnBehalfOf()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_getOnBehalfOf) | | Возвращает идентификатор магазина, от имени которого нужно отправить чек. | | public | [getReceiptIndustryDetails()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_getReceiptIndustryDetails) | | Возвращает отраслевой реквизит чека. | | public | [getReceiptOperationalDetails()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_getReceiptOperationalDetails) | | Возвращает операционный реквизит чека. | | public | [getSend()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_getSend) | | Возвращает признак отложенной отправки чека. | | public | [getSettlements()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_getSettlements) | | Возвращает массив оплат, обеспечивающих выдачу товара. | | public | [getTaxSystemCode()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_getTaxSystemCode) | | Возвращает код системы налогообложения. | | public | [getType()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_getType) | | Возвращает тип чека в онлайн-кассе. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [hasCustomer()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_hasCustomer) | | Проверяет наличие данных о плательщике. | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [notEmpty()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_notEmpty) | | Проверяет есть ли в чеке хотя бы одна позиция товаров и оплат | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAdditionalUserProps()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_setAdditionalUserProps) | | Устанавливает дополнительный реквизит пользователя. | | public | [setCustomer()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_setCustomer) | | Устанавливает информацию о плательщике. | | public | [setItems()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_setItems) | | Устанавливает список позиций в чеке. | | public | [setObjectId()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_setObjectId) | | Устанавливает Id объекта чека. | | public | [setObjectType()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_setObjectType) | | Устанавливает тип объекта чека. | | public | [setOnBehalfOf()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_setOnBehalfOf) | | Устанавливает идентификатор магазина, от имени которого нужно отправить чек. | | public | [setReceiptIndustryDetails()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_setReceiptIndustryDetails) | | Устанавливает отраслевой реквизит чека. | | public | [setReceiptOperationalDetails()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_setReceiptOperationalDetails) | | Устанавливает операционный реквизит чека. | | public | [setSend()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_setSend) | | Устанавливает признак отложенной отправки чека. | | public | [setSettlements()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_setSettlements) | | Устанавливает массив оплат, обеспечивающих выдачу товара. | | public | [setTaxSystemCode()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_setTaxSystemCode) | | Устанавливает код системы налогообложения. | | public | [setType()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_setType) | | Устанавливает тип чека в онлайн-кассе. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | public | [validate()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_validate) | | Валидирует текущий запрос, проверяет все ли нужные свойства установлены. | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [setValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_setValidationError) | | Устанавливает ошибку валидации. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Receipts/CreatePostReceiptRequest.php](../../lib/Request/Receipts/CreatePostReceiptRequest.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) * \YooKassa\Request\Receipts\CreatePostReceiptRequest * Implements: * [\YooKassa\Request\Receipts\CreatePostReceiptRequestInterface](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequestInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $additional_user_props : \YooKassa\Model\Receipt\AdditionalUserProps --- ***Description*** Дополнительный реквизит пользователя. **Type:** AdditionalUserProps **Details:** #### public $additionalUserProps : \YooKassa\Model\Receipt\AdditionalUserProps --- ***Description*** Дополнительный реквизит пользователя. **Type:** AdditionalUserProps **Details:** #### public $customer : \YooKassa\Model\Receipt\ReceiptCustomer --- ***Description*** Информация о плательщике **Type:** ReceiptCustomer **Details:** #### public $items : array --- ***Description*** Список товаров в заказе. Для чеков по 54-ФЗ можно передать не более 100 товаров, для чеков самозанятых — не более шести. **Type:** array **Details:** #### public $object_id : string --- ***Description*** Идентификатор объекта оплаты **Type:** string **Details:** #### public $object_type : string --- ***Description*** Тип объекта: приход "payment" или возврат "refund". **Type:** string **Details:** #### public $objectId : string --- ***Description*** Идентификатор объекта оплаты **Type:** string **Details:** #### public $objectType : string --- ***Description*** Тип объекта: приход "payment" или возврат "refund". **Type:** string **Details:** #### public $on_behalf_of : string --- ***Description*** Идентификатор магазина в ЮKassa. **Type:** string **Details:** #### public $onBehalfOf : string --- ***Description*** Идентификатор магазина в ЮKassa. **Type:** string **Details:** #### public $receipt_industry_details : array --- ***Description*** Отраслевой реквизит предмета расчета. **Type:** array **Details:** #### public $receipt_operational_details : \YooKassa\Model\Receipt\OperationalDetails --- ***Description*** Операционный реквизит чека. **Type:** OperationalDetails **Details:** #### public $receiptIndustryDetails : array --- ***Description*** Отраслевой реквизит предмета расчета. **Type:** array **Details:** #### public $receiptOperationalDetails : \YooKassa\Model\Receipt\OperationalDetails --- ***Description*** Операционный реквизит чека. **Type:** OperationalDetails **Details:** #### public $send : bool --- ***Description*** Формирование чека в онлайн-кассе сразу после создания объекта чека. Сейчас можно передать только значение ~`true`. **Type:** bool **Details:** #### public $settlements : array --- ***Description*** Список платежей **Type:** array **Details:** #### public $tax_system_code : int --- ***Description*** Система налогообложения магазина (тег в 54 ФЗ — 1055). **Type:** int **Details:** #### public $taxSystemCode : int --- ***Description*** Система налогообложения магазина (тег в 54 ФЗ — 1055). **Type:** int **Details:** #### public $type : string --- ***Description*** Тип чека в онлайн-кассе: приход "payment" или возврат "refund". **Type:** string **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public builder() : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder ```php Static public builder() : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder ``` **Summary** Возвращает билдер объектов запросов создания платежа. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder - Инстанс билдера объектов запросов #### public clearValidationError() : void ```php public clearValidationError() : void ``` **Summary** Очищает статус валидации текущего запроса. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAdditionalUserProps() : \YooKassa\Model\Receipt\AdditionalUserProps|null ```php public getAdditionalUserProps() : \YooKassa\Model\Receipt\AdditionalUserProps|null ``` **Summary** Возвращает дополнительный реквизит пользователя. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** \YooKassa\Model\Receipt\AdditionalUserProps|null - Дополнительный реквизит пользователя #### public getCustomer() : \YooKassa\Model\Receipt\ReceiptCustomerInterface|null ```php public getCustomer() : \YooKassa\Model\Receipt\ReceiptCustomerInterface|null ``` **Summary** Возвращает информацию о плательщике. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** \YooKassa\Model\Receipt\ReceiptCustomerInterface|null - Информация о плательщике #### public getItems() : \YooKassa\Model\Receipt\ReceiptItemInterface[]|\YooKassa\Common\ListObjectInterface ```php public getItems() : \YooKassa\Model\Receipt\ReceiptItemInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает список позиций в текущем чеке. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** \YooKassa\Model\Receipt\ReceiptItemInterface[]|\YooKassa\Common\ListObjectInterface - Список товаров в заказе #### public getLastValidationError() : string|null ```php public getLastValidationError() : string|null ``` **Summary** Возвращает последнюю ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string|null - Последняя произошедшая ошибка валидации #### public getObjectId() : string|null ```php public getObjectId() : string|null ``` **Summary** Возвращает Id объекта чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** string|null - Id объекта чека #### public getObjectType() : string|null ```php public getObjectType() : string|null ``` **Summary** Возвращает тип объекта чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** string|null - Тип объекта чека #### public getOnBehalfOf() : string|null ```php public getOnBehalfOf() : string|null ``` **Summary** Возвращает идентификатор магазина, от имени которого нужно отправить чек. **Description** Выдается ЮKassa, отображается в разделе Продавцы личного кабинета (столбец shopId). Необходимо передавать, если вы используете решение ЮKassa для платформ. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** string|null - #### public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ```php public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** \YooKassa\Model\Receipt\IndustryDetails[]|\YooKassa\Common\ListObjectInterface - Отраслевой реквизит чека #### public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails|null ```php public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails|null ``` **Summary** Возвращает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** \YooKassa\Model\Receipt\OperationalDetails|null - Операционный реквизит чека #### public getSend() : bool ```php public getSend() : bool ``` **Summary** Возвращает признак отложенной отправки чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** bool - Признак отложенной отправки чека #### public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSettlements() : \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** \YooKassa\Model\Receipt\SettlementInterface[]|\YooKassa\Common\ListObjectInterface - Массив оплат, обеспечивающих выдачу товара #### public getTaxSystemCode() : int|null ```php public getTaxSystemCode() : int|null ``` **Summary** Возвращает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** int|null - Код системы налогообложения. Число 1-6. #### public getType() : string|null ```php public getType() : string|null ``` **Summary** Возвращает тип чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** string|null - Тип чека в онлайн-кассе: приход "payment" или возврат "refund" #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public hasCustomer() : bool ```php public hasCustomer() : bool ``` **Summary** Проверяет наличие данных о плательщике. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** bool - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public notEmpty() : bool ```php public notEmpty() : bool ``` **Summary** Проверяет есть ли в чеке хотя бы одна позиция товаров и оплат **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** bool - True если чек не пуст, false если в чеке нет ни одной позиции #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAdditionalUserProps() : self ```php public setAdditionalUserProps(null|\YooKassa\Model\Receipt\AdditionalUserProps|array $additional_user_props = null) : self ``` **Summary** Устанавливает дополнительный реквизит пользователя. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR \YooKassa\Model\Receipt\AdditionalUserProps OR array | additional_user_props | Дополнительный реквизит пользователя | **Returns:** self - #### public setCustomer() : self ```php public setCustomer(array|\YooKassa\Model\Receipt\ReceiptCustomerInterface $customer = null) : self ``` **Summary** Устанавливает информацию о плательщике. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\ReceiptCustomerInterface | customer | Информация о плательщике | **Returns:** self - #### public setItems() : self ```php public setItems(array|\YooKassa\Common\ListObjectInterface $items = null) : self ``` **Summary** Устанавливает список позиций в чеке. **Description** Если до этого в чеке уже были установлены значения, они удаляются и полностью заменяются переданным списком позиций. Все передаваемые значения в массиве позиций должны быть объектами класса, реализующего интерфейс ReceiptItemInterface, в противном случае будет выброшено исключение InvalidPropertyValueTypeException. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Common\ListObjectInterface | items | Список товаров в заказе | **Returns:** self - #### public setObjectId() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public setObjectId(string|null $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Устанавливает Id объекта чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Id объекта чека | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - #### public setObjectType() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public setObjectType(string|null $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Устанавливает тип объекта чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | value | Тип объекта чека | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - #### public setOnBehalfOf() : self ```php public setOnBehalfOf(string|null $on_behalf_of = null) : self ``` **Summary** Устанавливает идентификатор магазина, от имени которого нужно отправить чек. **Description** Выдается ЮKassa, отображается в разделе Продавцы личного кабинета (столбец shopId). Необходимо передавать, если вы используете решение ЮKassa для платформ. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | on_behalf_of | | **Returns:** self - #### public setReceiptIndustryDetails() : self ```php public setReceiptIndustryDetails(null|array|\YooKassa\Common\ListObjectInterface $receipt_industry_details = null) : self ``` **Summary** Устанавливает отраслевой реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Common\ListObjectInterface | receipt_industry_details | Отраслевой реквизит чека | **Returns:** self - #### public setReceiptOperationalDetails() : self ```php public setReceiptOperationalDetails(array|\YooKassa\Model\Receipt\OperationalDetails|null $receipt_operational_details = null) : self ``` **Summary** Устанавливает операционный реквизит чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\OperationalDetails OR null | receipt_operational_details | Операционный реквизит чека | **Returns:** self - #### public setSend() : self ```php public setSend(bool $send = null) : self ``` **Summary** Устанавливает признак отложенной отправки чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | send | Признак отложенной отправки чека | **Returns:** self - #### public setSettlements() : self ```php public setSettlements(array|\YooKassa\Common\ListObjectInterface|null $settlements = null) : self ``` **Summary** Устанавливает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Common\ListObjectInterface OR null | settlements | Массив оплат, обеспечивающих выдачу товара | **Returns:** self - #### public setTaxSystemCode() : self ```php public setTaxSystemCode(int|null $tax_system_code = null) : self ``` **Summary** Устанавливает код системы налогообложения. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int OR null | tax_system_code | Код системы налогообложения. Число 1-6 | **Returns:** self - #### public setType() : self ```php public setType(string|null $type = null) : self ``` **Summary** Устанавливает тип чека в онлайн-кассе. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | type | тип чека в онлайн-кассе: приход "payment" или возврат "refund" | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public validate() : bool ```php public validate() : bool ``` **Summary** Валидирует текущий запрос, проверяет все ли нужные свойства установлены. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** bool - True если запрос валиден, false если нет #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected setValidationError() : void ```php protected setValidationError(string $value) : void ``` **Summary** Устанавливает ошибку валидации. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** void - #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-Refunds-RefundResponse.md000064400000114450150364342670022412 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Refunds\RefundResponse ### Namespace: [\YooKassa\Request\Refunds](../namespaces/yookassa-request-refunds.md) --- **Summary:** Класс, представляющий модель RefundResponse. **Description:** Класс объекта ответа от API при запросе одного конкретного возврата. --- ### Constants | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [MAX_LENGTH_DESCRIPTION](../classes/YooKassa-Model-Refund-Refund.md#constant_MAX_LENGTH_DESCRIPTION) | | Максимальная длина строки описания возврата | --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$amount](../classes/YooKassa-Model-Refund-Refund.md#property_amount) | | Сумма возврата | | public | [$cancellation_details](../classes/YooKassa-Model-Refund-Refund.md#property_cancellation_details) | | Комментарий к статусу `canceled` | | public | [$cancellationDetails](../classes/YooKassa-Model-Refund-Refund.md#property_cancellationDetails) | | Комментарий к статусу `canceled` | | public | [$created_at](../classes/YooKassa-Model-Refund-Refund.md#property_created_at) | | Время создания возврата | | public | [$createdAt](../classes/YooKassa-Model-Refund-Refund.md#property_createdAt) | | Время создания возврата | | public | [$deal](../classes/YooKassa-Model-Refund-Refund.md#property_deal) | | Данные о сделке, в составе которой проходит возврат | | public | [$description](../classes/YooKassa-Model-Refund-Refund.md#property_description) | | Комментарий, основание для возврата средств покупателю | | public | [$id](../classes/YooKassa-Model-Refund-Refund.md#property_id) | | Идентификатор возврата платежа | | public | [$payment_id](../classes/YooKassa-Model-Refund-Refund.md#property_payment_id) | | Идентификатор платежа | | public | [$paymentId](../classes/YooKassa-Model-Refund-Refund.md#property_paymentId) | | Идентификатор платежа | | public | [$receipt_registration](../classes/YooKassa-Model-Refund-Refund.md#property_receipt_registration) | | Статус регистрации чека | | public | [$receiptRegistration](../classes/YooKassa-Model-Refund-Refund.md#property_receiptRegistration) | | Статус регистрации чека | | public | [$sources](../classes/YooKassa-Model-Refund-Refund.md#property_sources) | | Данные о том, с какого магазина и какую сумму нужно удержать для проведения возврата | | public | [$status](../classes/YooKassa-Model-Refund-Refund.md#property_status) | | Статус возврата | | protected | [$_amount](../classes/YooKassa-Model-Refund-Refund.md#property__amount) | | | | protected | [$_cancellation_details](../classes/YooKassa-Model-Refund-Refund.md#property__cancellation_details) | | | | protected | [$_created_at](../classes/YooKassa-Model-Refund-Refund.md#property__created_at) | | | | protected | [$_deal](../classes/YooKassa-Model-Refund-Refund.md#property__deal) | | | | protected | [$_description](../classes/YooKassa-Model-Refund-Refund.md#property__description) | | | | protected | [$_id](../classes/YooKassa-Model-Refund-Refund.md#property__id) | | | | protected | [$_payment_id](../classes/YooKassa-Model-Refund-Refund.md#property__payment_id) | | | | protected | [$_receipt_registration](../classes/YooKassa-Model-Refund-Refund.md#property__receipt_registration) | | | | protected | [$_sources](../classes/YooKassa-Model-Refund-Refund.md#property__sources) | | | | protected | [$_status](../classes/YooKassa-Model-Refund-Refund.md#property__status) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractObject.md#method___construct) | | AbstractObject constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getAmount()](../classes/YooKassa-Model-Refund-Refund.md#method_getAmount) | | Возвращает сумму возврата. | | public | [getCancellationDetails()](../classes/YooKassa-Model-Refund-Refund.md#method_getCancellationDetails) | | Возвращает cancellation_details. | | public | [getCreatedAt()](../classes/YooKassa-Model-Refund-Refund.md#method_getCreatedAt) | | Возвращает дату создания возврата. | | public | [getDeal()](../classes/YooKassa-Model-Refund-Refund.md#method_getDeal) | | Возвращает данные о сделке, в составе которой проходит возврат | | public | [getDescription()](../classes/YooKassa-Model-Refund-Refund.md#method_getDescription) | | Возвращает комментарий к возврату. | | public | [getId()](../classes/YooKassa-Model-Refund-Refund.md#method_getId) | | Возвращает идентификатор возврата платежа. | | public | [getPaymentId()](../classes/YooKassa-Model-Refund-Refund.md#method_getPaymentId) | | Возвращает идентификатор платежа. | | public | [getReceiptRegistration()](../classes/YooKassa-Model-Refund-Refund.md#method_getReceiptRegistration) | | Возвращает статус регистрации чека. | | public | [getSources()](../classes/YooKassa-Model-Refund-Refund.md#method_getSources) | | Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. | | public | [getStatus()](../classes/YooKassa-Model-Refund-Refund.md#method_getStatus) | | Возвращает статус текущего возврата. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setAmount()](../classes/YooKassa-Model-Refund-Refund.md#method_setAmount) | | Устанавливает сумму возврата. | | public | [setCancellationDetails()](../classes/YooKassa-Model-Refund-Refund.md#method_setCancellationDetails) | | Устанавливает cancellation_details. | | public | [setCreatedAt()](../classes/YooKassa-Model-Refund-Refund.md#method_setCreatedAt) | | Устанавливает время создания возврата. | | public | [setDeal()](../classes/YooKassa-Model-Refund-Refund.md#method_setDeal) | | Устанавливает данные о сделке, в составе которой проходит возврат. | | public | [setDescription()](../classes/YooKassa-Model-Refund-Refund.md#method_setDescription) | | Устанавливает комментарий к возврату. | | public | [setId()](../classes/YooKassa-Model-Refund-Refund.md#method_setId) | | Устанавливает идентификатор возврата. | | public | [setPaymentId()](../classes/YooKassa-Model-Refund-Refund.md#method_setPaymentId) | | Устанавливает идентификатор платежа. | | public | [setReceiptRegistration()](../classes/YooKassa-Model-Refund-Refund.md#method_setReceiptRegistration) | | Устанавливает статус регистрации чека. | | public | [setSources()](../classes/YooKassa-Model-Refund-Refund.md#method_setSources) | | Устанавливает sources (массив распределения денег между магазинами). | | public | [setStatus()](../classes/YooKassa-Model-Refund-Refund.md#method_setStatus) | | Устанавливает статус возврата платежа. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Request/Refunds/RefundResponse.php](../../lib/Request/Refunds/RefundResponse.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) * [\YooKassa\Request\Refunds\AbstractRefundResponse](../classes/YooKassa-Request-Refunds-AbstractRefundResponse.md) * \YooKassa\Request\Refunds\RefundResponse * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Constants ###### MAX_LENGTH_DESCRIPTION Inherited from [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) Максимальная длина строки описания возврата ```php MAX_LENGTH_DESCRIPTION = 250 ``` --- ## Properties #### public $amount : \YooKassa\Model\AmountInterface --- ***Description*** Сумма возврата **Type:** AmountInterface **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $cancellation_details : \YooKassa\Model\Refund\RefundCancellationDetails --- ***Description*** Комментарий к статусу `canceled` **Type:** RefundCancellationDetails **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $cancellationDetails : \YooKassa\Model\Refund\RefundCancellationDetails --- ***Description*** Комментарий к статусу `canceled` **Type:** RefundCancellationDetails **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $created_at : \DateTime --- ***Description*** Время создания возврата **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $createdAt : \DateTime --- ***Description*** Время создания возврата **Type:** \DateTime **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $deal : \YooKassa\Model\Deal\RefundDealInfo --- ***Description*** Данные о сделке, в составе которой проходит возврат **Type:** RefundDealInfo **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $description : string --- ***Description*** Комментарий, основание для возврата средств покупателю **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $id : string --- ***Description*** Идентификатор возврата платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $payment_id : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $paymentId : string --- ***Description*** Идентификатор платежа **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $receipt_registration : string --- ***Description*** Статус регистрации чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $receiptRegistration : string --- ***Description*** Статус регистрации чека **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $sources : \YooKassa\Common\ListObjectInterface|\YooKassa\Model\Refund\SourceInterface[] --- ***Description*** Данные о том, с какого магазина и какую сумму нужно удержать для проведения возврата **Type:** SourceInterface[] **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### public $status : string --- ***Description*** Статус возврата **Type:** string **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_amount : ?\YooKassa\Model\AmountInterface --- **Type:** AmountInterface Сумма возврата **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_cancellation_details : ?\YooKassa\Model\CancellationDetailsInterface --- **Type:** CancellationDetailsInterface Комментарий к статусу `canceled` **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_created_at : ?\DateTime --- **Type:** DateTime Время создания возврата **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_deal : ?\YooKassa\Model\Deal\RefundDealInfo --- **Type:** RefundDealInfo Данные о сделке, в составе которой проходит возврат **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_description : ?string --- **Type:** ?string Комментарий, основание для возврата средств покупателю **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_id : ?string --- **Type:** ?string Идентификатор возврата платежа **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_payment_id : ?string --- **Type:** ?string Идентификатор платежа **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_receipt_registration : ?string --- **Type:** ?string Статус регистрации чека **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_sources : ?\YooKassa\Common\ListObject --- **Type:** ListObject Данные о распределении денег — сколько и в какой магазин нужно перевести **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) #### protected $_status : ?string --- **Type:** ?string Статус возврата **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) --- ## Methods #### public __construct() : mixed ```php public __construct(array|null $data = []) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR null | data | | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getAmount() : \YooKassa\Model\AmountInterface|null ```php public getAmount() : \YooKassa\Model\AmountInterface|null ``` **Summary** Возвращает сумму возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \YooKassa\Model\AmountInterface|null - Сумма возврата #### public getCancellationDetails() : \YooKassa\Model\CancellationDetailsInterface|null ```php public getCancellationDetails() : \YooKassa\Model\CancellationDetailsInterface|null ``` **Summary** Возвращает cancellation_details. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \YooKassa\Model\CancellationDetailsInterface|null - #### public getCreatedAt() : \DateTime|null ```php public getCreatedAt() : \DateTime|null ``` **Summary** Возвращает дату создания возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \DateTime|null - Время создания возврата #### public getDeal() : null|\YooKassa\Model\Deal\RefundDealInfo ```php public getDeal() : null|\YooKassa\Model\Deal\RefundDealInfo ``` **Summary** Возвращает данные о сделке, в составе которой проходит возврат **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** null|\YooKassa\Model\Deal\RefundDealInfo - Данные о сделке, в составе которой проходит возврат #### public getDescription() : string|null ```php public getDescription() : string|null ``` **Summary** Возвращает комментарий к возврату. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Комментарий, основание для возврата средств покупателю #### public getId() : string|null ```php public getId() : string|null ``` **Summary** Возвращает идентификатор возврата платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Идентификатор возврата #### public getPaymentId() : string|null ```php public getPaymentId() : string|null ``` **Summary** Возвращает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Идентификатор платежа #### public getReceiptRegistration() : string|null ```php public getReceiptRegistration() : string|null ``` **Summary** Возвращает статус регистрации чека. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Статус регистрации чека #### public getSources() : \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface ```php public getSources() : \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface ``` **Summary** Возвращает информацию о распределении денег — сколько и в какой магазин нужно перевести. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** \YooKassa\Model\Refund\SourceInterface[]|\YooKassa\Common\ListObjectInterface - #### public getStatus() : string|null ```php public getStatus() : string|null ``` **Summary** Возвращает статус текущего возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) **Returns:** string|null - Статус возврата #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setAmount() : self ```php public setAmount(\YooKassa\Model\AmountInterface|array|null $amount = null) : self ``` **Summary** Устанавливает сумму возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\AmountInterface OR array OR null | amount | Сумма возврата | **Returns:** self - #### public setCancellationDetails() : self ```php public setCancellationDetails(\YooKassa\Model\CancellationDetailsInterface|array|null $cancellation_details = null) : self ``` **Summary** Устанавливает cancellation_details. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\CancellationDetailsInterface OR array OR null | cancellation_details | | **Returns:** self - #### public setCreatedAt() : self ```php public setCreatedAt(\DateTime|string|null $created_at = null) : self ``` **Summary** Устанавливает время создания возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \DateTime OR string OR null | created_at | Время создания возврата | **Returns:** self - #### public setDeal() : self ```php public setDeal(\YooKassa\Model\Deal\RefundDealInfo|array|null $deal = null) : self ``` **Summary** Устанавливает данные о сделке, в составе которой проходит возврат. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Deal\RefundDealInfo OR array OR null | deal | Данные о сделке, в составе которой проходит возврат | **Returns:** self - #### public setDescription() : self ```php public setDescription(string|null $description = null) : self ``` **Summary** Устанавливает комментарий к возврату. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | description | Комментарий, основание для возврата средств покупателю | **Returns:** self - #### public setId() : self ```php public setId(string|null $id = null) : self ``` **Summary** Устанавливает идентификатор возврата. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | id | Идентификатор возврата | **Returns:** self - #### public setPaymentId() : self ```php public setPaymentId(string|null $payment_id = null) : self ``` **Summary** Устанавливает идентификатор платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | payment_id | Идентификатор платежа | **Returns:** self - #### public setReceiptRegistration() : self ```php public setReceiptRegistration(string|null $receipt_registration = null) : self ``` **Summary** Устанавливает статус регистрации чека. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | receipt_registration | Статус регистрации чека | **Returns:** self - #### public setSources() : self ```php public setSources(\YooKassa\Common\ListObjectInterface|array|null $sources = null) : self ``` **Summary** Устанавливает sources (массив распределения денег между магазинами). **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Common\ListObjectInterface OR array OR null | sources | | **Returns:** self - #### public setStatus() : self ```php public setStatus(string|null $status = null) : self ``` **Summary** Устанавливает статус возврата платежа. **Details:** * Inherited From: [\YooKassa\Model\Refund\Refund](../classes/YooKassa-Model-Refund-Refund.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | status | Статус возврата платежа | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Common-Exceptions-ApiConnectionException.md000064400000007266150364342670024401 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Common\Exceptions\ApiConnectionException ### Namespace: [\YooKassa\Common\Exceptions](../namespaces/yookassa-common-exceptions.md) --- **Summary:** Неожиданный код ошибки. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$responseBody](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseBody) | | | | protected | [$responseHeaders](../classes/YooKassa-Common-Exceptions-ApiException.md#property_responseHeaders) | | | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-Exceptions-ApiException.md#method___construct) | | Constructor. | | public | [getResponseBody()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseBody) | | | | public | [getResponseHeaders()](../classes/YooKassa-Common-Exceptions-ApiException.md#method_getResponseHeaders) | | | --- ### Details * File: [lib/Common/Exceptions/ApiConnectionException.php](../../lib/Common/Exceptions/ApiConnectionException.php) * Package: Default * Class Hierarchy: * [\Exception](\Exception) * [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) * \YooKassa\Common\Exceptions\ApiConnectionException --- ## Properties #### protected $responseBody : ?string --- **Type:** ?string **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) #### protected $responseHeaders : array --- **Type:** array **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) --- ## Methods #### public __construct() : mixed ```php public __construct(string $message = '', int $code, string[] $responseHeaders = [], string|null $responseBody = '') : mixed ``` **Summary** Constructor. **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | message | Error message | | int | code | HTTP status code | | string[] | responseHeaders | HTTP header | | string OR null | responseBody | HTTP body | **Returns:** mixed - #### public getResponseBody() : ?string ```php public getResponseBody() : ?string ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** ?string - #### public getResponseHeaders() : string[] ```php public getResponseHeaders() : string[] ``` **Details:** * Inherited From: [\YooKassa\Common\Exceptions\ApiException](../classes/YooKassa-Common-Exceptions-ApiException.md) **Returns:** string[] - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Deal-DealBalanceAmount.md000064400000037242150364342670021621 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Model\Deal\DealBalanceAmount ### Namespace: [\YooKassa\Model\Deal](../namespaces/yookassa-model-deal.md) --- **Summary:** Класс, представляющий модель DealBalanceAmount. **Description:** Баланс сделки. --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [$currency](../classes/YooKassa-Model-Deal-DealBalanceAmount.md#property_currency) | | Трехбуквенный код валюты в формате ISO-4217. Пример: RUB. | | public | [$value](../classes/YooKassa-Model-Deal-DealBalanceAmount.md#property_value) | | Сумма в выбранной валюте. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Model-Deal-DealBalanceAmount.md#method___construct) | | MonetaryAmount constructor. | | public | [__get()](../classes/YooKassa-Common-AbstractObject.md#method___get) | | Возвращает значение свойства. | | public | [__isset()](../classes/YooKassa-Common-AbstractObject.md#method___isset) | | Проверяет наличие свойства. | | public | [__set()](../classes/YooKassa-Common-AbstractObject.md#method___set) | | Устанавливает значение свойства. | | public | [__unset()](../classes/YooKassa-Common-AbstractObject.md#method___unset) | | Удаляет свойство. | | public | [fromArray()](../classes/YooKassa-Common-AbstractObject.md#method_fromArray) | | Устанавливает значения свойств текущего объекта из массива. | | public | [getCurrency()](../classes/YooKassa-Model-Deal-DealBalanceAmount.md#method_getCurrency) | | Возвращает валюту. | | public | [getIntegerValue()](../classes/YooKassa-Model-Deal-DealBalanceAmount.md#method_getIntegerValue) | | Возвращает сумму в копейках в виде целого числа. | | public | [getValidator()](../classes/YooKassa-Common-AbstractObject.md#method_getValidator) | | | | public | [getValue()](../classes/YooKassa-Model-Deal-DealBalanceAmount.md#method_getValue) | | Возвращает значение суммы. | | public | [jsonSerialize()](../classes/YooKassa-Model-Deal-DealBalanceAmount.md#method_jsonSerialize) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. | | public | [offsetExists()](../classes/YooKassa-Common-AbstractObject.md#method_offsetExists) | | Проверяет наличие свойства. | | public | [offsetGet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetGet) | | Возвращает значение свойства. | | public | [offsetSet()](../classes/YooKassa-Common-AbstractObject.md#method_offsetSet) | | Устанавливает значение свойства. | | public | [offsetUnset()](../classes/YooKassa-Common-AbstractObject.md#method_offsetUnset) | | Удаляет свойство. | | public | [setCurrency()](../classes/YooKassa-Model-Deal-DealBalanceAmount.md#method_setCurrency) | | Устанавливает код валюты. | | public | [setValue()](../classes/YooKassa-Model-Deal-DealBalanceAmount.md#method_setValue) | | Устанавливает сумму. | | public | [toArray()](../classes/YooKassa-Common-AbstractObject.md#method_toArray) | | Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). | | protected | [getUnknownProperties()](../classes/YooKassa-Common-AbstractObject.md#method_getUnknownProperties) | | Возвращает массив свойств которые не существуют, но были заданы у объекта. | | protected | [validatePropertyValue()](../classes/YooKassa-Common-AbstractObject.md#method_validatePropertyValue) | | | --- ### Details * File: [lib/Model/Deal/DealBalanceAmount.php](../../lib/Model/Deal/DealBalanceAmount.php) * Package: YooKassa\Model * Class Hierarchy: * [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) * \YooKassa\Model\Deal\DealBalanceAmount * Implements: * [\YooKassa\Model\AmountInterface](../classes/YooKassa-Model-AmountInterface.md) * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### public $currency : string --- ***Description*** Трехбуквенный код валюты в формате ISO-4217. Пример: RUB. **Type:** string **Details:** #### public $value : int --- ***Description*** Сумма в выбранной валюте. **Type:** int **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct(null|array|\YooKassa\Model\Deal\numeric $value = null, null|string $currency = null) : mixed ``` **Summary** MonetaryAmount constructor. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealBalanceAmount](../classes/YooKassa-Model-Deal-DealBalanceAmount.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Deal\numeric | value | Сумма | | null OR string | currency | Код валюты | **Returns:** mixed - #### public __get() : mixed ```php public __get(string $propertyName) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | **Returns:** mixed - Значение свойства #### public __isset() : bool ```php public __isset(string $propertyName) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public __set() : void ```php public __set(string $propertyName, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public __unset() : void ```php public __unset(string $propertyName) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** void - #### public fromArray() : void ```php public fromArray(array|\Traversable $sourceArray) : void ``` **Summary** Устанавливает значения свойств текущего объекта из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** void - #### public getCurrency() : string ```php public getCurrency() : string ``` **Summary** Возвращает валюту. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealBalanceAmount](../classes/YooKassa-Model-Deal-DealBalanceAmount.md) **Returns:** string - Код валюты #### public getIntegerValue() : int ```php public getIntegerValue() : int ``` **Summary** Возвращает сумму в копейках в виде целого числа. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealBalanceAmount](../classes/YooKassa-Model-Deal-DealBalanceAmount.md) **Returns:** int - Сумма в копейках/центах #### public getValidator() : \YooKassa\Validator\Validator ```php public getValidator() : \YooKassa\Validator\Validator ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** \YooKassa\Validator\Validator - #### public getValue() : string ```php public getValue() : string ``` **Summary** Возвращает значение суммы. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealBalanceAmount](../classes/YooKassa-Model-Deal-DealBalanceAmount.md) **Returns:** string - Сумма #### public jsonSerialize() : array ```php public jsonSerialize() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealBalanceAmount](../classes/YooKassa-Model-Deal-DealBalanceAmount.md) **Returns:** array - #### public offsetExists() : bool ```php public offsetExists(string $offset) : bool ``` **Summary** Проверяет наличие свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя проверяемого свойства | **Returns:** bool - True если свойство имеется, false если нет #### public offsetGet() : mixed ```php public offsetGet(string $offset) : mixed ``` **Summary** Возвращает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | **Returns:** mixed - Значение свойства #### public offsetSet() : void ```php public offsetSet(string $offset, mixed $value) : void ``` **Summary** Устанавливает значение свойства. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя свойства | | mixed | value | Значение свойства | **Returns:** void - #### public offsetUnset() : void ```php public offsetUnset(string $offset) : void ``` **Summary** Удаляет свойство. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | offset | Имя удаляемого свойства | **Returns:** void - #### public setCurrency() : self ```php public setCurrency(string|null $currency) : self ``` **Summary** Устанавливает код валюты. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealBalanceAmount](../classes/YooKassa-Model-Deal-DealBalanceAmount.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string OR null | currency | Код валюты | **Returns:** self - #### public setValue() : self ```php public setValue(\YooKassa\Model\Deal\numeric|string $value) : self ``` **Summary** Устанавливает сумму. **Details:** * Inherited From: [\YooKassa\Model\Deal\DealBalanceAmount](../classes/YooKassa-Model-Deal-DealBalanceAmount.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Deal\numeric OR string | value | Сумма | **Returns:** self - #### public toArray() : array ```php public toArray() : array ``` **Summary** Возвращает ассоциативный массив со свойствами текущего объекта для его дальнейшей JSON сериализации Является алиасом метода AbstractObject::jsonSerialize(). **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив со свойствами текущего объекта #### protected getUnknownProperties() : array ```php protected getUnknownProperties() : array ``` **Summary** Возвращает массив свойств которые не существуют, но были заданы у объекта. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** array - Ассоциативный массив с не существующими у текущего объекта свойствами #### protected validatePropertyValue() : mixed ```php protected validatePropertyValue(string $propertyName, mixed $propertyValue) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | | | mixed | propertyValue | | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md000064400000026473150364342670027007 0ustar00# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder ### Namespace: [\YooKassa\Request\PersonalData](../namespaces/yookassa-request-personaldata.md) --- **Summary:** Класс, представляющий модель CreatePersonalDataRequestBuilder. **Description:** Класс билдера объектов запросов к API на создание платежа. --- ### Examples Пример использования билдера ```php try { $personalDataBuilder = \YooKassa\Request\PersonalData\CreatePersonalDataRequest::builder(); $personalDataBuilder ->setType(\YooKassa\Model\PersonalData\PersonalDataType::SBP_PAYOUT_RECIPIENT) ->setFirstName('Иван') ->setLastName('Иванов') ->setMiddleName('Иванович') ->setMetadata(['recipient_id' => '37']) ; // Создаем объект запроса $request = $personalDataBuilder->build(); $idempotenceKey = uniqid('', true); $response = $client->createPersonalData($request, $idempotenceKey); } catch (Exception $e) { $response = $e; } var_dump($response); ``` --- ### Constants * No constants found --- ### Properties | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | protected | [$currentObject](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md#property_currentObject) | | Собираемый объект запроса. | --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [__construct()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method___construct) | | Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. | | public | [build()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md#method_build) | | Строит и возвращает объект запроса для отправки в API ЮKassa. | | public | [setFirstName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md#method_setFirstName) | | Устанавливает имя пользователя. | | public | [setLastName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md#method_setLastName) | | Устанавливает фамилию пользователя. | | public | [setMetadata()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md#method_setMetadata) | | Устанавливает метаданные, привязанные к платежу. | | public | [setMiddleName()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md#method_setMiddleName) | | Устанавливает отчество пользователя. | | public | [setOptions()](../classes/YooKassa-Common-AbstractRequestBuilder.md#method_setOptions) | | Устанавливает свойства запроса из массива. | | public | [setType()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md#method_setType) | | Устанавливает тип персональных данных. | | protected | [initCurrentObject()](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md#method_initCurrentObject) | | Инициализирует объект запроса, который в дальнейшем будет собираться билдером | --- ### Details * File: [lib/Request/PersonalData/CreatePersonalDataRequestBuilder.php](../../lib/Request/PersonalData/CreatePersonalDataRequestBuilder.php) * Package: YooKassa\Request * Class Hierarchy: * [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) * \YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | --- ## Properties #### protected $currentObject : ?\YooKassa\Common\AbstractRequestInterface --- **Summary** Собираемый объект запроса. **Type:** AbstractRequestInterface **Details:** --- ## Methods #### public __construct() : mixed ```php public __construct() : mixed ``` **Summary** Конструктор, инициализирует пустой запрос, который в будущем начнём собирать. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) **Returns:** mixed - #### public build() : \YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface|\YooKassa\Common\AbstractRequestInterface ```php public build(null|array $options = null) : \YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface|\YooKassa\Common\AbstractRequestInterface ``` **Summary** Строит и возвращает объект запроса для отправки в API ЮKassa. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array | options | Массив параметров для установки в объект запроса | **Returns:** \YooKassa\Request\PersonalData\CreatePersonalDataRequestInterface|\YooKassa\Common\AbstractRequestInterface - Инстанс объекта запроса #### public setFirstName() : self ```php public setFirstName(string $value) : self ``` **Summary** Устанавливает имя пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | имя пользователя | **Returns:** self - #### public setLastName() : self ```php public setLastName(string $value) : self ``` **Summary** Устанавливает фамилию пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | фамилия пользователя | **Returns:** self - #### public setMetadata() : \YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder ```php public setMetadata(null|array|\YooKassa\Model\Metadata $value) : \YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder ``` **Summary** Устанавливает метаданные, привязанные к платежу. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR array OR \YooKassa\Model\Metadata | value | Метаданные платежа, устанавливаемые мерчантом | **Returns:** \YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder - Инстанс текущего билдера #### public setMiddleName() : self ```php public setMiddleName(null|string $value) : self ``` **Summary** Устанавливает отчество пользователя. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | null OR string | value | Отчество пользователя | **Returns:** self - #### public setOptions() : \YooKassa\Common\AbstractRequestBuilder ```php public setOptions(iterable|null $options) : \YooKassa\Common\AbstractRequestBuilder ``` **Summary** Устанавливает свойства запроса из массива. **Details:** * Inherited From: [\YooKassa\Common\AbstractRequestBuilder](../classes/YooKassa-Common-AbstractRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | iterable OR null | options | Массив свойств запроса | ##### Throws: | Type | Description | | ---- | ----------- | | \InvalidArgumentException | Выбрасывается если аргумент не массив и не итерируемый объект | | \YooKassa\Common\Exceptions\InvalidPropertyException | Выбрасывается если не удалось установить один из параметров, переданных в массиве настроек | **Returns:** \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов #### public setType() : self ```php public setType(string $value) : self ``` **Summary** Устанавливает тип персональных данных. **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Тип персональных данных | **Returns:** self - Инстанс билдера запросов #### protected initCurrentObject() : \YooKassa\Request\PersonalData\CreatePersonalDataRequest ```php protected initCurrentObject() : \YooKassa\Request\PersonalData\CreatePersonalDataRequest ``` **Summary** Инициализирует объект запроса, который в дальнейшем будет собираться билдером **Details:** * Inherited From: [\YooKassa\Request\PersonalData\CreatePersonalDataRequestBuilder](../classes/YooKassa-Request-PersonalData-CreatePersonalDataRequestBuilder.md) **Returns:** \YooKassa\Request\PersonalData\CreatePersonalDataRequest - Инстанс собираемого объекта запроса к API --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/docs/classes/YooKassa-Model-Payment-RecipientInterface.md000064400000005602150364342670022630 0ustar00# [YooKassa API SDK](../home.md) # Interface: RecipientInterface ### Namespace: [\YooKassa\Model\Payment](../namespaces/yookassa-model-payment.md) --- **Summary:** Интерфейс получателя платежа. **Description:** Получатель платежа нужен, если вы разделяете потоки платежей в рамках одного аккаунта или создаете платеж в адрес другого аккаунта. --- ### Constants * No constants found --- ### Methods | Visibility | Name | Flag | Summary | | ----------:| ---- | ---- | ------- | | public | [getAccountId()](../classes/YooKassa-Model-Payment-RecipientInterface.md#method_getAccountId) | | Возвращает идентификатор магазина. | | public | [getGatewayId()](../classes/YooKassa-Model-Payment-RecipientInterface.md#method_getGatewayId) | | Возвращает идентификатор шлюза. | --- ### Details * File: [lib/Model/Payment/RecipientInterface.php](../../lib/Model/Payment/RecipientInterface.php) * Package: \YooKassa\Model * See Also: * [](https://yookassa.ru/developers/api) --- ### Tags | Tag | Version | Description | | --- | ------- | ----------- | | category | | Class | | author | | cms@yoomoney.ru | | property | | Идентификатор магазина | | property | | Идентификатор магазина | | property | | Идентификатор шлюза | | property | | Идентификатор шлюза | --- ## Methods #### public getAccountId() : string|null ```php public getAccountId() : string|null ``` **Summary** Возвращает идентификатор магазина. **Details:** * Inherited From: [\YooKassa\Model\Payment\RecipientInterface](../classes/YooKassa-Model-Payment-RecipientInterface.md) **Returns:** string|null - Идентификатор магазина #### public getGatewayId() : string|null ```php public getGatewayId() : string|null ``` **Summary** Возвращает идентификатор шлюза. **Description** Идентификатор шлюза используется для разделения потоков платежей в рамках одного аккаунта. **Details:** * Inherited From: [\YooKassa\Model\Payment\RecipientInterface](../classes/YooKassa-Model-Payment-RecipientInterface.md) **Returns:** string|null - Идентификатор шлюза --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 0](../reports/markers.md) * [Deprecated - 15](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-10-17 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoneyyookassa-sdk-php/README.md000064400000022522150364342670011235 0ustar00# YooKassa API PHP Client Library [![Latest Stable Version](https://img.shields.io/packagist/v/yoomoney/yookassa-sdk-php?label=stable)](https://packagist.org/packages/yoomoney/yookassa-sdk-php) [![Total Downloads](https://img.shields.io/packagist/dt/yoomoney/yookassa-sdk-php)](https://packagist.org/packages/yoomoney/yookassa-sdk-php) [![Monthly Downloads](https://img.shields.io/packagist/dm/yoomoney/yookassa-sdk-php)](https://packagist.org/packages/yoomoney/yookassa-sdk-php) [![License](https://img.shields.io/packagist/l/yoomoney/yookassa-sdk-php)](https://packagist.org/packages/yoomoney/yookassa-sdk-php) Russian | [English](README.en.md) Клиент для работы с платежами [по API ЮKassa](https://yookassa.ru/developers/api). Подходит тем, у кого способ подключения к ЮKassa называется API. [Документация по этому SDK](docs/readme.md) ## Требования PHP 8.0 (и выше) с расширением libcurl ## Установка ### В консоли с помощью Composer 1. [Установите менеджер пакетов Composer](https://getcomposer.org/download/). 2. В консоли выполните команду: ```bash composer require yoomoney/yookassa-sdk-php ``` ### В файле composer.json своего проекта 1. Добавьте строку `"yoomoney/yookassa-sdk-php": "^3.0"` в список зависимостей вашего проекта в файле composer.json: ``` ... "require": { "php": ">=8.0", "yoomoney/yookassa-sdk-php": "^3.0" ... ``` 2. Обновите зависимости проекта. В консоли перейдите в каталог, где лежит composer.json, и выполните команду: ```bash composer update ``` 3. В коде вашего проекта подключите автозагрузку файлов нашего клиента: ```php require __DIR__ . '/vendor/autoload.php'; ``` ## Начало работы 1. Импортируйте нужные классы: ```php use YooKassa\Client; ``` 2. Создайте экземпляр объекта клиента, задайте идентификатор магазина и секретный ключ (их можно получить в личном кабинете ЮKassa). [Как выпустить секретный ключ](https://yookassa.ru/docs/support/merchant/payments/implement/keys) ```php $client = new Client(); $client->setAuth('shopId', 'secretKey'); ``` 3. Вызовите нужный метод API. [Подробнее в документации по API ЮKassa](https://yookassa.ru/developers/api#create_payment) [Подробнее в документации по SDK ЮKassa](docs/readme.md) ## Примеры использования SDK #### [Что нового в SDK версии 3.x](docs/examples/migration-3x.md) #### [Настройки SDK API ЮKassa](docs/examples/01-configuration.md) * [Установка дополнительных настроек для Curl](docs/examples/01-configuration.md#Установка-дополнительных-настроек-для-Curl) * [Аутентификация](docs/examples/01-configuration.md#Аутентификация) * [Статистические данные об используемом окружении](docs/examples/01-configuration.md#Статистические-данные-об-используемом-окружении) * [Получение информации о магазине](docs/examples/01-configuration.md#Получение-информации-о-магазине) * [Работа с Webhook](docs/examples/01-configuration.md#Работа-с-Webhook) * [Входящие уведомления](docs/examples/01-configuration.md#Входящие-уведомления) #### [Работа с платежами](docs/examples/02-payments.md) * [Запрос на создание платежа](docs/examples/02-payments.md#Запрос-на-создание-платежа) * [Запрос на создание платежа через билдер](docs/examples/02-payments.md#Запрос-на-создание-платежа-через-билдер) * [Запрос на частичное подтверждение платежа](docs/examples/02-payments.md#Запрос-на-частичное-подтверждение-платежа) * [Запрос на отмену незавершенного платежа](docs/examples/02-payments.md#Запрос-на-отмену-незавершенного-платежа) * [Получить информацию о платеже](docs/examples/02-payments.md#Получить-информацию-о-платеже) * [Получить список платежей с фильтрацией](docs/examples/02-payments.md#Получить-список-платежей-с-фильтрацией) #### [Работа с возвратами](docs/examples/03-refunds.md) * [Запрос на создание возврата](docs/examples/03-refunds.md#Запрос-на-создание-возврата) * [Запрос на создание возврата через билдер](docs/examples/03-refunds.md#Запрос-на-создание-возврата-через-билдер) * [Получить информацию о возврате](docs/examples/03-refunds.md#Получить-информацию-о-возврате) * [Получить список возвратов с фильтрацией](docs/examples/03-refunds.md#Получить-список-возвратов-с-фильтрацией) #### [Работа с чеками](docs/examples/04-receipts.md) * [Запрос на создание чека](docs/examples/04-receipts.md#Запрос-на-создание-чека) * [Запрос на создание чека через билдер](docs/examples/04-receipts.md#Запрос-на-создание-чека-через-билдер) * [Получить информацию о чеке](docs/examples/04-receipts.md#Получить-информацию-о-чеке) * [Получить список чеков с фильтрацией](docs/examples/04-receipts.md#Получить-список-чеков-с-фильтрацией) #### [Работа с безопасными сделками](docs/examples/05-deals.md) * [Запрос на создание сделки](docs/examples/05-deals.md#Запрос-на-создание-сделки) * [Запрос на создание сделки через билдер](docs/examples/05-deals.md#Запрос-на-создание-сделки-через-билдер) * [Запрос на создание платежа с привязкой к сделке](docs/examples/05-deals.md#Запрос-на-создание-платежа-с-привязкой-к-сделке) * [Получить информацию о сделке](docs/examples/05-deals.md#Получить-информацию-о-сделке) * [Получить список сделок с фильтрацией](docs/examples/05-deals.md#Получить-список-сделок-с-фильтрацией) #### [Работа с выплатами](docs/examples/06-payouts.md) * [Запрос на выплату продавцу](docs/examples/06-payouts.md#Запрос-на-выплату-продавцу) * [Проведение выплаты на банковскую карту](docs/examples/06-payouts.md#Проведение-выплаты-на-банковскую-карту) * [Проведение выплаты в кошелек ЮMoney](docs/examples/06-payouts.md#Проведение-выплаты-в-кошелек-юmoney) * [Проведение выплаты через СБП](docs/examples/06-payouts.md#Проведение-выплаты-через-сбп) * [Выплаты самозанятым](docs/examples/06-payouts.md#Выплаты-самозанятым) * [Проведение выплаты по безопасной сделке](docs/examples/06-payouts.md#Проведение-выплаты-по-безопасной-сделке) * [Получить информацию о выплате](docs/examples/06-payouts.md#Получить-информацию-о-выплате) #### [Работа с самозанятыми](docs/examples/07-self-employed.md) * [Запрос на создание самозанятого](docs/examples/07-self-employed.md#Запрос-на-создание-самозанятого) * [Получить информацию о самозанятом](docs/examples/07-self-employed.md#Получить-информацию-о-самозанятом) #### [Работа с персональными данными](docs/examples/08-personal-data.md) * [Создание персональных данных](docs/examples/08-personal-data.md#Создание-персональных-данных) * [Получить информацию о персональных данных](docs/examples/08-personal-data.md#Получить-информацию-о-персональных-данных) #### [Работа со списком участников СБП](docs/examples/09-sbp-banks.md) * [Получить список участников СБП](docs/examples/09-sbp-banks.md#Получить-список-участников-СБП) yookassa-sdk-php/.travis.yml000064400000000726150364342670012071 0ustar00language: php php: - 8.2 - 8.1 - 8.0 cache: directories: - $HOME/.composer before_install: - composer self-update - composer clear-cache install: - composer update --no-interaction --no-ansi --optimize-autoloader --prefer-dist before_script: - export XDEBUG_MODE=coverage script: - php -derror_reporting=32759 vendor/bin/phpunit --configuration phpunit.xml.dist --no-coverage # after_success: # - travis_retry php vendor/bin/php-coveralls yookassa-sdk-php/phpmd.xml000064400000004701150364342670011607 0ustar00 Ruleset for PHPMD analysis of Drupal projects. Excludes coding issues handled better by PHPCS and rules which have too many false positives in a typical YooKassa codebase. 3 yookassa-sdk-php/LICENSE.md000064400000002073150364342670011361 0ustar00 The MIT License Copyright (c) 2023 "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. yookassa-sdk-php/phpdoc.xml000064400000003063150364342670011754 0ustar00 YooKassa API SDK .phpdoc latest lib api php public protected template template-extends template-implements extends implements examples YooKassa true