From 7dcc438fe8123520c54c75adb1507510d7db0db1 Mon Sep 17 00:00:00 2001 From: Grisha Pomadchin Date: Sat, 22 Mar 2014 15:15:37 +0400 Subject: [PATCH] api class methods fix --- intaro.intarocrm/classes/general/RestApi.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/intaro.intarocrm/classes/general/RestApi.php b/intaro.intarocrm/classes/general/RestApi.php index 9576d9e7..7bb0542e 100644 --- a/intaro.intarocrm/classes/general/RestApi.php +++ b/intaro.intarocrm/classes/general/RestApi.php @@ -211,6 +211,22 @@ class RestApi return $result; } + /** + * Обновление externalId у клиентов с переданными id + * + * @param array $customers- массив, содержащий id и externalId заказа + * @return array + */ + public function customerFixExternalIds($customers) + { + $dataJson = json_encode($customers); + $this->parameters['customers'] = $dataJson; + + $url = $this->apiUrl.'customers/fix-external-ids'; + $result = $this->curlRequest($url, 'POST'); + return $result; + } + /** * Удаление клиента *