diff --git a/src/AmoCRM/EntitiesServices/Sources/WebsiteButtons.php b/src/AmoCRM/EntitiesServices/Sources/WebsiteButtons.php index 45872ef..7cf77a9 100644 --- a/src/AmoCRM/EntitiesServices/Sources/WebsiteButtons.php +++ b/src/AmoCRM/EntitiesServices/Sources/WebsiteButtons.php @@ -68,7 +68,7 @@ public function createAsync(WebsiteButtonCreateRequestModel $model): WebsiteButt public function addOnlineChatAsync(int $sourceId): void { $this->request->post( - sprintf('%s/%d/%s', $this->getMethod(), $sourceId, self::ONLINE_CHAT_ENDPOINT) + sprintf('%s/%d/%s', $this->getMethod(), $sourceId, self::ONLINECHAT_ENDPOINT) ); } @@ -80,7 +80,8 @@ public function addOnlineChatAsync(int $sourceId): void public function updateAsync(WebsiteButtonUpdateRequestModel $model): WebsiteButtonModel { $response = $this->request->patch( - sprintf('%s/%d', $this->getMethod(), $model->getSourceId()), $model->toApi() + sprintf('%s/%d', $this->getMethod(), $model->getSourceId()), + $model->toApi() ); return WebsiteButtonModel::fromArray($response);