meraproject/vendor/yoomoney/yookassa-sdk-php/docs/classes/YooKassa-Request-Receipts-CreatePostReceiptRequestBuilder.md
keboss-m 5c21d25d45 Initial commit: Merakomis portal, Docker stack and user-reader API.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 11:04:05 +03:00

22 KiB
Raw Blame History

YooKassa API SDK

Class: \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

Namespace: \YooKassa\Request\Receipts


Summary:

Класс билдера объектов запросов к API на создание чека


Examples

02-builder.php 91 56 Пример использования билдера



Constants

  • No constants found

Properties

Visibility Name Flag Summary
protected $amount Сумма чека
protected $currentObject Собираемый объект запроса
protected $customer Информация о плательщике

Methods

Visibility Name Flag Summary
public __construct() Конструктор, инициализирует пустой запрос, который в будущем начнём собирать
public addItem() Добавляет товар в чек
public build() Строит и возвращает объект запроса для отправки в API ЮKassa
public setAdditionalUserProps() Устанавливает дополнительный реквизит пользователя
public setAmount() Устанавливает сумму
public setCurrency() Устанавливает валюту в которой будет происходить подтверждение оплаты заказа
public setCustomer() Устанавливает информацию о пользователе
public setItems() Устанавливает список товаров чека
public setObjectId() Устанавливает Id объекта чека
public setObjectType() Устанавливает тип объекта чека
public setOnBehalfOf() Устанавливает идентификатор магазина, от имени которого нужно отправить чек.
public setOptions() Устанавливает свойства запроса из массива
public setReceiptIndustryDetails() Устанавливает отраслевой реквизит чека
public setReceiptOperationalDetails() Устанавливает отраслевой реквизит чека
public setSend() Устанавливает признак отложенной отправки чека.
public setSettlements() Устанавливает массив оплат, обеспечивающих выдачу товара.
public setTaxSystemCode() Устанавливает код системы налогообложения
public setType() Устанавливает тип чека в онлайн-кассе
protected initCurrentObject() Инициализирует объект запроса, который в дальнейшем будет собираться билдером

Details


Properties

protected $amount : \YooKassa\Model\AmountInterface


Summary

Сумма чека

Type: AmountInterface

Details:

protected $currentObject : \YooKassa\Request\Receipts\CreatePostReceiptRequest


Summary

Собираемый объект запроса

Type: CreatePostReceiptRequest

Details:

protected $customer : \YooKassa\Model\ReceiptCustomer


Summary

Информация о плательщике

Type: ReceiptCustomer

Details:


Methods

public __construct() : mixed

public __construct() : mixed

Summary

Конструктор, инициализирует пустой запрос, который в будущем начнём собирать

Details:

Returns: mixed -

public addItem() : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

public addItem(\YooKassa\Model\ReceiptItemInterface|array $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

Summary

Добавляет товар в чек

Details:

Parameters:
Type Name Description
\YooKassa\Model\ReceiptItemInterface OR array value Информация о товаре

Returns: \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder -

public build() : \YooKassa\Request\Receipts\CreatePostReceiptRequest|\YooKassa\Common\AbstractRequest

public build(array|null $options = null) : \YooKassa\Request\Receipts\CreatePostReceiptRequest|\YooKassa\Common\AbstractRequest

Summary

Строит и возвращает объект запроса для отправки в API ЮKassa

Details:

Parameters:
Type Name Description
array OR null options Массив параметров для установки в объект запроса
Throws:
Type Description
\YooKassa\Common\Exceptions\InvalidRequestException Выбрасывается если собрать объект запроса не удалось

Returns: \YooKassa\Request\Receipts\CreatePostReceiptRequest|\YooKassa\Common\AbstractRequest - Инстанс объекта запроса

public setAdditionalUserProps() : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

public setAdditionalUserProps(\YooKassa\Model\Receipt\AdditionalUserProps|array $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

Summary

Устанавливает дополнительный реквизит пользователя

Details:

Parameters:
Type Name Description
\YooKassa\Model\Receipt\AdditionalUserProps OR array value Дополнительный реквизит пользователя

Returns: \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder - Инстанс билдера запросов

public setAmount() : self

public setAmount(\YooKassa\Model\AmountInterface|array|string $value) : self

Summary

Устанавливает сумму

Details:

Parameters:
Type Name Description
\YooKassa\Model\AmountInterface OR array OR string value Сумма оплаты

Returns: self - Инстанс билдера запросов

public setCurrency() : self

public setCurrency(string $value) : self

Summary

Устанавливает валюту в которой будет происходить подтверждение оплаты заказа

Details:

Parameters:
Type Name Description
string value Валюта в которой подтверждается оплата

Returns: self - Инстанс билдера запросов

public setCustomer() : self

public setCustomer(\YooKassa\Model\ReceiptCustomerInterface|array $value) : self

Summary

Устанавливает информацию о пользователе

Details:

Parameters:
Type Name Description
\YooKassa\Model\ReceiptCustomerInterface OR array value Информация о плательщике

Returns: self - Инстанс билдера запросов

public setItems() : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

public setItems(\YooKassa\Model\ReceiptItemInterface[]|array $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

Summary

Устанавливает список товаров чека

Details:

Parameters:
Type Name Description
\YooKassa\Model\ReceiptItemInterface[] OR array value Список товаров чека

Returns: \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder -

public setObjectId() : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

public setObjectId(string $value, string|null $type = null) : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

Summary

Устанавливает Id объекта чека

Details:

Parameters:
Type Name Description
string value Id объекта чека
string OR null type Тип объекта чека

Returns: \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder -

public setObjectType() : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

public setObjectType(string $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

Summary

Устанавливает тип объекта чека

Details:

Parameters:
Type Name Description
string value Тип объекта чека

Returns: \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder -

public setOnBehalfOf() : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

public setOnBehalfOf(string $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

Summary

Устанавливает идентификатор магазина, от имени которого нужно отправить чек.

Description

Выдается ЮKassa, отображается в разделе Продавцы личного кабинета (столбец shopId). Необходимо передавать, если вы используете решение ЮKassa для платформ.

Details:

Parameters:
Type Name Description
string value Идентификатор магазина, от имени которого нужно отправить чек

Returns: \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder -

public setOptions() : \YooKassa\Common\AbstractRequestBuilder

public setOptions(array|\Traversable $options) : \YooKassa\Common\AbstractRequestBuilder

Summary

Устанавливает свойства запроса из массива

Details:

Parameters:
Type Name Description
array OR \Traversable options Массив свойств запроса
Throws:
Type Description
\InvalidArgumentException Выбрасывается если аргумент не массив и не итерируемый объект
\YooKassa\Common\Exceptions\InvalidPropertyException Выбрасывается если не удалось установить один из параметров, переданныч в массиве настроек

Returns: \YooKassa\Common\AbstractRequestBuilder - Инстанс текущего билдера запросов

public setReceiptIndustryDetails() : mixed

public setReceiptIndustryDetails(array|\YooKassa\Model\Receipt\IndustryDetails[] $value) : mixed

Summary

Устанавливает отраслевой реквизит чека

Details:

Parameters:
Type Name Description
array OR \YooKassa\Model\Receipt\IndustryDetails[] value Отраслевой реквизит чека CreatePostReceiptRequestBuilder

Returns: mixed -

public setReceiptOperationalDetails() : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

public setReceiptOperationalDetails(array|\YooKassa\Model\Receipt\IndustryDetails[] $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

Summary

Устанавливает отраслевой реквизит чека

Details:

Parameters:
Type Name Description
array OR \YooKassa\Model\Receipt\IndustryDetails[] value Отраслевой реквизит чека

Returns: \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder - Инстанс билдера запросов

public setSend() : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

public setSend(bool $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

Summary

Устанавливает признак отложенной отправки чека.

Details:

Parameters:
Type Name Description
bool value Признак отложенной отправки чека.

Returns: \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder -

public setSettlements() : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

public setSettlements(\YooKassa\Model\SettlementInterface[]|array $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

Summary

Устанавливает массив оплат, обеспечивающих выдачу товара.

Details:

Parameters:
Type Name Description
\YooKassa\Model\SettlementInterface[] OR array value Массив оплат, обеспечивающих выдачу товара

Returns: \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder -

public setTaxSystemCode() : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

public setTaxSystemCode(int $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

Summary

Устанавливает код системы налогообложения

Details:

Parameters:
Type Name Description
int value Код системы налогообложения. Число 1-6.

Returns: \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder -

public setType() : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

public setType(string $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder

Summary

Устанавливает тип чека в онлайн-кассе

Details:

Parameters:
Type Name Description
string value Тип чека в онлайн-кассе: приход "payment" или возврат "refund".

Returns: \YooKassa\Request\Receipts\CreatePostReceiptRequestBuilder -

protected initCurrentObject() : \YooKassa\Request\Receipts\CreatePostReceiptRequest

protected initCurrentObject() : \YooKassa\Request\Receipts\CreatePostReceiptRequest

Summary

Инициализирует объект запроса, который в дальнейшем будет собираться билдером

Details:

Returns: \YooKassa\Request\Receipts\CreatePostReceiptRequest - Инстанс собираемого объекта запроса к API


Top Namespaces


Reports


This document was automatically generated from source code comments on 2023-04-06 using phpDocumentor

© 2023 YooMoney