diff --git a/CHANGELOG.md b/CHANGELOG.md index ea66c7ca..355578df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # bitrix24-php-sdk change log -## 2.0-beta.1 — 10.11.2022 +## 2.0-beta.1 — 25.02.2023 ### Added @@ -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 diff --git a/src/Services/Telephony/Result/ExternalCallRegisterItemResult.php b/src/Services/Telephony/Result/ExternalCallRegisterItemResult.php index ba8a09c2..ef2759a1 100644 --- a/src/Services/Telephony/Result/ExternalCallRegisterItemResult.php +++ b/src/Services/Telephony/Result/ExternalCallRegisterItemResult.php @@ -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; + } } \ No newline at end of file