Skip to content

Commit

Permalink
Merge pull request #53 from amocrm/hotfix/issue#51
Browse files Browse the repository at this point in the history
fix call toApi method with correct requestId if not given
  • Loading branch information
bessudnov authored Jul 6, 2020
2 parents 4c7f614 + 089798f commit f029c73
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/AmoCRM/Models/CallModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ public function toArray(): array
*/
public function toApi(?string $requestId = "0"): array
{
if (is_null($this->getRequestId()) && !is_null($requestId)) {
$this->setRequestId($requestId);
}

return [
'uniq' => $this->getUniq(),
'duration' => $this->getDuration(),
Expand Down

0 comments on commit f029c73

Please sign in to comment.