From d63b5639d79a0b76eada583840a9484247b1ed3e Mon Sep 17 00:00:00 2001 From: Anton Kartsev Date: Mon, 17 Aug 2020 18:24:24 +0300 Subject: [PATCH] fixed bug, not working final statuses for new pipeline --- src/AmoCRM/Models/Leads/Pipelines/Statuses/StatusModel.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/AmoCRM/Models/Leads/Pipelines/Statuses/StatusModel.php b/src/AmoCRM/Models/Leads/Pipelines/Statuses/StatusModel.php index 87f31f3b..95cb90e4 100644 --- a/src/AmoCRM/Models/Leads/Pipelines/Statuses/StatusModel.php +++ b/src/AmoCRM/Models/Leads/Pipelines/Statuses/StatusModel.php @@ -265,6 +265,10 @@ public function toApi(?string $requestId = "0"): array { $result = []; + if (!is_null($this->getId()) && !$this->getPipelineId()) { + $result['id'] = $this->getId(); + } + if (!is_null($this->getName())) { $result['name'] = $this->getName(); }