Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
bessudnov committed Aug 27, 2020
1 parent a30336a commit 1dab573
Showing 1 changed file with 3 additions and 3 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

0 comments on commit 1dab573

Please sign in to comment.