Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add method isError #336

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bitrix24-php-sdk change log

## 2.0-beta.1 — 10.11.2022
## 2.0-beta.1 — 25.02.2023

### Added

Expand Down Expand Up @@ -30,7 +30,8 @@
* fix [typehint at ContactItemResult](https://github.com/mesilov/bitrix24-php-sdk/issues/320)
* fix [return types in DealCategoryItemResult](https://github.com/mesilov/bitrix24-php-sdk/issues/322)
* fix [add auth node in telephony voximplant events requests](https://github.com/mesilov/bitrix24-php-sdk/issues/331)

* fix [add helper metods isError for registerCallResult fortelephony](https://github.com/mesilov/bitrix24-php-sdk/issues/335)
*
### etc

## 2.0-alpha.7 — 8.08.2022
Expand Down
14 changes: 11 additions & 3 deletions src/Services/Telephony/Result/ExternalCallRegisterItemResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,22 @@
use Bitrix24\SDK\Core\Result\AbstractItem;

/**
* If registration of the call was unsuccessful, the LEAD_CREATION_ERROR field will contain the error message.
*
* @property-read string $CALL_ID
* @property-read int $CRM_CREATED_LEAD
* @property-read int $CRM_ENTITY_ID
* @property-read ?int $CRM_CREATED_LEAD
* @property-read ?int $CRM_ENTITY_ID
* @property-read string $CRM_ENTITY_TYPE
* @property-read array $CRM_CREATED_ENTITIES
* @property-read string $LEAD_CREATION_ERROR
*/
class ExternalCallRegisterItemResult extends AbstractItem
{

/**
* @return bool
*/
public function isError(): bool
{
return $this->data['LEAD_CREATION_ERROR'] !== '' && $this->data['LEAD_CREATION_ERROR'] !== null;
}
}