# [YooKassa API SDK](../home.md) # Class: \YooKassa\Request\Receipts\CreatePostReceiptRequest ### Namespace: [\YooKassa\Request\Receipts](../namespaces/yookassa-request-receipts.md) --- **Summary:** Класс объекта запроса к API на создание чека --- ### Examples 02-builder.php 91 56 Пример использования билдера ```php ``` --- ### 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 | [addItem()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_addItem) | | Добавляет товар в чек | | public | [addSettlement()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_addSettlement) | | Добавляет оплату в перечень совершенных расчетов. | | public | [builder()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_builder) | | Возвращает билдер объектов запросов создания платежа | | public | [clearValidationError()](../classes/YooKassa-Common-AbstractRequest.md#method_clearValidationError) | | Очищает статус валидации текущего запроса | | public | [fromArray()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.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 | [hasCustomer()](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md#method_hasCustomer) | | Проверяет наличие данных о плательщике | | public | [jsonSerialize()](../classes/YooKassa-Common-AbstractObject.md#method_jsonSerialize) | | | | 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) | | Устанавливает ошибку валидации | --- ### Details * File: [lib/Request/Receipts/CreatePostReceiptRequest.php](../../lib/Request/Receipts/CreatePostReceiptRequest.php) * Package: YooKassa * 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) --- ## Methods #### public __construct() : mixed ```php public __construct(array $data = array()) : mixed ``` **Summary** AbstractObject constructor. **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.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() : mixed ```php public __set(string $propertyName, mixed $value) : mixed ``` **Summary** Устанавливает значение свойства **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя свойства | | mixed | value | Значение свойства | **Returns:** mixed - #### public __unset() : mixed ```php public __unset(string $propertyName) : mixed ``` **Summary** Удаляет свойство **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | propertyName | Имя удаляемого свойства | **Returns:** mixed - #### public addItem() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public addItem(\YooKassa\Model\ReceiptItemInterface|array $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Добавляет товар в чек **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\ReceiptItemInterface OR array | value | Объект добавляемой в чек позиции | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - #### public addSettlement() : mixed ```php public addSettlement(\YooKassa\Model\SettlementInterface $value) : mixed ``` **Summary** Добавляет оплату в перечень совершенных расчетов. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\SettlementInterface | value | Информация о совершенных расчетах. | **Returns:** mixed - #### 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() : mixed ```php public clearValidationError() : mixed ``` **Summary** Очищает статус валидации текущего запроса **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** mixed - #### public fromArray() : mixed ```php public fromArray(array|\Traversable $sourceArray) : mixed ``` **Summary** Устанавливает значения свойств текущего объекта из массива **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \Traversable | sourceArray | Ассоциативный массив с настройками | **Returns:** mixed - #### public getAdditionalUserProps() : \YooKassa\Model\Receipt\AdditionalUserProps ```php public getAdditionalUserProps() : \YooKassa\Model\Receipt\AdditionalUserProps ``` **Summary** Возвращает дополнительный реквизит пользователя **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** \YooKassa\Model\Receipt\AdditionalUserProps - Дополнительный реквизит пользователя #### public getCustomer() : \YooKassa\Model\ReceiptCustomerInterface ```php public getCustomer() : \YooKassa\Model\ReceiptCustomerInterface ``` **Summary** Возвращает информацию о плательщике **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** \YooKassa\Model\ReceiptCustomerInterface - Информация о плательщике #### public getItems() : \YooKassa\Model\ReceiptItemInterface[] ```php public getItems() : \YooKassa\Model\ReceiptItemInterface[] ``` **Summary** Возвращает список позиций в текущем чеке **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** \YooKassa\Model\ReceiptItemInterface[] - Список товаров в заказе #### public getLastValidationError() : string ```php public getLastValidationError() : string ``` **Summary** Возвращает последнюю ошибку валидации **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) **Returns:** string - Последняя произошедшая ошибка валидации #### public getObjectId() : string ```php public getObjectId() : string ``` **Summary** Возвращает Id объекта чека **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** string - Id объекта чека #### public getObjectType() : string ```php public getObjectType() : string ``` **Summary** Возвращает тип объекта чека **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** string - Тип объекта чека #### public getOnBehalfOf() : string ```php public getOnBehalfOf() : string ``` **Summary** Возвращает идентификатор магазина, от имени которого нужно отправить чек. **Description** Выдается ЮKassa, отображается в разделе Продавцы личного кабинета (столбец shopId). Необходимо передавать, если вы используете решение ЮKassa для платформ. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** string - #### public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[] ```php public getReceiptIndustryDetails() : \YooKassa\Model\Receipt\IndustryDetails[] ``` **Summary** Возвращает отраслевой реквизит чека **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** \YooKassa\Model\Receipt\IndustryDetails[] - Отраслевой реквизит чека #### public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails ```php public getReceiptOperationalDetails() : \YooKassa\Model\Receipt\OperationalDetails ``` **Summary** Возвращает операционный реквизит чека **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** \YooKassa\Model\Receipt\OperationalDetails - Операционный реквизит чека #### 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\SettlementInterface[] ```php public getSettlements() : \YooKassa\Model\SettlementInterface[] ``` **Summary** Возвращает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** \YooKassa\Model\SettlementInterface[] - Массив оплат, обеспечивающих выдачу товара. #### public getTaxSystemCode() : int ```php public getTaxSystemCode() : int ``` **Summary** Возвращает код системы налогообложения **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** int - Код системы налогообложения. Число 1-6. #### public getType() : string ```php public getType() : string ``` **Summary** Возвращает тип чека в онлайн-кассе **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) **Returns:** string - Тип чека в онлайн-кассе: приход "payment" или возврат "refund". #### 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() : mixed ```php public jsonSerialize() : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) **Returns:** mixed - #### 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() : mixed ```php public offsetExists(mixed $offset) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | offset | | **Returns:** mixed - #### public offsetGet() : mixed ```php public offsetGet(mixed $offset) : mixed ``` **Details:** * Inherited From: [\YooKassa\Common\AbstractObject](../classes/YooKassa-Common-AbstractObject.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\AbstractObject](../classes/YooKassa-Common-AbstractObject.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\AbstractObject](../classes/YooKassa-Common-AbstractObject.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | mixed | offset | | **Returns:** mixed - #### public setAdditionalUserProps() : void|\YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public setAdditionalUserProps(\YooKassa\Model\Receipt\AdditionalUserProps|array $value) : void|\YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Устанавливает дополнительный реквизит пользователя **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\Receipt\AdditionalUserProps OR array | value | Дополнительный реквизит пользователя | **Returns:** void|\YooKassa\Request\Receipts\CreatePostReceiptRequest - #### public setCustomer() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public setCustomer(\YooKassa\Model\ReceiptCustomerInterface|array $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Устанавливает информацию о плательщике **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\ReceiptCustomerInterface OR array | value | Информация о плательщике | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - #### public setItems() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public setItems(\YooKassa\Model\ReceiptItemInterface[]|array $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Устанавливает список позиций в чеке **Description** Если до этого в чеке уже были установлены значения, они удаляются и полностью заменяются переданным списком позиций. Все передаваемые значения в массиве позиций должны быть объектами класса, реализующего интерфейс ReceiptItemInterface, в противном случае будет выброшено исключение InvalidPropertyValueTypeException. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\ReceiptItemInterface[] OR array | value | Список товаров в заказе | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\EmptyPropertyValueException | Выбрасывается если передали пустой массив значений | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если в качестве значения был передан не массив и не итератор, либо если одно из переданных значений не реализует интерфейс ReceiptItemInterface | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - #### public setObjectId() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public setObjectId(string $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 | value | Id объекта чека | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - #### public setObjectType() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public setObjectType(string $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Устанавливает тип объекта чека **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Тип объекта чека | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - #### public setOnBehalfOf() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public setOnBehalfOf(string $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Устанавливает идентификатор магазина, от имени которого нужно отправить чек. **Description** Выдается ЮKassa, отображается в разделе Продавцы личного кабинета (столбец shopId). Необходимо передавать, если вы используете решение ЮKassa для платформ. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - #### public setReceiptIndustryDetails() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public setReceiptIndustryDetails(array|\YooKassa\Model\Receipt\IndustryDetails $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Устанавливает отраслевой реквизит чека **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\IndustryDetails | value | Отраслевой реквизит чека | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - #### public setReceiptOperationalDetails() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public setReceiptOperationalDetails(array|\YooKassa\Model\Receipt\OperationalDetails $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Устанавливает операционный реквизит чека **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | array OR \YooKassa\Model\Receipt\OperationalDetails | value | Операционный реквизит чека | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - #### public setSend() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public setSend(bool $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Устанавливает признак отложенной отправки чека. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | bool | value | Признак отложенной отправки чека. | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - #### public setSettlements() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public setSettlements(\YooKassa\Model\SettlementInterface|array $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Устанавливает массив оплат, обеспечивающих выдачу товара. **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | \YooKassa\Model\SettlementInterface OR array | value | Массив оплат, обеспечивающих выдачу товара. | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - #### public setTaxSystemCode() : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ```php public setTaxSystemCode(int $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface ``` **Summary** Устанавливает код системы налогообложения **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | int | value | Код системы налогообложения. Число 1-6 | ##### Throws: | Type | Description | | ---- | ----------- | | \YooKassa\Common\Exceptions\InvalidPropertyValueTypeException | Выбрасывается если переданный аргумент - не число | | \YooKassa\Common\Exceptions\InvalidPropertyValueException | Выбрасывается если переданный аргумент меньше одного или больше шести | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequestInterface - #### public setType() : \YooKassa\Request\Receipts\CreatePostReceiptRequest ```php public setType(string $value) : \YooKassa\Request\Receipts\CreatePostReceiptRequest ``` **Summary** Устанавливает тип чека в онлайн-кассе **Details:** * Inherited From: [\YooKassa\Request\Receipts\CreatePostReceiptRequest](../classes/YooKassa-Request-Receipts-CreatePostReceiptRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Тип чека в онлайн-кассе: приход "payment" или возврат "refund". | **Returns:** \YooKassa\Request\Receipts\CreatePostReceiptRequest - #### 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() : mixed ```php protected setValidationError(string $value) : mixed ``` **Summary** Устанавливает ошибку валидации **Details:** * Inherited From: [\YooKassa\Common\AbstractRequest](../classes/YooKassa-Common-AbstractRequest.md) ##### Parameters: | Type | Name | Description | | ---- | ---- | ----------- | | string | value | Ошибка, произошедшая при валидации объекта | **Returns:** mixed - --- ### Top Namespaces * [\YooKassa](../namespaces/yookassa.md) --- ### Reports * [Errors - 0](../reports/errors.md) * [Markers - 1](../reports/markers.md) * [Deprecated - 25](../reports/deprecated.md) --- This document was automatically generated from source code comments on 2023-04-06 using [phpDocumentor](http://www.phpdoc.org/) © 2023 YooMoney