Skip to content

Commit

Permalink
Merge pull request #119 from amocrm/hotfix/issue#116
Browse files Browse the repository at this point in the history
Hotfix/issue#116
  • Loading branch information
bessudnov authored Aug 31, 2020
2 parents 2a8ec0f + 02a815a commit af49212
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/catalogs_elements_actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ function (AccessTokenInterface $accessToken, string $baseDomain) {
if ($nikeElement) {
//Установим кол-во, так как эта модель будет привязана, данное свойство используется только при привязке к сущности
$nikeElement->setQuantity(10);
//Получим контакт по ID, сделку и првяжем контакт к сделке
//Получим сделку по ID
try {
$contact = $apiClient->leads()->getOne(5170965);
$lead = $apiClient->leads()->getOne(5170965);
} catch (AmoCRMApiException $e) {
printError($e);
die;
Expand All @@ -83,7 +83,7 @@ function (AccessTokenInterface $accessToken, string $baseDomain) {
$links = new LinksCollection();
$links->add($nikeElement);
try {
$apiClient->leads()->link($contact, $links);
$apiClient->leads()->link($lead, $links);
} catch (AmoCRMApiException $e) {
printError($e);
die;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function getFieldName(): ?string
/**
* @return BaseCustomFieldValueCollection
*/
public function getValues(): BaseCustomFieldValueCollection
public function getValues(): ?BaseCustomFieldValueCollection
{
return $this->values;
}
Expand Down

0 comments on commit af49212

Please sign in to comment.