From 4f57734e92c714547dad4382c35c08cb08097255 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Thu, 22 Jun 2017 16:42:42 +0300 Subject: [PATCH 01/41] Minor bugfixes (#42) --- README.md | 6 +- README.ru.md | 6 +- lib/RetailCrm/ApiClient.php | 12 +- lib/RetailCrm/Client/AbstractLoader.php | 4 +- lib/RetailCrm/Client/ApiVersion3.php | 4 +- lib/RetailCrm/Client/ApiVersion4.php | 5 +- lib/RetailCrm/Client/ApiVersion5.php | 5 +- lib/RetailCrm/Exception/CurlException.php | 2 +- .../Exception/InvalidJsonException.php | 2 +- lib/RetailCrm/Methods/V3/Customers.php | 4 +- lib/RetailCrm/Methods/V3/Orders.php | 4 +- lib/RetailCrm/Methods/V3/Packs.php | 4 +- lib/RetailCrm/Methods/V3/References.php | 4 +- lib/RetailCrm/Methods/V3/Statistic.php | 2 +- lib/RetailCrm/Methods/V3/Stores.php | 4 +- lib/RetailCrm/Methods/V4/Customers.php | 4 +- lib/RetailCrm/Methods/V4/Delivery.php | 30 +-- lib/RetailCrm/Methods/V4/Orders.php | 4 +- lib/RetailCrm/Methods/V4/Packs.php | 4 +- lib/RetailCrm/Methods/V4/References.php | 4 +- lib/RetailCrm/Methods/V4/Settings.php | 186 ++++++++++++++++++ lib/RetailCrm/Methods/V4/Statistic.php | 4 +- lib/RetailCrm/Methods/V4/Stores.php | 29 +-- lib/RetailCrm/Methods/V4/Telephony.php | 104 ---------- lib/RetailCrm/Methods/V4/Users.php | 4 +- lib/RetailCrm/Methods/V5/Customers.php | 8 +- lib/RetailCrm/Methods/V5/Delivery.php | 4 +- lib/RetailCrm/Methods/V5/Marketplace.php | 33 ---- lib/RetailCrm/Methods/V5/Orders.php | 5 +- lib/RetailCrm/Methods/V5/Packs.php | 4 +- lib/RetailCrm/Methods/V5/References.php | 4 +- lib/RetailCrm/Methods/V5/Statistic.php | 4 +- lib/RetailCrm/Methods/V5/Stores.php | 4 +- lib/RetailCrm/Methods/V5/Tasks.php | 4 +- lib/RetailCrm/Methods/V5/Users.php | 4 +- .../Version4/ApiClientCustomersTest.php | 24 +-- .../Methods/Version4/ApiClientOrdersTest.php | 28 +-- .../Version4/ApiClientReferenceTest.php | 8 +- .../Methods/Version4/ApiClientStoreTest.php | 12 +- .../Version4/ApiClientTelephonyTest.php | 10 +- .../Methods/Version5/ApiClientOrdersTest.php | 32 +-- .../Methods/Version5/ApiClientPacksTest.php | 5 +- .../Methods/Version5/ApiClientPricesTest.php | 11 +- .../Version5/ApiClientReferenceTest.php | 12 +- .../Methods/Version5/ApiClientStoreTest.php | 21 +- .../Methods/Version5/ApiClientTasksTest.php | 6 +- .../Version5/ApiClientTelephonyTest.php | 39 +--- .../Methods/Version5/ApiClientUsersTest.php | 10 +- 48 files changed, 356 insertions(+), 377 deletions(-) create mode 100644 lib/RetailCrm/Methods/V4/Settings.php delete mode 100644 lib/RetailCrm/Methods/V5/Marketplace.php diff --git a/README.md b/README.md index d4d3877..9c16498 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Use [API documentation](http://retailcrm.github.io/api-client-php) 2) Run into your project directory: ```bash -composer require retailcrm/api-client-php 5.* --no-dev +composer require retailcrm/api-client-php ~5.0 ``` If you have not used `composer` before, include autoloader into your project. @@ -30,7 +30,7 @@ require 'path/to/vendor/autoload.php'; $client = new \RetailCrm\ApiClient( 'https://demo.retailcrm.ru', 'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH', - 'v5' + \RetailCrm\ApiClient::V5 ); try { @@ -65,7 +65,7 @@ if ($response->isSuccessful()) { $client = new \RetailCrm\ApiClient( 'https://demo.retailcrm.ru', 'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH', - 'v4' + \RetailCrm\ApiClient::V4 ); try { diff --git a/README.ru.md b/README.ru.md index 6b5d1ea..c17989b 100644 --- a/README.ru.md +++ b/README.ru.md @@ -15,7 +15,7 @@ PHP-клиент для работы с [retailCRM API](http://www.retailcrm.ru/ 2) Выполните в папке проекта: ```bash -composer require retailcrm/api-client-php 5.* --no-dev +composer require retailcrm/api-client-php ~5.0 ``` В конфиг `composer.json` вашего проекта будет добавлена библиотека `retailcrm/api-client-php`, которая установится в папку `vendor/`. При отсутствии файла конфига или папки с вендорами они будут созданы. @@ -32,7 +32,7 @@ require 'path/to/vendor/autoload.php'; $client = new \RetailCrm\ApiClient( 'https://demo.retailcrm.ru', 'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH', - 'v5' + \RetailCrm\ApiClient::V5 ); try { @@ -67,7 +67,7 @@ if ($response->isSuccessful()) { $client = new \RetailCrm\ApiClient( 'https://demo.retailcrm.ru', 'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH', - 'v4' + \RetailCrm\ApiClient::V4 ); try { diff --git a/lib/RetailCrm/ApiClient.php b/lib/RetailCrm/ApiClient.php index b589f15..a1f531e 100644 --- a/lib/RetailCrm/ApiClient.php +++ b/lib/RetailCrm/ApiClient.php @@ -34,6 +34,10 @@ class ApiClient public $request; public $version; + const V3 = 'v3'; + const V4 = 'v4'; + const V5 = 'v5'; + /** * Init version based client * @@ -43,18 +47,18 @@ class ApiClient * @param string $site site code * */ - public function __construct($url, $apiKey, $version = 'v5', $site = null) + public function __construct($url, $apiKey, $version = self::V5, $site = null) { $this->version = $version; switch ($version) { - case 'v5': + case self::V5: $this->request = new ApiVersion5($url, $apiKey, $version, $site); break; - case 'v4': + case self::V4: $this->request = new ApiVersion4($url, $apiKey, $version, $site); break; - case 'v3': + case self::V3: $this->request = new ApiVersion3($url, $apiKey, $version, $site); break; } diff --git a/lib/RetailCrm/Client/AbstractLoader.php b/lib/RetailCrm/Client/AbstractLoader.php index 061d07f..08613cd 100644 --- a/lib/RetailCrm/Client/AbstractLoader.php +++ b/lib/RetailCrm/Client/AbstractLoader.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * API client class + * Abstract API client * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Http\Client; /** * PHP version 5.4 * - * API client class + * Abstract API client class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Client/ApiVersion3.php b/lib/RetailCrm/Client/ApiVersion3.php index 30f6aa6..446c9c4 100644 --- a/lib/RetailCrm/Client/ApiVersion3.php +++ b/lib/RetailCrm/Client/ApiVersion3.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * API client class + * API client v3 * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V3; /** * PHP version 5.4 * - * API client class + * API client v3 class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Client/ApiVersion4.php b/lib/RetailCrm/Client/ApiVersion4.php index 27f686a..067b080 100644 --- a/lib/RetailCrm/Client/ApiVersion4.php +++ b/lib/RetailCrm/Client/ApiVersion4.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * API client class + * API client v4 * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V4; /** * PHP version 5.4 * - * API client class + * API client v4 class * * @category RetailCrm * @package RetailCrm @@ -49,6 +49,7 @@ class ApiVersion4 extends AbstractLoader use V4\Orders; use V4\Packs; use V4\References; + use V4\Settings; use V4\Statistic; use V4\Stores; use V4\Telephony; diff --git a/lib/RetailCrm/Client/ApiVersion5.php b/lib/RetailCrm/Client/ApiVersion5.php index cbb9c79..b8a6f3e 100644 --- a/lib/RetailCrm/Client/ApiVersion5.php +++ b/lib/RetailCrm/Client/ApiVersion5.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * API client class + * API client v5 * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V5; /** * PHP version 5.4 * - * API client class + * API client v5 class * * @category RetailCrm * @package RetailCrm @@ -46,7 +46,6 @@ class ApiVersion5 extends AbstractLoader use V5\Customers; use V5\CustomFields; use V5\Delivery; - use V5\Marketplace; use V5\Orders; use V5\Packs; use V5\References; diff --git a/lib/RetailCrm/Exception/CurlException.php b/lib/RetailCrm/Exception/CurlException.php index 922a810..900f3e5 100644 --- a/lib/RetailCrm/Exception/CurlException.php +++ b/lib/RetailCrm/Exception/CurlException.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * Class CurlException + * CurlException * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Exception/InvalidJsonException.php b/lib/RetailCrm/Exception/InvalidJsonException.php index d6288b3..08c98f7 100644 --- a/lib/RetailCrm/Exception/InvalidJsonException.php +++ b/lib/RetailCrm/Exception/InvalidJsonException.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * Class InvalidJsonException + * InvalidJsonException * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V3/Customers.php b/lib/RetailCrm/Methods/V3/Customers.php index 796f749..f6f1350 100644 --- a/lib/RetailCrm/Methods/V3/Customers.php +++ b/lib/RetailCrm/Methods/V3/Customers.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Customers * * @category RetailCrm * @package RetailCrm @@ -17,7 +17,7 @@ namespace RetailCrm\Methods\V3; /** * PHP version 5.4 * - * TaskTrait class + * Customers class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V3/Orders.php b/lib/RetailCrm/Methods/V3/Orders.php index 56bd6bc..13ba925 100644 --- a/lib/RetailCrm/Methods/V3/Orders.php +++ b/lib/RetailCrm/Methods/V3/Orders.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Orders * * @category RetailCrm * @package RetailCrm @@ -17,7 +17,7 @@ namespace RetailCrm\Methods\V3; /** * PHP version 5.4 * - * TaskTrait class + * Orders class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V3/Packs.php b/lib/RetailCrm/Methods/V3/Packs.php index c493ce3..e08713a 100644 --- a/lib/RetailCrm/Methods/V3/Packs.php +++ b/lib/RetailCrm/Methods/V3/Packs.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Packs * * @category RetailCrm * @package RetailCrm @@ -17,7 +17,7 @@ namespace RetailCrm\Methods\V3; /** * PHP version 5.4 * - * TaskTrait class + * Packs class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V3/References.php b/lib/RetailCrm/Methods/V3/References.php index 4b9279b..76075fc 100644 --- a/lib/RetailCrm/Methods/V3/References.php +++ b/lib/RetailCrm/Methods/V3/References.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * References * * @category RetailCrm * @package RetailCrm @@ -17,7 +17,7 @@ namespace RetailCrm\Methods\V3; /** * PHP version 5.4 * - * TaskTrait class + * References class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V3/Statistic.php b/lib/RetailCrm/Methods/V3/Statistic.php index ed49eb2..a98bbc7 100644 --- a/lib/RetailCrm/Methods/V3/Statistic.php +++ b/lib/RetailCrm/Methods/V3/Statistic.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * Statistic class + * Statistic * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V3/Stores.php b/lib/RetailCrm/Methods/V3/Stores.php index 8b9022b..a370764 100644 --- a/lib/RetailCrm/Methods/V3/Stores.php +++ b/lib/RetailCrm/Methods/V3/Stores.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Stores * * @category RetailCrm * @package RetailCrm @@ -17,7 +17,7 @@ namespace RetailCrm\Methods\V3; /** * PHP version 5.4 * - * TaskTrait class + * Stores class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V4/Customers.php b/lib/RetailCrm/Methods/V4/Customers.php index 0ccf28d..b850061 100644 --- a/lib/RetailCrm/Methods/V4/Customers.php +++ b/lib/RetailCrm/Methods/V4/Customers.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Customers * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V3\Customers as Previous; /** * PHP version 5.4 * - * TaskTrait class + * Customers class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V4/Delivery.php b/lib/RetailCrm/Methods/V4/Delivery.php index 6c15a01..e2d22fb 100644 --- a/lib/RetailCrm/Methods/V4/Delivery.php +++ b/lib/RetailCrm/Methods/V4/Delivery.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Delivery * * @category RetailCrm * @package RetailCrm @@ -17,7 +17,7 @@ namespace RetailCrm\Methods\V4; /** * PHP version 5.4 * - * TaskTrait class + * Delivery class * * @category RetailCrm * @package RetailCrm @@ -50,32 +50,6 @@ trait Delivery ); } - /** - * Edit delivery configuration - * - * @param array $configuration - * - * @throws \RetailCrm\Exception\InvalidJsonException - * @throws \RetailCrm\Exception\CurlException - * @throws \InvalidArgumentException - * - * @return \RetailCrm\Response\ApiResponse - */ - public function deliverySettingsEdit(array $configuration) - { - if (!count($configuration) || empty($configuration['code'])) { - throw new \InvalidArgumentException( - 'Parameter `configuration` must contains a data & configuration `code` must be set' - ); - } - - return $this->client->makeRequest( - sprintf('/delivery/generic/setting/%s/edit', $configuration['code']), - "POST", - ['configuration' => json_encode($configuration)] - ); - } - /** * Delivery tracking update * diff --git a/lib/RetailCrm/Methods/V4/Orders.php b/lib/RetailCrm/Methods/V4/Orders.php index dc8bb80..d34e752 100644 --- a/lib/RetailCrm/Methods/V4/Orders.php +++ b/lib/RetailCrm/Methods/V4/Orders.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Orders * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V3\Orders as Previous; /** * PHP version 5.4 * - * TaskTrait class + * Orders class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V4/Packs.php b/lib/RetailCrm/Methods/V4/Packs.php index 04fc4b9..da00cfc 100644 --- a/lib/RetailCrm/Methods/V4/Packs.php +++ b/lib/RetailCrm/Methods/V4/Packs.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Packs * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V3\Packs as Previous; /** * PHP version 5.4 * - * TaskTrait class + * Packs class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V4/References.php b/lib/RetailCrm/Methods/V4/References.php index e40f454..92a0404 100644 --- a/lib/RetailCrm/Methods/V4/References.php +++ b/lib/RetailCrm/Methods/V4/References.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * References * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V3\References as Previous; /** * PHP version 5.4 * - * TaskTrait class + * References class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V4/Settings.php b/lib/RetailCrm/Methods/V4/Settings.php new file mode 100644 index 0000000..e0167fd --- /dev/null +++ b/lib/RetailCrm/Methods/V4/Settings.php @@ -0,0 +1,186 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + */ + +namespace RetailCrm\Methods\V4; + +/** + * PHP version 5.4 + * + * Settings class + * + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + */ +trait Settings +{ + + /** + * Edit store configuration + * + * @param array $configuration + * + * @throws \RetailCrm\Exception\InvalidJsonException + * @throws \RetailCrm\Exception\CurlException + * @throws \InvalidArgumentException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function storeSettingsEdit(array $configuration) + { + if (!count($configuration) || empty($configuration['code'])) { + throw new \InvalidArgumentException( + 'Parameter `configuration` must contains a data & configuration `code` must be set' + ); + } + + return $this->client->makeRequest( + sprintf('/store/setting/%s/edit', $configuration['code']), + "POST", + ['configuration' => json_encode($configuration)] + ); + } + + /** + * Edit telephony settings + * + * @param string $code symbolic code + * @param string $clientId client id + * @param boolean $active telephony activity + * @param mixed $name service name + * @param mixed $makeCallUrl service init url + * @param mixed $image service logo url(svg file) + * + * @param array $additionalCodes + * @param array $externalPhones + * @param bool $allowEdit + * @param bool $inputEventSupported + * @param bool $outputEventSupported + * @param bool $hangupEventSupported + * @param bool $changeUserStatusUrl + * + * @return \RetailCrm\Response\ApiResponse + */ + public function telephonySettingsEdit( + $code, + $clientId, + $active = false, + $name = false, + $makeCallUrl = false, + $image = false, + $additionalCodes = [], + $externalPhones = [], + $allowEdit = false, + $inputEventSupported = false, + $outputEventSupported = false, + $hangupEventSupported = false, + $changeUserStatusUrl = false + ) { + if (!isset($code)) { + throw new \InvalidArgumentException('Code must be set'); + } + + $parameters['code'] = $code; + + if (!isset($clientId)) { + throw new \InvalidArgumentException('client id must be set'); + } + + $parameters['clientId'] = $clientId; + + if (!isset($active)) { + $parameters['active'] = false; + } else { + $parameters['active'] = $active; + } + + if (!isset($name)) { + throw new \InvalidArgumentException('name must be set'); + } + + if (isset($name)) { + $parameters['name'] = $name; + } + + if (isset($makeCallUrl)) { + $parameters['makeCallUrl'] = $makeCallUrl; + } + + if (isset($image)) { + $parameters['image'] = $image; + } + + if (isset($additionalCodes)) { + $parameters['additionalCodes'] = $additionalCodes; + } + + if (isset($externalPhones)) { + $parameters['externalPhones'] = $externalPhones; + } + + if (isset($allowEdit)) { + $parameters['allowEdit'] = $allowEdit; + } + + if (isset($inputEventSupported)) { + $parameters['inputEventSupported'] = $inputEventSupported; + } + + if (isset($outputEventSupported)) { + $parameters['outputEventSupported'] = $outputEventSupported; + } + + if (isset($hangupEventSupported)) { + $parameters['hangupEventSupported'] = $hangupEventSupported; + } + + if (isset($changeUserStatusUrl)) { + $parameters['changeUserStatusUrl'] = $changeUserStatusUrl; + } + + return $this->client->makeRequest( + "/telephony/setting/$code/edit", + "POST", + ['configuration' => json_encode($parameters)] + ); + } + + /** + * Edit delivery configuration + * + * @param array $configuration + * + * @throws \RetailCrm\Exception\InvalidJsonException + * @throws \RetailCrm\Exception\CurlException + * @throws \InvalidArgumentException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function deliverySettingsEdit(array $configuration) + { + if (!count($configuration) || empty($configuration['code'])) { + throw new \InvalidArgumentException( + 'Parameter `configuration` must contains a data & configuration `code` must be set' + ); + } + + return $this->client->makeRequest( + sprintf('/delivery/generic/setting/%s/edit', $configuration['code']), + "POST", + ['configuration' => json_encode($configuration)] + ); + } +} diff --git a/lib/RetailCrm/Methods/V4/Statistic.php b/lib/RetailCrm/Methods/V4/Statistic.php index be8bb8a..ebe3841 100644 --- a/lib/RetailCrm/Methods/V4/Statistic.php +++ b/lib/RetailCrm/Methods/V4/Statistic.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Statistic * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V3\Statistic as Previous; /** * PHP version 5.4 * - * TaskTrait class + * Statistic class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V4/Stores.php b/lib/RetailCrm/Methods/V4/Stores.php index 69e8515..7a2a21b 100644 --- a/lib/RetailCrm/Methods/V4/Stores.php +++ b/lib/RetailCrm/Methods/V4/Stores.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Stores * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V3\Stores as Previous; /** * PHP version 5.4 * - * TaskTrait class + * Stores class * * @category RetailCrm * @package RetailCrm @@ -55,31 +55,6 @@ trait Stores ); } - /** - * Edit store configuration - * - * @param array $configuration - * - * @throws \RetailCrm\Exception\InvalidJsonException - * @throws \RetailCrm\Exception\CurlException - * @throws \InvalidArgumentException - * - * @return \RetailCrm\Response\ApiResponse - */ - public function storeSettingsEdit(array $configuration) - { - if (!count($configuration) || empty($configuration['code'])) { - throw new \InvalidArgumentException( - 'Parameter `configuration` must contains a data & configuration `code` must be set' - ); - } - - return $this->client->makeRequest( - sprintf('/store/setting/%s/edit', $configuration['code']), - "POST", - ['configuration' => json_encode($configuration)] - ); - } /** * Upload store prices diff --git a/lib/RetailCrm/Methods/V4/Telephony.php b/lib/RetailCrm/Methods/V4/Telephony.php index c9bac37..d5ccb15 100644 --- a/lib/RetailCrm/Methods/V4/Telephony.php +++ b/lib/RetailCrm/Methods/V4/Telephony.php @@ -30,108 +30,4 @@ use RetailCrm\Methods\V3\Telephony as Previous; trait Telephony { use Previous; - - /** - * Edit telephony settings - * - * @param string $code symbolic code - * @param string $clientId client id - * @param boolean $active telephony activity - * @param mixed $name service name - * @param mixed $makeCallUrl service init url - * @param mixed $image service logo url(svg file) - * - * @param array $additionalCodes - * @param array $externalPhones - * @param bool $allowEdit - * @param bool $inputEventSupported - * @param bool $outputEventSupported - * @param bool $hangupEventSupported - * @param bool $changeUserStatusUrl - * - * @return \RetailCrm\Response\ApiResponse - */ - public function telephonySettingsEdit( - $code, - $clientId, - $active = false, - $name = false, - $makeCallUrl = false, - $image = false, - $additionalCodes = [], - $externalPhones = [], - $allowEdit = false, - $inputEventSupported = false, - $outputEventSupported = false, - $hangupEventSupported = false, - $changeUserStatusUrl = false - ) { - if (!isset($code)) { - throw new \InvalidArgumentException('Code must be set'); - } - - $parameters['code'] = $code; - - if (!isset($clientId)) { - throw new \InvalidArgumentException('client id must be set'); - } - - $parameters['clientId'] = $clientId; - - if (!isset($active)) { - $parameters['active'] = false; - } else { - $parameters['active'] = $active; - } - - if (!isset($name)) { - throw new \InvalidArgumentException('name must be set'); - } - - if (isset($name)) { - $parameters['name'] = $name; - } - - if (isset($makeCallUrl)) { - $parameters['makeCallUrl'] = $makeCallUrl; - } - - if (isset($image)) { - $parameters['image'] = $image; - } - - if (isset($additionalCodes)) { - $parameters['additionalCodes'] = $additionalCodes; - } - - if (isset($externalPhones)) { - $parameters['externalPhones'] = $externalPhones; - } - - if (isset($allowEdit)) { - $parameters['allowEdit'] = $allowEdit; - } - - if (isset($inputEventSupported)) { - $parameters['inputEventSupported'] = $inputEventSupported; - } - - if (isset($outputEventSupported)) { - $parameters['outputEventSupported'] = $outputEventSupported; - } - - if (isset($hangupEventSupported)) { - $parameters['hangupEventSupported'] = $hangupEventSupported; - } - - if (isset($changeUserStatusUrl)) { - $parameters['changeUserStatusUrl'] = $changeUserStatusUrl; - } - - return $this->client->makeRequest( - "/telephony/setting/$code/edit", - "POST", - ['configuration' => json_encode($parameters)] - ); - } } diff --git a/lib/RetailCrm/Methods/V4/Users.php b/lib/RetailCrm/Methods/V4/Users.php index 8f778cf..5180f52 100644 --- a/lib/RetailCrm/Methods/V4/Users.php +++ b/lib/RetailCrm/Methods/V4/Users.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Users * * @category RetailCrm * @package RetailCrm @@ -17,7 +17,7 @@ namespace RetailCrm\Methods\V4; /** * PHP version 5.4 * - * TaskTrait class + * Users class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V5/Customers.php b/lib/RetailCrm/Methods/V5/Customers.php index 2c420ff..6c29a36 100644 --- a/lib/RetailCrm/Methods/V5/Customers.php +++ b/lib/RetailCrm/Methods/V5/Customers.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Customers * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V4\Customers as Previous; /** * PHP version 5.4 * - * TaskTrait class + * Customers class * * @category RetailCrm * @package RetailCrm @@ -115,12 +115,12 @@ trait Customers return $this->client->makeRequest( '/customers/notes/create', "POST", - ['note' => json_encode($note)] + $this->fillSite($site, ['note' => json_encode($note)]) ); } /** - * Create customer note + * Delete customer note * * @param integer $id * diff --git a/lib/RetailCrm/Methods/V5/Delivery.php b/lib/RetailCrm/Methods/V5/Delivery.php index 71ce0a0..0469177 100644 --- a/lib/RetailCrm/Methods/V5/Delivery.php +++ b/lib/RetailCrm/Methods/V5/Delivery.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Delivery * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V4\Delivery as Previous; /** * PHP version 5.4 * - * TaskTrait class + * Delivery class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V5/Marketplace.php b/lib/RetailCrm/Methods/V5/Marketplace.php deleted file mode 100644 index 0611933..0000000 --- a/lib/RetailCrm/Methods/V5/Marketplace.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 - */ - -namespace RetailCrm\Methods\V5; - -use RetailCrm\Methods\V4\Marketplace as Previous; - -/** - * PHP version 5.4 - * - * Marketplace class - * - * @category RetailCrm - * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 - */ -trait Marketplace -{ - use Previous; -} diff --git a/lib/RetailCrm/Methods/V5/Orders.php b/lib/RetailCrm/Methods/V5/Orders.php index 3116310..5c2e7b2 100644 --- a/lib/RetailCrm/Methods/V5/Orders.php +++ b/lib/RetailCrm/Methods/V5/Orders.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Orders * * @category RetailCrm * @package RetailCrm @@ -14,13 +14,12 @@ namespace RetailCrm\Methods\V5; -use RetailCrm\Response\ApiResponse; use RetailCrm\Methods\V4\Orders as Previous; /** * PHP version 5.4 * - * TaskTrait class + * Orders class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V5/Packs.php b/lib/RetailCrm/Methods/V5/Packs.php index 6db3a02..c514ed5 100644 --- a/lib/RetailCrm/Methods/V5/Packs.php +++ b/lib/RetailCrm/Methods/V5/Packs.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Packs * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V4\Packs as Previous; /** * PHP version 5.4 * - * TaskTrait class + * Packs class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V5/References.php b/lib/RetailCrm/Methods/V5/References.php index df6caf4..a51e72e 100644 --- a/lib/RetailCrm/Methods/V5/References.php +++ b/lib/RetailCrm/Methods/V5/References.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * References * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V4\References as Previous; /** * PHP version 5.4 * - * TaskTrait class + * References class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V5/Statistic.php b/lib/RetailCrm/Methods/V5/Statistic.php index c0e11c6..76c02b4 100644 --- a/lib/RetailCrm/Methods/V5/Statistic.php +++ b/lib/RetailCrm/Methods/V5/Statistic.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Statistic * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V3\Statistic as Previous; /** * PHP version 5.4 * - * TaskTrait class + * Statistic class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V5/Stores.php b/lib/RetailCrm/Methods/V5/Stores.php index 8100fca..93a7c7f 100644 --- a/lib/RetailCrm/Methods/V5/Stores.php +++ b/lib/RetailCrm/Methods/V5/Stores.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Stores * * @category RetailCrm * @package RetailCrm @@ -19,7 +19,7 @@ use RetailCrm\Methods\V4\Stores as Previous; /** * PHP version 5.4 * - * TaskTrait class + * Stores class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V5/Tasks.php b/lib/RetailCrm/Methods/V5/Tasks.php index 5892e89..4f96811 100644 --- a/lib/RetailCrm/Methods/V5/Tasks.php +++ b/lib/RetailCrm/Methods/V5/Tasks.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Tasks * * @category RetailCrm * @package RetailCrm @@ -17,7 +17,7 @@ namespace RetailCrm\Methods\V5; /** * PHP version 5.4 * - * TaskTrait class + * Tasks class * * @category RetailCrm * @package RetailCrm diff --git a/lib/RetailCrm/Methods/V5/Users.php b/lib/RetailCrm/Methods/V5/Users.php index 82b1331..ab3ee70 100644 --- a/lib/RetailCrm/Methods/V5/Users.php +++ b/lib/RetailCrm/Methods/V5/Users.php @@ -3,7 +3,7 @@ /** * PHP version 5.4 * - * TaskTrait + * Users * * @category RetailCrm * @package RetailCrm @@ -20,7 +20,7 @@ use RetailCrm\Methods\V4\Users as Previous; /** * PHP version 5.4 * - * TaskTrait class + * Users class * * @category RetailCrm * @package RetailCrm diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php index 232ee98..73cb1a5 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php @@ -34,7 +34,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersCreate() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $externalId = 'c-create-' . time(); @@ -59,7 +59,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCreateExceptionEmpty() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $client->request->customersCreate([]); } @@ -73,7 +73,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersGet(array $ids) { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->customersGet(678678678); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -99,7 +99,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersGetException() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $client->request->customersGet(678678678, 'asdf'); } @@ -111,7 +111,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersEdit(array $ids) { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->customersEdit( [ @@ -138,7 +138,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersEditExceptionEmpty() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $client->request->customersEdit([], 'asdf'); } @@ -148,7 +148,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersEditException() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $client->request->customersEdit(['id' => 678678678], 'asdf'); } @@ -157,7 +157,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersList() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->customersList(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -185,7 +185,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersFixExternalIdsException() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $client->request->customersFixExternalIds([]); } @@ -194,7 +194,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersFixExternalIds() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->ordersCreate([ 'firstName' => 'Aaa111', @@ -246,7 +246,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersUploadExceptionEmpty() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $client->request->customersUpload([]); } @@ -255,7 +255,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersUpload() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $externalIdA = 'upload-a-' . time(); $externalIdB = 'upload-b-' . time(); diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php index 974a555..48363b7 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php @@ -34,7 +34,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersCreate() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $externalId = 'o-create-' . time(); @@ -58,7 +58,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersCreateExceptionEmpty() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $client->request->ordersCreate([]); } @@ -70,7 +70,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersStatuses(array $ids) { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->ordersStatuses(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -117,7 +117,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersGet(array $ids) { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->ordersGet(678678678); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -143,7 +143,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersGetException() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $client->request->ordersGet(678678678, 'asdf'); } @@ -155,7 +155,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersEdit(array $ids) { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->ordersEdit( [ @@ -182,7 +182,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersEditExceptionEmpty() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $client->request->ordersEdit([], 'asdf'); } @@ -192,7 +192,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersEditException() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $client->request->ordersEdit(['id' => 678678678], 'asdf'); } @@ -201,7 +201,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersHistory() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->ordersHistory(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -214,7 +214,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersList() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->ordersList(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -238,7 +238,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersFixExternalIdsException() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $client->request->ordersFixExternalIds([]); } @@ -247,7 +247,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersFixExternalIds() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->ordersCreate([ 'firstName' => 'Aaa', @@ -292,7 +292,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersUploadExceptionEmpty() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $client->request->ordersUpload([]); } @@ -301,7 +301,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersUpload() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $externalIdA = 'upload-a-' . time(); $externalIdB = 'upload-b-' . time(); diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php index 4ac9251..4844b15 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php @@ -34,7 +34,7 @@ class ApiClientReferenceTest extends TestCase */ public function testList($name) { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $method = $name . 'List'; $response = $client->request->$method(); @@ -56,7 +56,7 @@ class ApiClientReferenceTest extends TestCase */ public function testEditingException($name) { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $method = $name . 'Edit'; $client->request->$method([]); @@ -70,7 +70,7 @@ class ApiClientReferenceTest extends TestCase */ public function testEditing($name) { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $code = 'dict-' . strtolower($name) . '-' . time(); $method = $name . 'Edit'; @@ -104,7 +104,7 @@ class ApiClientReferenceTest extends TestCase public function testSiteEditing() { $name = 'sites'; - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $code = 'dict-' . strtolower($name) . '-' . time(); $method = $name . 'Edit'; diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php index 4034756..7389ef6 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php @@ -35,7 +35,7 @@ class ApiClientStoreTest extends TestCase */ public function testStoreCreate() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->storesEdit(['name' => self::SNAME, 'code' => self::SCODE]); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -48,7 +48,7 @@ class ApiClientStoreTest extends TestCase */ public function testStoreInventories() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->storeInventories(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -66,7 +66,7 @@ class ApiClientStoreTest extends TestCase */ public function testInventoriesException() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $client->request->storeInventoriesUpload([]); } @@ -75,7 +75,7 @@ class ApiClientStoreTest extends TestCase */ public function testInventoriesUpload() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->storeInventoriesUpload([ [ @@ -109,7 +109,7 @@ class ApiClientStoreTest extends TestCase */ public function testInventoriesFailed() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $externalIdA = 'upload-a-' . time(); $externalIdB = 'upload-b-' . time(); @@ -136,7 +136,7 @@ class ApiClientStoreTest extends TestCase */ public function testStoreProducts() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->storeProducts(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php index eb5d727..6b91584 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php @@ -40,7 +40,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonySettingsEdit() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->telephonySettingsEdit( self::TEL_CODE, @@ -67,7 +67,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonySettingsGet() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->telephonySettingsGet(self::TEL_CODE); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -84,7 +84,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyEvent() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->telephonyCallEvent( '+79999999999', @@ -109,7 +109,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyUpload() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->telephonyCallsUpload( [ @@ -148,7 +148,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyManager() { - $client = static::getApiClient(null, null, 'v4'); + $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); $response = $client->request->telephonyCallManager('+79999999999', 1); diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php index f59f565..1f52337 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php @@ -34,7 +34,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersCreate() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $externalId = 'o-create-' . time(); @@ -58,7 +58,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersCreateExceptionEmpty() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $client->request->ordersCreate([]); } @@ -70,7 +70,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersStatuses(array $ids) { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $response = $client->request->ordersStatuses(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -117,7 +117,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersGet(array $ids) { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $response = $client->request->ordersGet(678678678); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -143,7 +143,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersGetException() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $client->request->ordersGet(678678678, 'asdf'); } @@ -155,7 +155,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersEdit(array $ids) { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $response = $client->request->ordersEdit( [ @@ -182,7 +182,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersEditExceptionEmpty() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $client->request->ordersEdit([], 'asdf'); } @@ -192,7 +192,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersEditException() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $client->request->ordersEdit(['id' => 678678678], 'asdf'); } @@ -201,7 +201,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersHistory() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $response = $client->request->ordersHistory(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -214,7 +214,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersList() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $response = $client->request->ordersList(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -238,7 +238,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersFixExternalIdsException() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $client->request->ordersFixExternalIds([]); } @@ -247,7 +247,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersFixExternalIds() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $response = $client->request->ordersCreate([ 'firstName' => 'Aaa', @@ -292,7 +292,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersUploadExceptionEmpty() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $client->request->ordersUpload([]); } @@ -301,7 +301,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersUpload() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $externalIdA = 'upload-a-' . time(); $externalIdB = 'upload-b-' . time(); @@ -335,7 +335,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersCombine() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $responseCreateFirst = $client->request->ordersCreate([ 'firstName' => 'Aaa111', @@ -372,7 +372,7 @@ class ApiClientOrdersTest extends TestCase public function testOrdersPayment() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $externalId = 'AA-' . time(); $responseCreateFirst = $client->request->ordersCreate([ diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientPacksTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientPacksTest.php index 34d6991..5f246d5 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientPacksTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientPacksTest.php @@ -32,7 +32,7 @@ class ApiClientPacksTest extends TestCase */ public function testPacksHistory() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $response = $client->request->ordersPacksHistory(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -53,7 +53,8 @@ class ApiClientPacksTest extends TestCase */ public function testPacksCreateFailed() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); + $pack = [ 'itemId' => 12, 'store' => 'test', diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientPricesTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientPricesTest.php index 07cc993..b1a9238 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientPricesTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientPricesTest.php @@ -33,8 +33,7 @@ class ApiClientPricesTest extends TestCase */ public function testPricesEdit() { - - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $response = $client->request->pricesTypesEdit( [ @@ -56,8 +55,7 @@ class ApiClientPricesTest extends TestCase */ public function testPricesGet() { - $client = static::getApiClient(null, null, "v5"); - + $client = static::getApiClient(); $response = $client->request->pricesTypes(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertTrue(in_array($response->getStatusCode(), [200, 201])); @@ -72,7 +70,7 @@ class ApiClientPricesTest extends TestCase */ public function testPricesUploadExceptionEmpty() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $client->request->storePricesUpload([]); } @@ -82,7 +80,8 @@ class ApiClientPricesTest extends TestCase */ public function testPricesUpload() { - $client = static::getApiClient(null, null, "v5"); + + $client = static::getApiClient(); $xmlIdA = 'upload-a-' . time(); $xmlIdB = 'upload-b-' . time(); diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php index da64adf..646e34a 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php @@ -34,7 +34,8 @@ class ApiClientReferenceTest extends TestCase */ public function testList($name) { - $client = static::getApiClient(null, null, "v5"); + + $client = static::getApiClient(); $method = $name . 'List'; $response = $client->request->$method(); @@ -56,7 +57,8 @@ class ApiClientReferenceTest extends TestCase */ public function testEditingException($name) { - $client = static::getApiClient(null, null, "v5"); + + $client = static::getApiClient(); $method = $name . 'Edit'; $client->request->$method([]); @@ -70,7 +72,8 @@ class ApiClientReferenceTest extends TestCase */ public function testEditing($name) { - $client = static::getApiClient(null, null, "v5"); + + $client = static::getApiClient(); $code = 'dict-' . strtolower($name) . '-' . time(); $method = $name . 'Edit'; @@ -104,7 +107,8 @@ class ApiClientReferenceTest extends TestCase public function testSiteEditing() { $name = 'sites'; - $client = static::getApiClient(null, null, "v5"); + + $client = static::getApiClient(); $code = 'dict-' . strtolower($name) . '-' . time(); $method = $name . 'Edit'; diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php index cbb4a66..1948cbe 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php @@ -35,7 +35,8 @@ class ApiClientStoreTest extends TestCase */ public function testStoreCreate() { - $client = static::getApiClient(null, null, "v5"); + + $client = static::getApiClient(); $response = $client->request->storesEdit(['name' => self::SNAME, 'code' => self::SCODE]); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -48,7 +49,8 @@ class ApiClientStoreTest extends TestCase */ public function testStoreInventories() { - $client = static::getApiClient(null, null, "v5"); + + $client = static::getApiClient(); $response = $client->request->storeInventories(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -66,7 +68,8 @@ class ApiClientStoreTest extends TestCase */ public function testInventoriesException() { - $client = static::getApiClient(null, null, "v5"); + + $client = static::getApiClient(); $client->request->storeInventoriesUpload([]); } @@ -75,7 +78,8 @@ class ApiClientStoreTest extends TestCase */ public function testInventoriesUpload() { - $client = static::getApiClient(null, null, "v5"); + + $client = static::getApiClient(); $response = $client->request->storeInventoriesUpload([ [ @@ -109,7 +113,8 @@ class ApiClientStoreTest extends TestCase */ public function testInventoriesFailed() { - $client = static::getApiClient(null, null, "v5"); + + $client = static::getApiClient(); $externalIdA = 'upload-a-' . time(); $externalIdB = 'upload-b-' . time(); @@ -136,7 +141,8 @@ class ApiClientStoreTest extends TestCase */ public function testStoreProducts() { - $client = static::getApiClient(null, null, "v5"); + + $client = static::getApiClient(); $response = $client->request->storeProducts(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -149,7 +155,8 @@ class ApiClientStoreTest extends TestCase */ public function testStoreProductsGroups() { - $client = static::getApiClient(null, null, "v5"); + + $client = static::getApiClient(); $response = $client->request->storeProductsGroups(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php index ca0a623..024ef9b 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php @@ -32,8 +32,8 @@ class ApiClientTasksTest extends TestCase */ public function testTasksList() { - $client = static::getApiClient(null, null, 'v5'); + $client = static::getApiClient(); $response = $client->request->tasksList(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -46,14 +46,14 @@ class ApiClientTasksTest extends TestCase */ public function testTasksCreateExceptionEmpty() { - $client = static::getApiClient(null, null, 'v5'); + $client = static::getApiClient(); $client->request->tasksCreate([]); } public function testTasksCRU() { - $client = static::getApiClient(null, null, 'v5'); + $client = static::getApiClient(); $task = [ 'text' => 'test task', 'commentary' => 'test task commentary', diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php index 7faaee4..9520474 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php @@ -31,33 +31,6 @@ class ApiClientTelephonyTest extends TestCase const TEL_CLIENT = '456'; const TEL_IMAGE = 'http://www.mec.ph/horizon/wp-content/uploads/2011/11/telephony.svg'; - /** - * Settings Edit test - * - * @group telephony - * - * @return void - */ - public function testTelephonySettingsEdit() - { - $client = static::getApiClient(null, null, "v5"); - - $response = $client->request->telephonySettingsEdit( - self::TEL_CODE, - self::TEL_CLIENT, - true, - 'TestTelephonyV5', - false, - self::TEL_IMAGE, - [['userId' => $_SERVER['CRM_USER_ID'], 'code' => '101']], - [['siteCode' => 'api-client-php', 'externalPhone' => '+74950000000']] - ); - - static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); - static::assertTrue(in_array($response->getStatusCode(), [200, 201])); - static::assertTrue($response->isSuccessful()); - } - /** * Settings Get test * @@ -67,8 +40,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonySettingsGet() { - $client = static::getApiClient(null, null, "v5"); - + $client = static::getApiClient(); $response = $client->request->telephonySettingsGet(self::TEL_CODE); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertEquals(200, $response->getStatusCode()); @@ -84,8 +56,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyEvent() { - $client = static::getApiClient(null, null, "v5"); - + $client = static::getApiClient(); $response = $client->request->telephonyCallEvent( '+79999999999', 'in', @@ -109,8 +80,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyUpload() { - $client = static::getApiClient(null, null, "v5"); - + $client = static::getApiClient(); $response = $client->request->telephonyCallsUpload( [ [ @@ -148,8 +118,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyManager() { - $client = static::getApiClient(null, null, "v5"); - + $client = static::getApiClient(); $response = $client->request->telephonyCallManager('+79999999999', 1); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php index 15e912c..d107a69 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php @@ -32,7 +32,7 @@ class ApiClientUsersTest extends TestCase */ public function testUsersGroups() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $response = $client->request->usersGroups(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -45,7 +45,7 @@ class ApiClientUsersTest extends TestCase */ public function testUsersList() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); $response = $client->request->usersList(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -58,8 +58,7 @@ class ApiClientUsersTest extends TestCase */ public function testUsersGet() { - $client = static::getApiClient(null, null, "v5"); - + $client = static::getApiClient(); $response = $client->request->usersGet($_SERVER["CRM_USER_ID"]); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertTrue(in_array($response->getStatusCode(), [200, 201])); @@ -71,8 +70,7 @@ class ApiClientUsersTest extends TestCase */ public function testUsersStatus() { - $client = static::getApiClient(null, null, "v5"); - + $client = static::getApiClient(); $response = $client->request->usersStatus($_SERVER["CRM_USER_ID"], 'dinner'); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertTrue(in_array($response->getStatusCode(), [200, 201])); From 9aab02c189ccd20782e29270d822d21474f15095 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Mon, 24 Jul 2017 15:12:13 +0300 Subject: [PATCH 02/41] Payment delete & custom dictionary creation fix (#46) --- lib/RetailCrm/Methods/V5/CustomFields.php | 2 +- lib/RetailCrm/Methods/V5/Orders.php | 37 +++++++++++++++---- .../Methods/Version5/ApiClientOrdersTest.php | 11 ++++-- 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/lib/RetailCrm/Methods/V5/CustomFields.php b/lib/RetailCrm/Methods/V5/CustomFields.php index 9e87ba7..898878c 100644 --- a/lib/RetailCrm/Methods/V5/CustomFields.php +++ b/lib/RetailCrm/Methods/V5/CustomFields.php @@ -196,7 +196,7 @@ trait CustomFields } return $this->client->makeRequest( - "/custom-fields/dictionaries/{$customDictionary['code']}/create", + "/custom-fields/dictionaries/create", "POST", ['customDictionary' => json_encode($customDictionary)] ); diff --git a/lib/RetailCrm/Methods/V5/Orders.php b/lib/RetailCrm/Methods/V5/Orders.php index 5c2e7b2..182e677 100644 --- a/lib/RetailCrm/Methods/V5/Orders.php +++ b/lib/RetailCrm/Methods/V5/Orders.php @@ -94,14 +94,14 @@ trait Orders } /** - * Edit an order payment - * - * @param array $payment order data - * @param string $by by key - * @param null $site site code - * - * @return \RetailCrm\Response\ApiResponse - */ + * Edit an order payment + * + * @param array $payment order data + * @param string $by by key + * @param null $site site code + * + * @return \RetailCrm\Response\ApiResponse + */ public function ordersPaymentEdit(array $payment, $by = 'id', $site = null) { if (!count($payment)) { @@ -127,4 +127,25 @@ trait Orders ) ); } + + /** + * Edit an order payment + * + * @param string $id payment id + * + * @return \RetailCrm\Response\ApiResponse + */ + public function ordersPaymentDelete($id) + { + if (!$id) { + throw new \InvalidArgumentException( + 'Parameter `id` must be set' + ); + } + + return $this->client->makeRequest( + sprintf('/orders/payments/%s/delete', $id), + "POST" + ); + } } diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php index 1f52337..eb89928 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php @@ -403,10 +403,8 @@ class ApiClientOrdersTest extends TestCase $paymentEdit = [ 'id' => $response['id'], - 'externalId' => $externalId, 'amount' => 1500, 'comment' => 'test payment!', - 'type' => 'cash', 'status' => 'paid' ]; @@ -414,7 +412,14 @@ class ApiClientOrdersTest extends TestCase static::assertTrue( $responseAgain->isSuccessful(), - 'Got payment' + 'Edit payment' + ); + + $responseLast = $client->request->ordersPaymentDelete($response['id']); + + static::assertTrue( + $responseLast->isSuccessful(), + 'Delete payment' ); } } From 3dd663e7a640281afcd77f7307fc907a19cb2e64 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Fri, 28 Jul 2017 10:11:47 +0300 Subject: [PATCH 03/41] Update CustomFields.php --- lib/RetailCrm/Methods/V5/CustomFields.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/RetailCrm/Methods/V5/CustomFields.php b/lib/RetailCrm/Methods/V5/CustomFields.php index 898878c..ed6c296 100644 --- a/lib/RetailCrm/Methods/V5/CustomFields.php +++ b/lib/RetailCrm/Methods/V5/CustomFields.php @@ -77,7 +77,7 @@ trait CustomFields ); } - if (empty($entity) || $entity != 'customer' || $entity != 'order') { + if (empty($entity) || !in_array($entity, ['customer', 'order'])) { throw new \InvalidArgumentException( 'Parameter `entity` must contain a data & value must be `order` or `customer`' ); @@ -106,7 +106,7 @@ trait CustomFields ); } - if (empty($entity) || $entity != 'customer' || $entity != 'order') { + if (empty($entity) || !in_array($entity, ['customer', 'order'])) { throw new \InvalidArgumentException( 'Parameter `entity` must contain a data & value must be `order` or `customer`' ); @@ -135,7 +135,7 @@ trait CustomFields ); } - if (empty($entity) || $entity != 'customer' || $entity != 'order') { + if (empty($entity) || !in_array($entity, ['customer', 'order'])) { throw new \InvalidArgumentException( 'Parameter `entity` must contain a data & value must be `order` or `customer`' ); From 25f9010793ca6a00c55a3f7dc56a2992466049d5 Mon Sep 17 00:00:00 2001 From: Vladimir Stakheev Date: Fri, 18 Aug 2017 11:16:21 +0500 Subject: [PATCH 04/41] add site attribute in ordersPaymentCreate method --- lib/RetailCrm/Methods/V5/Orders.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/RetailCrm/Methods/V5/Orders.php b/lib/RetailCrm/Methods/V5/Orders.php index 182e677..8099925 100644 --- a/lib/RetailCrm/Methods/V5/Orders.php +++ b/lib/RetailCrm/Methods/V5/Orders.php @@ -71,6 +71,7 @@ trait Orders * Create an order payment * * @param array $payment order data + * @param null $site site code * * @throws \InvalidArgumentException * @throws \RetailCrm\Exception\CurlException @@ -78,7 +79,7 @@ trait Orders * * @return \RetailCrm\Response\ApiResponse */ - public function ordersPaymentCreate(array $payment) + public function ordersPaymentCreate(array $payment, $site = null) { if (!count($payment)) { throw new \InvalidArgumentException( @@ -89,7 +90,10 @@ trait Orders return $this->client->makeRequest( '/orders/payments/create', "POST", - ['payment' => json_encode($payment)] + $this->fillSite( + $site, + ['payment' => json_encode($payment)] + ) ); } From 93c204f32243b9856ae0036e039cc62457b005a2 Mon Sep 17 00:00:00 2001 From: Dmitry Mamontov Date: Sat, 23 Sep 2017 19:02:05 +0300 Subject: [PATCH 05/41] Fix customFieldsEdit url --- lib/RetailCrm/Methods/V5/CustomFields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/RetailCrm/Methods/V5/CustomFields.php b/lib/RetailCrm/Methods/V5/CustomFields.php index ed6c296..3659ae8 100644 --- a/lib/RetailCrm/Methods/V5/CustomFields.php +++ b/lib/RetailCrm/Methods/V5/CustomFields.php @@ -113,7 +113,7 @@ trait CustomFields } return $this->client->makeRequest( - "/custom-fields/$entity/edit/{$customField['code']}", + "/custom-fields/$entity/{$customField['code']}/edit", "POST", ['customField' => json_encode($customField)] ); From ada3de8770e21f7d624d22f30ca9c076ba4183bf Mon Sep 17 00:00:00 2001 From: Alexander Kulinich Date: Wed, 27 Sep 2017 16:59:56 +0300 Subject: [PATCH 06/41] added availlableVersions() and credentials() --- lib/RetailCrm/Client/AbstractLoader.php | 30 ++++++++++ lib/RetailCrm/Http/Client.php | 6 +- .../Tests/Methods/CommonMethodsTest.php | 57 +++++++++++++++++++ 3 files changed, 91 insertions(+), 2 deletions(-) mode change 100644 => 100755 lib/RetailCrm/Client/AbstractLoader.php mode change 100644 => 100755 lib/RetailCrm/Http/Client.php create mode 100755 tests/RetailCrm/Tests/Methods/CommonMethodsTest.php diff --git a/lib/RetailCrm/Client/AbstractLoader.php b/lib/RetailCrm/Client/AbstractLoader.php old mode 100644 new mode 100755 index 08613cd..98592b8 --- a/lib/RetailCrm/Client/AbstractLoader.php +++ b/lib/RetailCrm/Client/AbstractLoader.php @@ -31,6 +31,7 @@ abstract class AbstractLoader { protected $siteCode; protected $client; + protected $crmUrl; /** * Init version based client @@ -45,6 +46,7 @@ abstract class AbstractLoader if ('/' !== $url[strlen($url) - 1]) { $url .= '/'; } + $this->crmUrl = $url; if (empty($version) || !in_array($version, ['v3', 'v4', 'v5'])) { throw new \InvalidArgumentException( @@ -128,5 +130,33 @@ abstract class AbstractLoader return $this->siteCode; } + /** + * Getting the list of available api versions + * + * @return \RetailCrm\Response\ApiResponse + */ + public function availableVersions() + { + return $this->client->makeRequest( + $this->crmUrl . 'api/api-versions', + "GET", + [], + true + ); + } + /** + * Getting the list of available api methods and stores for current key + * + * @return \RetailCrm\Response\ApiResponse + */ + public function credentials() + { + return $this->client->makeRequest( + $this->crmUrl . 'api/credentials', + "GET", + [], + true + ); + } } diff --git a/lib/RetailCrm/Http/Client.php b/lib/RetailCrm/Http/Client.php old mode 100644 new mode 100755 index 13cf46e..5939c51 --- a/lib/RetailCrm/Http/Client.php +++ b/lib/RetailCrm/Http/Client.php @@ -63,6 +63,7 @@ class Client * @param string $path request url * @param string $method (default: 'GET') * @param array $parameters (default: array()) + * @param bool $fullPath (default: false) * * @SuppressWarnings(PHPMD.ExcessiveParameterList) * @@ -75,7 +76,8 @@ class Client public function makeRequest( $path, $method, - array $parameters = [] + array $parameters = [], + $fullPath = false ) { $allowedMethods = [self::METHOD_GET, self::METHOD_POST]; @@ -91,7 +93,7 @@ class Client $parameters = array_merge($this->defaultParameters, $parameters); - $url = $this->url . $path; + $url = $fullPath ? $path : $this->url . $path; if (self::METHOD_GET === $method && count($parameters)) { $url .= '?' . http_build_query($parameters, '', '&'); diff --git a/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php b/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php new file mode 100755 index 0000000..4248cbc --- /dev/null +++ b/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php @@ -0,0 +1,57 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + */ + +namespace RetailCrm\Tests\Methods; + +use RetailCrm\Test\TestCase; + +/** + * Class CommonMethodsTest + * + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + */ +class CommonMethodsTest extends TestCase +{ + /** + * @group api_methods + */ + public function testAvailableVersions() + { + $client = static::getApiClient(); + + $response = $client->request->availableVersions(); + + static::assertEquals(200, $response->getStatusCode()); + static::assertTrue($response->getSuccess()); + static::assertGreaterThan(0, count($response->getVersions())); + } + + /** + * @group api_methods + */ + public function testCredentials() + { + $client = static::getApiClient(); + + $response = $client->request->credentials(); + + static::assertEquals(200, $response->getStatusCode()); + static::assertTrue($response->getSuccess()); + static::assertGreaterThan(0, count($response->getCredentials())); + } +} From 440c7fcd8c4f62110463bd30b8947b3e0ed8744f Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Fri, 17 Nov 2017 15:02:54 +0300 Subject: [PATCH 07/41] Marketplace methods (#51) --- lib/RetailCrm/Client/ApiVersion5.php | 1 + lib/RetailCrm/Methods/V5/Delivery.php | 16 ++++ lib/RetailCrm/Methods/V5/Module.php | 80 +++++++++++++++++++ lib/RetailCrm/Methods/V5/Stores.php | 17 ++++ lib/RetailCrm/Methods/V5/Telephony.php | 5 ++ .../Version5/ApiClientMarketplaceTest.php | 17 ++-- .../Methods/Version5/ApiClientStoreTest.php | 24 ++++-- .../Version5/ApiClientTelephonyTest.php | 26 +++--- 8 files changed, 156 insertions(+), 30 deletions(-) create mode 100644 lib/RetailCrm/Methods/V5/Module.php diff --git a/lib/RetailCrm/Client/ApiVersion5.php b/lib/RetailCrm/Client/ApiVersion5.php index b8a6f3e..e0a992b 100644 --- a/lib/RetailCrm/Client/ApiVersion5.php +++ b/lib/RetailCrm/Client/ApiVersion5.php @@ -46,6 +46,7 @@ class ApiVersion5 extends AbstractLoader use V5\Customers; use V5\CustomFields; use V5\Delivery; + use V5\Module; use V5\Orders; use V5\Packs; use V5\References; diff --git a/lib/RetailCrm/Methods/V5/Delivery.php b/lib/RetailCrm/Methods/V5/Delivery.php index 0469177..de43c1c 100644 --- a/lib/RetailCrm/Methods/V5/Delivery.php +++ b/lib/RetailCrm/Methods/V5/Delivery.php @@ -30,4 +30,20 @@ use RetailCrm\Methods\V4\Delivery as Previous; trait Delivery { use Previous; + + /** + * Get delivery settings + * + * @param string $code + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function deliverySettingsGet($code) + { + throw new \InvalidArgumentException('This method is not available'); + } } diff --git a/lib/RetailCrm/Methods/V5/Module.php b/lib/RetailCrm/Methods/V5/Module.php new file mode 100644 index 0000000..5c5f4b8 --- /dev/null +++ b/lib/RetailCrm/Methods/V5/Module.php @@ -0,0 +1,80 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + */ + +namespace RetailCrm\Methods\V5; + +/** + * PHP version 5.4 + * + * Module class + * + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + */ +trait Module +{ + /** + * Get module configuration + * + * @param string $code + * + * @throws \RetailCrm\Exception\InvalidJsonException + * @throws \RetailCrm\Exception\CurlException + * @throws \InvalidArgumentException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function integrationModulesGet($code) + { + if (empty($code)) { + throw new \InvalidArgumentException( + 'Parameter `code` must be set' + ); + } + + return $this->client->makeRequest( + sprintf('/integration-modules/%s', $code), + "GET" + ); + } + + /** + * Edit module configuration + * + * @param array $configuration + * + * @throws \RetailCrm\Exception\InvalidJsonException + * @throws \RetailCrm\Exception\CurlException + * @throws \InvalidArgumentException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function integrationModulesEdit(array $configuration) + { + if (!count($configuration) || empty($configuration['code'])) { + throw new \InvalidArgumentException( + 'Parameter `configuration` must contains a data & configuration `code` must be set' + ); + } + + return $this->client->makeRequest( + sprintf('/integration-modules/%s/edit', $configuration['code']), + "POST", + ['integrationModule' => json_encode($configuration)] + ); + } +} diff --git a/lib/RetailCrm/Methods/V5/Stores.php b/lib/RetailCrm/Methods/V5/Stores.php index 93a7c7f..262e30a 100644 --- a/lib/RetailCrm/Methods/V5/Stores.php +++ b/lib/RetailCrm/Methods/V5/Stores.php @@ -31,6 +31,23 @@ trait Stores { use Previous; + /** + * Get store settings + * + * @param string $code get settings code + * + * @return \RetailCrm\Response\ApiResponse + * @throws \RetailCrm\Exception\InvalidJsonException + * @throws \RetailCrm\Exception\CurlException + * @throws \InvalidArgumentException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function storeSettingsGet($code) + { + throw new \InvalidArgumentException('This method is not available'); + } + /** * Get products groups * diff --git a/lib/RetailCrm/Methods/V5/Telephony.php b/lib/RetailCrm/Methods/V5/Telephony.php index 03ed217..e392968 100644 --- a/lib/RetailCrm/Methods/V5/Telephony.php +++ b/lib/RetailCrm/Methods/V5/Telephony.php @@ -30,4 +30,9 @@ use RetailCrm\Methods\V4\Telephony as Previous; trait Telephony { use Previous; + + public function telephonySettingsGet($code) + { + throw new \InvalidArgumentException('This method is not available'); + } } diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php index 5eb176f..95a14e0 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php @@ -23,27 +23,30 @@ use RetailCrm\Test\TestCase; */ class ApiClientMarketplaceTest extends TestCase { - const SNAME = 'Marketplace integration v5'; - const SCODE = 'integration_v5'; + const SERVICE_NAME = 'Marketplace integration v5'; + const SERVICE_CODE = 'integration_v5'; /** * @group marketplace_v5 */ public function testConfigurationEdit() { - $client = static::getApiClient(null, null, "v5"); + $client = static::getApiClient(); - $response = $client->request->marketplaceSettingsEdit( + $response = $client->request->integrationModulesEdit( [ - 'name' => self::SNAME, - 'code' => self::SCODE, + 'name' => self::SERVICE_NAME, + 'code' => self::SERVICE_CODE, + 'clientId' => uniqid(), 'logo' => 'http://download.retailcrm.pro/logos/setup.svg', 'active' => 'true' ] ); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); - static::assertTrue(in_array($response->getStatusCode(), [200, 201])); + static::assertEquals($response->getStatusCode(), 200); static::assertTrue($response->isSuccessful()); } + + } diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php index 1948cbe..68c5f9d 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php @@ -31,7 +31,7 @@ class ApiClientStoreTest extends TestCase const SCODE = 'test-store-v5'; /** - * @group store_v4 + * @group store_v5 */ public function testStoreCreate() { @@ -45,7 +45,7 @@ class ApiClientStoreTest extends TestCase } /** - * @group store_v4 + * @group store_v5 */ public function testStoreInventories() { @@ -63,7 +63,7 @@ class ApiClientStoreTest extends TestCase } /** - * @group store_v4 + * @group store_v5 * @expectedException \InvalidArgumentException */ public function testInventoriesException() @@ -74,7 +74,7 @@ class ApiClientStoreTest extends TestCase } /** - * @group store_v4 + * @group store_v5 */ public function testInventoriesUpload() { @@ -109,7 +109,7 @@ class ApiClientStoreTest extends TestCase } /** - * @group integration + * @group store_v5 */ public function testInventoriesFailed() { @@ -137,7 +137,7 @@ class ApiClientStoreTest extends TestCase } /** - * @group store_v4 + * @group store_v5 */ public function testStoreProducts() { @@ -151,7 +151,7 @@ class ApiClientStoreTest extends TestCase } /** - * @group store_v4 + * @group store_v5 */ public function testStoreProductsGroups() { @@ -163,4 +163,14 @@ class ApiClientStoreTest extends TestCase static::assertEquals(200, $response->getStatusCode()); static::assertTrue($response->isSuccessful()); } + + /** + * @group store_v5 + * @expectedException \InvalidArgumentException + */ + public function testStoreSettingsGet() + { + $client = static::getApiClient(); + $client->request->storeSettingsGet(self::SCODE); + } } diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php index 9520474..3658253 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php @@ -31,22 +31,6 @@ class ApiClientTelephonyTest extends TestCase const TEL_CLIENT = '456'; const TEL_IMAGE = 'http://www.mec.ph/horizon/wp-content/uploads/2011/11/telephony.svg'; - /** - * Settings Get test - * - * @group telephony - * - * @return void - */ - public function testTelephonySettingsGet() - { - $client = static::getApiClient(); - $response = $client->request->telephonySettingsGet(self::TEL_CODE); - static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); - static::assertEquals(200, $response->getStatusCode()); - static::assertTrue($response->isSuccessful()); - } - /** * Event test * @@ -125,4 +109,14 @@ class ApiClientTelephonyTest extends TestCase static::assertEquals(200, $response->getStatusCode()); static::assertTrue($response->isSuccessful()); } + + /** + * @group telephony_v5 + * @expectedException \InvalidArgumentException + */ + public function testTelephonySettingsGet() + { + $client = static::getApiClient(); + $client->request->telephonySettingsGet(self::TEL_CODE); + } } From 403d04d3c44f93fc2b8492273e14ccee8b62ee2d Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Wed, 20 Dec 2017 16:28:00 +0300 Subject: [PATCH 08/41] costs; upgrade phpunit --- composer.json | 2 +- lib/RetailCrm/Methods/V5/Costs.php | 214 +++++++++++++++++++++++++++++ 2 files changed, 215 insertions(+), 1 deletion(-) create mode 100644 lib/RetailCrm/Methods/V5/Costs.php diff --git a/composer.json b/composer.json index daa8fd0..ebd20f7 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "ext-curl": "*" }, "require-dev": { - "phpunit/phpunit": "3.7.*", + "phpunit/phpunit": "4.*", "squizlabs/php_codesniffer": "3.*" }, "support": { diff --git a/lib/RetailCrm/Methods/V5/Costs.php b/lib/RetailCrm/Methods/V5/Costs.php new file mode 100644 index 0000000..ca4cc1e --- /dev/null +++ b/lib/RetailCrm/Methods/V5/Costs.php @@ -0,0 +1,214 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + */ +namespace RetailCrm\Methods\V5; + +/** + * PHP version 5.4 + * + * CostsTrait class + * + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + */ +trait Costs +{ + /** + * Returns filtered costs list + * + * @param array $filter (default: array()) + * @param int $page (default: null) + * @param int $limit (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function costsList(array $filter = [], $limit = null, $page = null) + { + $parameters = []; + + if (count($filter)) { + $parameters['filter'] = $filter; + } + if (null !== $page) { + $parameters['page'] = (int) $page; + } + if (null !== $limit) { + $parameters['limit'] = (int) $limit; + } + + return $this->client->makeRequest( + '/costs', + "GET", + $parameters + ); + } + + /** + * Create a cost + * + * @param array $cost cost data + * @param string $site (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function costsCreate(array $cost, $site = null) + { + if (!count($cost)) { + throw new \InvalidArgumentException( + 'Parameter `cost` must contains a data' + ); + } + + return $this->client->makeRequest( + '/costs/create', + "POST", + $this->fillSite($site, ['cost' => json_encode($cost)]) + ); + } + + /** + * Delete costs set + * + * @param array $ids costs identifiers + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function costsDelete(array $ids) + { + if (!count($ids)) { + throw new \InvalidArgumentException( + 'Parameter `ids` must contains a data' + ); + } + + return $this->client->makeRequest( + '/costs/delete', + "POST" + ); + } + + /** + * Upload costs + * + * @param array $costs costs array + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function costsUpload($costs) + { + if (!count($costs)) { + throw new \InvalidArgumentException( + 'Parameter `costs` must contains a data' + ); + } + + return $this->client->makeRequest( + '/costs/upload', + "POST", + ['costs' => json_encode($costs)] + ); + } + + /** + * Get cost by id + * + * @param string $id customer identificator + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function costsGet($id) + { + return $this->client->makeRequest( + "/costs/$id", + "GET" + ); + } + + /** + * Edit a cost + * + * @param array $cost cost data + * @param string $site (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function costsEdit(array $cost, $site = null) + { + if (!count($cost)) { + throw new \InvalidArgumentException( + 'Parameter `cost` must contains a data' + ); + } + + return $this->client->makeRequest( + sprintf('/costs/%s/edit', $cost['id']), + "POST", + $this->fillSite( + $site, + ['cost' => json_encode($cost)] + ) + ); + } + + /** + * Delete cost by id + * + * @param string $id cost identifier + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function costsDeleteById($id) + { + if (!empty($id)) { + throw new \InvalidArgumentException( + 'Parameter `id` must contains a data' + ); + } + + return $this->client->makeRequest( + sprintf('/costs/%s/delete', $id), + "POST" + ); + } +} From 6947dfe08cd87dd80ba52c1fce3309050cb51c81 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Wed, 20 Dec 2017 16:56:50 +0300 Subject: [PATCH 09/41] couriers, legal entities and costs references methods --- lib/RetailCrm/Methods/V5/References.php | 206 ++++++++++++++++++ .../Version5/ApiClientReferenceTest.php | 3 + 2 files changed, 209 insertions(+) diff --git a/lib/RetailCrm/Methods/V5/References.php b/lib/RetailCrm/Methods/V5/References.php index a51e72e..bfb6cda 100644 --- a/lib/RetailCrm/Methods/V5/References.php +++ b/lib/RetailCrm/Methods/V5/References.php @@ -30,4 +30,210 @@ use RetailCrm\Methods\V4\References as Previous; trait References { use Previous; + + /** + * Get costs groups + * + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function costGroups() + { + return $this->client->makeRequest( + '/reference/cost-groups', + "GET" + ); + } + + /** + * Edit costs groups + * + * @param array $data + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function costGroupsEdit(array $data) + { + if (!array_key_exists('code', $data)) { + throw new \InvalidArgumentException( + 'Data must contain "code" parameter.' + ); + } + + if (!array_key_exists('name', $data)) { + throw new \InvalidArgumentException( + 'Data must contain "name" parameter.' + ); + } + + if (!array_key_exists('color', $data)) { + throw new \InvalidArgumentException( + 'Data must contain "color" parameter.' + ); + } + + return $this->client->makeRequest( + sprintf('/reference/cost-groups/%s/edit', $data['code']), + "POST", + ['costGroup' => json_encode($data)] + ); + } + + /** + * Get costs items + * + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function costItems() + { + return $this->client->makeRequest( + '/reference/cost-items', + "GET" + ); + } + + /** + * Edit costs items + * + * @param array $data + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function costItemsEdit(array $data) + { + if (!array_key_exists('code', $data)) { + throw new \InvalidArgumentException( + 'Data must contain "code" parameter.' + ); + } + + if (!array_key_exists('name', $data)) { + throw new \InvalidArgumentException( + 'Data must contain "name" parameter.' + ); + } + + return $this->client->makeRequest( + sprintf('/reference/cost-items/%s/edit', $data['code']), + "POST", + ['costItem' => json_encode($data)] + ); + } + + /** + * Get legal entities + * + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function legalEntities() + { + return $this->client->makeRequest( + '/reference/legal-entities', + "GET" + ); + } + + /** + * Edit legal entity + * + * @param array $data + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function legalEntitiesEdit(array $data) + { + if (!array_key_exists('code', $data)) { + throw new \InvalidArgumentException( + 'Data must contain "code" parameter.' + ); + } + + return $this->client->makeRequest( + sprintf('/reference/legal-entities/%s/edit', $data['code']), + "POST", + ['legalEntity' => json_encode($data)] + ); + } + + /** + * Get couriers + * + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function couriersList() + { + return $this->client->makeRequest( + '/reference/couriers', + "GET" + ); + } + + /** + * Create courier + * + * @param array $courier + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function couriersCreate(array $courier) + { + return $this->client->makeRequest( + '/reference/couriers/create', + "POST", + ['courier' => json_encode($courier)] + ); + } + + /** + * Edit courier + * + * @param array $courier + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function couriersEdit(array $courier) + { + if (!array_key_exists('id', $courier)) { + throw new \InvalidArgumentException( + 'Data must contain "id" parameter.' + ); + } + + return $this->client->makeRequest( + sprintf('/reference/couriers/%s/edit', $courier['id']), + "POST", + ['courier' => json_encode($courier)] + ); + } } diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php index 646e34a..1a08b74 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php @@ -38,6 +38,7 @@ class ApiClientReferenceTest extends TestCase $client = static::getApiClient(); $method = $name . 'List'; + echo $method; $response = $client->request->$method(); /* @var \RetailCrm\Response\ApiResponse $response */ @@ -153,6 +154,8 @@ class ApiClientReferenceTest extends TestCase ['statuses'], ['sites'], ['stores'], + ['couriers'], + ['costs'] ]; } From d61ab837e8a441d940206be73a072f72c015da1f Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Wed, 10 Jan 2018 11:35:57 +0300 Subject: [PATCH 10/41] delivery shipments --- lib/RetailCrm/Client/AbstractLoader.php | 2 +- lib/RetailCrm/Http/Client.php | 2 +- lib/RetailCrm/Methods/V4/Orders.php | 11 +- lib/RetailCrm/Methods/V5/Delivery.php | 137 +++++++++++++++++- lib/RetailCrm/Methods/V5/Orders.php | 24 +-- tests/RetailCrm/Test/TestCase.php | 26 ++-- .../Tests/Methods/CommonMethodsTest.php | 16 +- .../Version5/ApiClientDeliveryTest.php | 109 ++++++++++++++ .../Version5/ApiClientMarketplaceTest.php | 15 +- tests/bootstrap.php | 8 +- 10 files changed, 315 insertions(+), 35 deletions(-) create mode 100644 tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php diff --git a/lib/RetailCrm/Client/AbstractLoader.php b/lib/RetailCrm/Client/AbstractLoader.php index 98592b8..560fb20 100755 --- a/lib/RetailCrm/Client/AbstractLoader.php +++ b/lib/RetailCrm/Client/AbstractLoader.php @@ -50,7 +50,7 @@ abstract class AbstractLoader if (empty($version) || !in_array($version, ['v3', 'v4', 'v5'])) { throw new \InvalidArgumentException( - 'Version parameter must be not empty and must be equal one of v3|v4|v5' + 'Version must be not empty and must be equal one of v3|v4|v5' ); } diff --git a/lib/RetailCrm/Http/Client.php b/lib/RetailCrm/Http/Client.php index 5939c51..419dd00 100755 --- a/lib/RetailCrm/Http/Client.php +++ b/lib/RetailCrm/Http/Client.php @@ -63,7 +63,7 @@ class Client * @param string $path request url * @param string $method (default: 'GET') * @param array $parameters (default: array()) - * @param bool $fullPath (default: false) + * @param bool $fullPath (default: false) * * @SuppressWarnings(PHPMD.ExcessiveParameterList) * diff --git a/lib/RetailCrm/Methods/V4/Orders.php b/lib/RetailCrm/Methods/V4/Orders.php index d34e752..899bb62 100644 --- a/lib/RetailCrm/Methods/V4/Orders.php +++ b/lib/RetailCrm/Methods/V4/Orders.php @@ -242,9 +242,14 @@ trait Orders /** * Get orders history - * @param array $filter - * @param null $page - * @param null $limit + * + * @param array $filter (default: array()) + * @param int $page (default: null) + * @param int $limit (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException * * @return \RetailCrm\Response\ApiResponse */ diff --git a/lib/RetailCrm/Methods/V5/Delivery.php b/lib/RetailCrm/Methods/V5/Delivery.php index de43c1c..6ee47c2 100644 --- a/lib/RetailCrm/Methods/V5/Delivery.php +++ b/lib/RetailCrm/Methods/V5/Delivery.php @@ -34,7 +34,25 @@ trait Delivery /** * Get delivery settings * - * @param string $code + * @param string $code delivery code + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return void + */ + public function deliverySettingsGet($code) + { + throw new \InvalidArgumentException('This method is not available'); + } + + /** + * Get delivery list + * + * @param array $filter (default: array()) + * @param int $page (default: null) + * @param int $limit (default: null) * * @throws \InvalidArgumentException * @throws \RetailCrm\Exception\CurlException @@ -42,8 +60,121 @@ trait Delivery * * @return \RetailCrm\Response\ApiResponse */ - public function deliverySettingsGet($code) + public function deliveryShipmentsList( + array $filter = [], + $page = null, + $limit = null + ) { + $parameters = []; + + if (count($filter)) { + $parameters['filter'] = $filter; + } + if (null !== $page) { + $parameters['page'] = (int) $page; + } + if (null !== $limit) { + $parameters['limit'] = (int) $limit; + } + + return $this->client->makeRequest( + '/delivery/shipments', + "GET", + $parameters + ); + } + + /** + * Create delivery shipment + * + * @param array $shipment (default: array()) + * @param string $deliveryType (default: string) + * @param null $site (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function deliveryShipmentsCreate( + array $shipment, + $deliveryType, + $site = null + ) { + if (!count($shipment)) { + throw new \InvalidArgumentException( + 'Parameter `shipment` must contains a data' + ); + } + + return $this->client->makeRequest( + '/delivery/shipments/create', + "POST", + $this->fillSite( + $site, + [ + 'deliveryShipment' => json_encode($shipment), + 'deliveryType' => $deliveryType + ] + ) + ); + } + + /** + * Get shipment + * + * @param string $id shipment id + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function deliveryShipmentGet($id) { - throw new \InvalidArgumentException('This method is not available'); + return $this->client->makeRequest( + sprintf("/delivery/shipments/%s", $id), + "GET" + ); + } + + /** + * Edit delivery shipment + * + * @param array $shipment (default: array()) + * @param null $site (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function deliveryShipmentsEdit(array $shipment, $site = null) + { + if (!count($shipment)) { + throw new \InvalidArgumentException( + 'Parameter `shipment` must contains a data' + ); + } + + if (empty($shipment['id'])) { + throw new \InvalidArgumentException( + 'Parameter `shipment` must contains an `id` field' + ); + } + + return $this->client->makeRequest( + sprintf("/delivery/shipments/%s/edit", $shipment['id']), + "POST", + $this->fillSite( + $site, + [ + 'deliveryShipment' => json_encode($shipment) + ] + ) + ); } } diff --git a/lib/RetailCrm/Methods/V5/Orders.php b/lib/RetailCrm/Methods/V5/Orders.php index 8099925..0c3aead 100644 --- a/lib/RetailCrm/Methods/V5/Orders.php +++ b/lib/RetailCrm/Methods/V5/Orders.php @@ -34,9 +34,9 @@ trait Orders /** * Combine orders * - * @param string $technique - * @param array $order - * @param array $resultOrder + * @param array $order orgin order + * @param array $resultOrder result order + * @param string $technique combining technique * * @return \RetailCrm\Response\ApiResponse */ @@ -71,7 +71,7 @@ trait Orders * Create an order payment * * @param array $payment order data - * @param null $site site code + * @param null $site site code * * @throws \InvalidArgumentException * @throws \RetailCrm\Exception\CurlException @@ -98,14 +98,14 @@ trait Orders } /** - * Edit an order payment - * - * @param array $payment order data - * @param string $by by key - * @param null $site site code - * - * @return \RetailCrm\Response\ApiResponse - */ + * Edit an order payment + * + * @param array $payment order data + * @param string $by by key + * @param null $site site code + * + * @return \RetailCrm\Response\ApiResponse + */ public function ordersPaymentEdit(array $payment, $by = 'id', $site = null) { if (!count($payment)) { diff --git a/tests/RetailCrm/Test/TestCase.php b/tests/RetailCrm/Test/TestCase.php index a0d4e2b..b5e705f 100644 --- a/tests/RetailCrm/Test/TestCase.php +++ b/tests/RetailCrm/Test/TestCase.php @@ -20,22 +20,30 @@ use RetailCrm\Http\Client; /** * Class TestCase * - * @package RetailCrm\Test + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 */ class TestCase extends \PHPUnit_Framework_TestCase { /** * Return ApiClient object * - * @param string $url (default: null) - * @param string $apiKey (default: null) - * @param string $version (default: null) - * @param string $site (default: null) + * @param string $url (default: null) + * @param string $apiKey (default: null) + * @param string $version (default: null) + * @param string $site (default: null) * * @return ApiClient */ - public static function getApiClient($url = null, $apiKey = null, $version = null, $site = null) - { + public static function getApiClient( + $url = null, + $apiKey = null, + $version = null, + $site = null + ) { $configUrl = getenv('CRM_API_URL') ?: $_SERVER['CRM_API_URL']; $configKey = getenv('CRM_API_KEY') ?: $_SERVER['CRM_API_KEY']; $configVersion = getenv('CRM_API_VERSION') ?: $_SERVER['CRM_API_VERSION']; @@ -51,8 +59,8 @@ class TestCase extends \PHPUnit_Framework_TestCase /** * Return Client object * - * @param string $url (default: null) - * @param array $defaultParameters (default: array()) + * @param string $url (default: null) + * @param array $defaultParameters (default: array()) * * @return Client */ diff --git a/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php b/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php index 4248cbc..3b74cae 100755 --- a/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php +++ b/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php @@ -28,7 +28,11 @@ use RetailCrm\Test\TestCase; class CommonMethodsTest extends TestCase { /** + * Available versions + * * @group api_methods + * + * @return void */ public function testAvailableVersions() { @@ -37,12 +41,16 @@ class CommonMethodsTest extends TestCase $response = $client->request->availableVersions(); static::assertEquals(200, $response->getStatusCode()); - static::assertTrue($response->getSuccess()); - static::assertGreaterThan(0, count($response->getVersions())); + static::assertTrue($response->isSuccessful()); + static::assertGreaterThan(0, count($response['versions'])); } /** + * Available methods + * * @group api_methods + * + * @return void */ public function testCredentials() { @@ -51,7 +59,7 @@ class CommonMethodsTest extends TestCase $response = $client->request->credentials(); static::assertEquals(200, $response->getStatusCode()); - static::assertTrue($response->getSuccess()); - static::assertGreaterThan(0, count($response->getCredentials())); + static::assertTrue($response->isSuccessful()); + static::assertGreaterThan(0, count($response['credentials'])); } } diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php new file mode 100644 index 0000000..cb6d806 --- /dev/null +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php @@ -0,0 +1,109 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + */ + +namespace RetailCrm\Tests\Methods\Version5; + +use RetailCrm\Test\TestCase; + +/** + * Class ApiClientMarketplaceTest + * + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + */ +class ApiClientDeliveryTest extends TestCase +{ + /** + * Test delivery list + * + * @group marketplace_v5 + * + * @return void + */ + public function testDeliveryShipmentsList() + { + $client = static::getApiClient(); + + $response = $client->request->deliveryShipmentsList(); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertEquals($response->getStatusCode(), 200); + static::assertTrue($response->isSuccessful()); + } + + + /** + * Test delivery methods + * + * @group marketplace_v5 + * + * @return void + */ + public function testDeliveryShipments() + { + $client = static::getApiClient(); + + $deliveryType = 'courier'; + + $order = [ + 'number' => uniqid(), + 'firstName' => 'Test', + 'lastName' => 'Customer', + 'email' => 'test@example.com', + 'delivery' => ['code' => $deliveryType] + ]; + + $responseOrder = $client->request->ordersCreate($order); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $responseOrder); + static::assertEquals($responseOrder->getStatusCode(), 201); + static::assertTrue($responseOrder->isSuccessful()); + + $orderid = $responseOrder['id']; + + $shipment = [ + 'date' => date('Y-m-d'), + 'orders' => [ + [ + 'id' => $orderid + ] + ], + 'comment' => 'test shipment' + ]; + + $responseCreate = $client + ->request + ->deliveryShipmentsCreate($shipment, $deliveryType); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $responseCreate); + static::assertTrue($responseCreate->isSuccessful()); + + $responseGet = $client->request->deliveryShipmentGet($responseCreate['id']); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $responseGet); + static::assertTrue($responseGet->isSuccessful()); + + $updateShipment = array_merge($shipment, ['status' => 'cancelled']); + + $responseUpdate = $client + ->request + ->deliveryShipmentsUpdate($updateShipment); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $responseUpdate); + static::assertTrue($responseUpdate->isSuccessful()); + } +} diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php index 95a14e0..81575b8 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php @@ -19,7 +19,11 @@ use RetailCrm\Test\TestCase; /** * Class ApiClientMarketplaceTest * - * @package RetailCrm\Tests + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 */ class ApiClientMarketplaceTest extends TestCase { @@ -27,12 +31,21 @@ class ApiClientMarketplaceTest extends TestCase const SERVICE_CODE = 'integration_v5'; /** + * Test configuration + * * @group marketplace_v5 + * + * @return void */ public function testConfigurationEdit() { $client = static::getApiClient(); + /** + * Response + * + * @var \RetailCrm\Response\ApiResponse $response + */ $response = $client->request->integrationModulesEdit( [ 'name' => self::SERVICE_NAME, diff --git a/tests/bootstrap.php b/tests/bootstrap.php index f1cd65b..f8117eb 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,4 +1,10 @@ add('RetailCrm\\Test', __DIR__); From 6e48a1d2223b7efca7b0654d78fc56a454682aa5 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Tue, 20 Feb 2018 17:50:45 +0300 Subject: [PATCH 11/41] minor improvements, move test data to env --- .travis.yml | 3 +- lib/RetailCrm/ApiClient.php | 3 ++ lib/RetailCrm/Client/ApiVersion5.php | 1 + lib/RetailCrm/Methods/V3/Customers.php | 6 ++++ lib/RetailCrm/Methods/V3/Orders.php | 8 +++++ lib/RetailCrm/Methods/V3/Packs.php | 6 ++++ lib/RetailCrm/Methods/V3/References.php | 22 ++++++++++++++ lib/RetailCrm/Methods/V3/Statistic.php | 1 + lib/RetailCrm/Methods/V3/Stores.php | 2 ++ lib/RetailCrm/Methods/V3/Telephony.php | 4 +++ lib/RetailCrm/Methods/V4/Customers.php | 1 + lib/RetailCrm/Methods/V4/Delivery.php | 2 ++ lib/RetailCrm/Methods/V4/Marketplace.php | 1 + lib/RetailCrm/Methods/V4/Orders.php | 9 ++++++ lib/RetailCrm/Methods/V4/References.php | 2 ++ lib/RetailCrm/Methods/V4/Settings.php | 3 ++ lib/RetailCrm/Methods/V4/Stores.php | 3 ++ lib/RetailCrm/Methods/V5/Costs.php | 7 +++++ lib/RetailCrm/Methods/V5/CustomFields.php | 8 +++++ lib/RetailCrm/Methods/V5/Customers.php | 4 +++ lib/RetailCrm/Methods/V5/Delivery.php | 6 +++- lib/RetailCrm/Methods/V5/Module.php | 2 ++ lib/RetailCrm/Methods/V5/Orders.php | 4 +++ lib/RetailCrm/Methods/V5/References.php | 9 ++++++ lib/RetailCrm/Methods/V5/Segments.php | 1 + lib/RetailCrm/Methods/V5/Stores.php | 10 ++----- lib/RetailCrm/Methods/V5/Tasks.php | 4 +++ lib/RetailCrm/Methods/V5/Telephony.php | 6 +++- lib/RetailCrm/Methods/V5/Users.php | 1 - phpunit.xml.dist | 8 ----- tests/RetailCrm/Test/TestCase.php | 21 +++++++------- tests/RetailCrm/Tests/Http/ClientTest.php | 5 ++-- .../Version4/ApiClientCustomersTest.php | 25 ++++++++-------- .../Version4/ApiClientMarketplaceTest.php | 1 + .../Methods/Version4/ApiClientOrdersTest.php | 29 ++++++++++--------- .../Version4/ApiClientReferenceTest.php | 9 +++--- .../Methods/Version4/ApiClientStoreTest.php | 13 +++++---- .../Version4/ApiClientTelephonyTest.php | 17 ++++++----- .../Methods/Version4/ApiClientUsersTest.php | 3 +- .../Version5/ApiClientCustomersTest.php | 2 ++ .../Version5/ApiClientDeliveryTest.php | 3 ++ .../Version5/ApiClientMarketplaceTest.php | 2 -- .../Methods/Version5/ApiClientTasksTest.php | 4 +-- .../Version5/ApiClientTelephonyTest.php | 1 - .../Methods/Version5/ApiClientUsersTest.php | 6 ++-- .../Tests/Response/ApiResponseTest.php | 4 +++ tests/bootstrap.php | 2 +- 47 files changed, 210 insertions(+), 84 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2a4ca03..a6f2109 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,10 +9,11 @@ php: - '5.5' - '5.6' - '7.0' + - '7.1' + - '7.2' before_script: - flags="-o" - composer install $flags - - cp phpunit.xml.dist phpunit.xml script: phpunit diff --git a/lib/RetailCrm/ApiClient.php b/lib/RetailCrm/ApiClient.php index a1f531e..1283277 100644 --- a/lib/RetailCrm/ApiClient.php +++ b/lib/RetailCrm/ApiClient.php @@ -61,6 +61,9 @@ class ApiClient case self::V3: $this->request = new ApiVersion3($url, $apiKey, $version, $site); break; + default: + $this->request = new ApiVersion5($url, $apiKey, $version, $site); + break; } } diff --git a/lib/RetailCrm/Client/ApiVersion5.php b/lib/RetailCrm/Client/ApiVersion5.php index e0a992b..ea08891 100644 --- a/lib/RetailCrm/Client/ApiVersion5.php +++ b/lib/RetailCrm/Client/ApiVersion5.php @@ -44,6 +44,7 @@ class ApiVersion5 extends AbstractLoader } use V5\Customers; + use V5\Costs; use V5\CustomFields; use V5\Delivery; use V5\Module; diff --git a/lib/RetailCrm/Methods/V3/Customers.php b/lib/RetailCrm/Methods/V3/Customers.php index f6f1350..1f61cff 100644 --- a/lib/RetailCrm/Methods/V3/Customers.php +++ b/lib/RetailCrm/Methods/V3/Customers.php @@ -54,6 +54,7 @@ trait Customers $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/customers', "GET", @@ -81,6 +82,7 @@ trait Customers ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/customers/create', "POST", @@ -107,6 +109,7 @@ trait Customers ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/customers/fix-external-ids', "POST", @@ -134,6 +137,7 @@ trait Customers ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/customers/upload', "POST", @@ -158,6 +162,7 @@ trait Customers { $this->checkIdParameter($by); + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/customers/$id", "GET", @@ -194,6 +199,7 @@ trait Customers ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/customers/%s/edit', $customer[$by]), "POST", diff --git a/lib/RetailCrm/Methods/V3/Orders.php b/lib/RetailCrm/Methods/V3/Orders.php index 13ba925..8170910 100644 --- a/lib/RetailCrm/Methods/V3/Orders.php +++ b/lib/RetailCrm/Methods/V3/Orders.php @@ -55,6 +55,7 @@ trait Orders $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders', "GET", @@ -82,6 +83,7 @@ trait Orders ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/create', "POST", @@ -108,6 +110,7 @@ trait Orders ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/fix-external-ids', "POST", @@ -139,6 +142,7 @@ trait Orders $parameters['externalIds'] = $externalIds; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/statuses', "GET", @@ -166,6 +170,7 @@ trait Orders ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/upload', "POST", @@ -190,6 +195,7 @@ trait Orders { $this->checkIdParameter($by); + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/orders/$id", "GET", @@ -226,6 +232,7 @@ trait Orders ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/orders/%s/edit', $order[$by]), "POST", @@ -258,6 +265,7 @@ trait Orders $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/history', "GET", diff --git a/lib/RetailCrm/Methods/V3/Packs.php b/lib/RetailCrm/Methods/V3/Packs.php index e08713a..e9beed0 100644 --- a/lib/RetailCrm/Methods/V3/Packs.php +++ b/lib/RetailCrm/Methods/V3/Packs.php @@ -54,6 +54,7 @@ trait Packs $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/packs', "GET", @@ -81,6 +82,7 @@ trait Packs ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/packs/create', "POST", @@ -115,6 +117,7 @@ trait Packs $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/packs/history', "GET", @@ -139,6 +142,7 @@ trait Packs throw new \InvalidArgumentException('Parameter `id` must be set'); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/orders/packs/$id", "GET" @@ -162,6 +166,7 @@ trait Packs throw new \InvalidArgumentException('Parameter `id` must be set'); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/orders/packs/%s/delete', $id), "POST" @@ -188,6 +193,7 @@ trait Packs ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/orders/packs/%s/edit', $pack['id']), "POST", diff --git a/lib/RetailCrm/Methods/V3/References.php b/lib/RetailCrm/Methods/V3/References.php index 76075fc..5bd6dd4 100644 --- a/lib/RetailCrm/Methods/V3/References.php +++ b/lib/RetailCrm/Methods/V3/References.php @@ -38,6 +38,7 @@ trait References */ public function countriesList() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/countries', "GET" @@ -55,6 +56,7 @@ trait References */ public function deliveryServicesList() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/delivery-services', "GET" @@ -80,6 +82,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/delivery-services/%s/edit', $data['code']), "POST", @@ -98,6 +101,7 @@ trait References */ public function deliveryTypesList() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/delivery-types', "GET" @@ -123,6 +127,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/delivery-types/%s/edit', $data['code']), "POST", @@ -141,6 +146,7 @@ trait References */ public function orderMethodsList() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/order-methods', "GET" @@ -166,6 +172,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/order-methods/%s/edit', $data['code']), "POST", @@ -184,6 +191,7 @@ trait References */ public function orderTypesList() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/order-types', "GET" @@ -209,6 +217,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/order-types/%s/edit', $data['code']), "POST", @@ -227,6 +236,7 @@ trait References */ public function paymentStatusesList() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/payment-statuses', "GET" @@ -252,6 +262,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/payment-statuses/%s/edit', $data['code']), "POST", @@ -270,6 +281,7 @@ trait References */ public function paymentTypesList() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/payment-types', "GET" @@ -295,6 +307,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/payment-types/%s/edit', $data['code']), "POST", @@ -313,6 +326,7 @@ trait References */ public function productStatusesList() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/product-statuses', "GET" @@ -338,6 +352,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/product-statuses/%s/edit', $data['code']), "POST", @@ -356,6 +371,7 @@ trait References */ public function sitesList() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/sites', "GET" @@ -381,6 +397,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/sites/%s/edit', $data['code']), "POST", @@ -399,6 +416,7 @@ trait References */ public function statusGroupsList() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/status-groups', "GET" @@ -416,6 +434,7 @@ trait References */ public function statusesList() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/statuses', "GET" @@ -441,6 +460,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/statuses/%s/edit', $data['code']), "POST", @@ -459,6 +479,7 @@ trait References */ public function storesList() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/stores', "GET" @@ -490,6 +511,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/stores/%s/edit', $data['code']), "POST", diff --git a/lib/RetailCrm/Methods/V3/Statistic.php b/lib/RetailCrm/Methods/V3/Statistic.php index a98bbc7..367e4e6 100644 --- a/lib/RetailCrm/Methods/V3/Statistic.php +++ b/lib/RetailCrm/Methods/V3/Statistic.php @@ -38,6 +38,7 @@ trait Statistic */ public function statisticUpdate() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/statistic/update', "GET" diff --git a/lib/RetailCrm/Methods/V3/Stores.php b/lib/RetailCrm/Methods/V3/Stores.php index a370764..c44915e 100644 --- a/lib/RetailCrm/Methods/V3/Stores.php +++ b/lib/RetailCrm/Methods/V3/Stores.php @@ -54,6 +54,7 @@ trait Stores $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/store/inventories', "GET", @@ -81,6 +82,7 @@ trait Stores ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/store/inventories/upload', "POST", diff --git a/lib/RetailCrm/Methods/V3/Telephony.php b/lib/RetailCrm/Methods/V3/Telephony.php index 8e0bbad..25f1329 100644 --- a/lib/RetailCrm/Methods/V3/Telephony.php +++ b/lib/RetailCrm/Methods/V3/Telephony.php @@ -44,6 +44,7 @@ trait Telephony throw new \InvalidArgumentException('Parameter `code` must be set'); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/telephony/setting/$code", "GET" @@ -93,6 +94,7 @@ trait Telephony $parameters['webAnalyticsData'] = $webAnalyticsData; + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/telephony/call/event', "POST", @@ -119,6 +121,7 @@ trait Telephony ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/telephony/calls/upload', "POST", @@ -147,6 +150,7 @@ trait Telephony $parameters['phone'] = $phone; $parameters['details'] = isset($details) ? $details : 0; + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/telephony/manager', "GET", diff --git a/lib/RetailCrm/Methods/V4/Customers.php b/lib/RetailCrm/Methods/V4/Customers.php index b850061..b1637f7 100644 --- a/lib/RetailCrm/Methods/V4/Customers.php +++ b/lib/RetailCrm/Methods/V4/Customers.php @@ -53,6 +53,7 @@ trait Customers $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/customers/history', "GET", diff --git a/lib/RetailCrm/Methods/V4/Delivery.php b/lib/RetailCrm/Methods/V4/Delivery.php index e2d22fb..e9aecf5 100644 --- a/lib/RetailCrm/Methods/V4/Delivery.php +++ b/lib/RetailCrm/Methods/V4/Delivery.php @@ -44,6 +44,7 @@ trait Delivery throw new \InvalidArgumentException('Parameter `code` must be set'); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/delivery/generic/setting/$code", "GET" @@ -74,6 +75,7 @@ trait Delivery ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/delivery/generic/%s/tracking', $code), "POST", diff --git a/lib/RetailCrm/Methods/V4/Marketplace.php b/lib/RetailCrm/Methods/V4/Marketplace.php index d9fbab9..8db941e 100644 --- a/lib/RetailCrm/Methods/V4/Marketplace.php +++ b/lib/RetailCrm/Methods/V4/Marketplace.php @@ -47,6 +47,7 @@ trait Marketplace ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/marketplace/external/setting/%s/edit', $configuration['code']), "POST", diff --git a/lib/RetailCrm/Methods/V4/Orders.php b/lib/RetailCrm/Methods/V4/Orders.php index 899bb62..625e4f9 100644 --- a/lib/RetailCrm/Methods/V4/Orders.php +++ b/lib/RetailCrm/Methods/V4/Orders.php @@ -59,6 +59,7 @@ trait Orders $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders', "GET", @@ -86,6 +87,7 @@ trait Orders ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/create', "POST", @@ -112,6 +114,8 @@ trait Orders ); } + /** @noinspection PhpUndefinedMethodInspection */ + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/fix-external-ids', "POST", @@ -143,6 +147,7 @@ trait Orders $parameters['externalIds'] = $externalIds; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/statuses', "GET", @@ -170,6 +175,7 @@ trait Orders ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/upload', "POST", @@ -194,6 +200,7 @@ trait Orders { $this->checkIdParameter($by); + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/orders/$id", "GET", @@ -230,6 +237,7 @@ trait Orders ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/orders/%s/edit', $order[$by]), "POST", @@ -267,6 +275,7 @@ trait Orders $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/history', "GET", diff --git a/lib/RetailCrm/Methods/V4/References.php b/lib/RetailCrm/Methods/V4/References.php index 92a0404..b2971b6 100644 --- a/lib/RetailCrm/Methods/V4/References.php +++ b/lib/RetailCrm/Methods/V4/References.php @@ -41,6 +41,7 @@ trait References */ public function pricesTypes() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/price-types', "GET" @@ -72,6 +73,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/price-types/%s/edit', $data['code']), "POST", diff --git a/lib/RetailCrm/Methods/V4/Settings.php b/lib/RetailCrm/Methods/V4/Settings.php index e0167fd..bbf3b04 100644 --- a/lib/RetailCrm/Methods/V4/Settings.php +++ b/lib/RetailCrm/Methods/V4/Settings.php @@ -47,6 +47,7 @@ trait Settings ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/store/setting/%s/edit', $configuration['code']), "POST", @@ -151,6 +152,7 @@ trait Settings $parameters['changeUserStatusUrl'] = $changeUserStatusUrl; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/telephony/setting/$code/edit", "POST", @@ -177,6 +179,7 @@ trait Settings ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/delivery/generic/setting/%s/edit', $configuration['code']), "POST", diff --git a/lib/RetailCrm/Methods/V4/Stores.php b/lib/RetailCrm/Methods/V4/Stores.php index 7a2a21b..74a45db 100644 --- a/lib/RetailCrm/Methods/V4/Stores.php +++ b/lib/RetailCrm/Methods/V4/Stores.php @@ -49,6 +49,7 @@ trait Stores throw new \InvalidArgumentException('Parameter `code` must be set'); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/store/setting/$code", "GET" @@ -76,6 +77,7 @@ trait Stores ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/store/prices/upload', "POST", @@ -110,6 +112,7 @@ trait Stores $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/store/products', "GET", diff --git a/lib/RetailCrm/Methods/V5/Costs.php b/lib/RetailCrm/Methods/V5/Costs.php index ca4cc1e..0b0306f 100644 --- a/lib/RetailCrm/Methods/V5/Costs.php +++ b/lib/RetailCrm/Methods/V5/Costs.php @@ -53,6 +53,7 @@ trait Costs $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/costs', "GET", @@ -80,6 +81,7 @@ trait Costs ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/costs/create', "POST", @@ -106,6 +108,7 @@ trait Costs ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/costs/delete', "POST" @@ -131,6 +134,7 @@ trait Costs ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/costs/upload', "POST", @@ -151,6 +155,7 @@ trait Costs */ public function costsGet($id) { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/costs/$id", "GET" @@ -177,6 +182,7 @@ trait Costs ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/costs/%s/edit', $cost['id']), "POST", @@ -206,6 +212,7 @@ trait Costs ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/costs/%s/delete', $id), "POST" diff --git a/lib/RetailCrm/Methods/V5/CustomFields.php b/lib/RetailCrm/Methods/V5/CustomFields.php index 3659ae8..49b18ea 100644 --- a/lib/RetailCrm/Methods/V5/CustomFields.php +++ b/lib/RetailCrm/Methods/V5/CustomFields.php @@ -50,6 +50,7 @@ trait CustomFields $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/custom-fields', "GET", @@ -83,6 +84,7 @@ trait CustomFields ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/custom-fields/$entity/create", "POST", @@ -112,6 +114,7 @@ trait CustomFields ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/custom-fields/$entity/{$customField['code']}/edit", "POST", @@ -141,6 +144,7 @@ trait CustomFields ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/custom-fields/$entity/$code", "GET" @@ -170,6 +174,7 @@ trait CustomFields $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/custom-fields/dictionaries', "GET", @@ -195,6 +200,7 @@ trait CustomFields ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/custom-fields/dictionaries/create", "POST", @@ -220,6 +226,7 @@ trait CustomFields ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/custom-fields/dictionaries/{$customDictionary['code']}/edit", "POST", @@ -242,6 +249,7 @@ trait CustomFields ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/custom-fields/dictionaries/$code", "GET" diff --git a/lib/RetailCrm/Methods/V5/Customers.php b/lib/RetailCrm/Methods/V5/Customers.php index 6c29a36..7e3a360 100644 --- a/lib/RetailCrm/Methods/V5/Customers.php +++ b/lib/RetailCrm/Methods/V5/Customers.php @@ -48,6 +48,7 @@ trait Customers ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/customers/combine', "POST", @@ -85,6 +86,7 @@ trait Customers $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/customers/notes', "GET", @@ -112,6 +114,7 @@ trait Customers ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/customers/notes/create', "POST", @@ -138,6 +141,7 @@ trait Customers ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/customers/notes/$id/delete", "POST" diff --git a/lib/RetailCrm/Methods/V5/Delivery.php b/lib/RetailCrm/Methods/V5/Delivery.php index 6ee47c2..3023265 100644 --- a/lib/RetailCrm/Methods/V5/Delivery.php +++ b/lib/RetailCrm/Methods/V5/Delivery.php @@ -44,7 +44,7 @@ trait Delivery */ public function deliverySettingsGet($code) { - throw new \InvalidArgumentException('This method is not available'); + throw new \InvalidArgumentException("This method is not available, setting code: $code is unnecessary"); } /** @@ -77,6 +77,7 @@ trait Delivery $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/delivery/shipments', "GET", @@ -108,6 +109,7 @@ trait Delivery ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/delivery/shipments/create', "POST", @@ -134,6 +136,7 @@ trait Delivery */ public function deliveryShipmentGet($id) { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf("/delivery/shipments/%s", $id), "GET" @@ -166,6 +169,7 @@ trait Delivery ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf("/delivery/shipments/%s/edit", $shipment['id']), "POST", diff --git a/lib/RetailCrm/Methods/V5/Module.php b/lib/RetailCrm/Methods/V5/Module.php index 5c5f4b8..72c41d6 100644 --- a/lib/RetailCrm/Methods/V5/Module.php +++ b/lib/RetailCrm/Methods/V5/Module.php @@ -46,6 +46,7 @@ trait Module ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/integration-modules/%s', $code), "GET" @@ -71,6 +72,7 @@ trait Module ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/integration-modules/%s/edit', $configuration['code']), "POST", diff --git a/lib/RetailCrm/Methods/V5/Orders.php b/lib/RetailCrm/Methods/V5/Orders.php index 0c3aead..1ced537 100644 --- a/lib/RetailCrm/Methods/V5/Orders.php +++ b/lib/RetailCrm/Methods/V5/Orders.php @@ -56,6 +56,7 @@ trait Orders ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/combine', "POST", @@ -87,6 +88,7 @@ trait Orders ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/orders/payments/create', "POST", @@ -122,6 +124,7 @@ trait Orders ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/orders/payments/%s/edit', $payment[$by]), "POST", @@ -147,6 +150,7 @@ trait Orders ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/orders/payments/%s/delete', $id), "POST" diff --git a/lib/RetailCrm/Methods/V5/References.php b/lib/RetailCrm/Methods/V5/References.php index bfb6cda..e61a0cf 100644 --- a/lib/RetailCrm/Methods/V5/References.php +++ b/lib/RetailCrm/Methods/V5/References.php @@ -41,6 +41,7 @@ trait References */ public function costGroups() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/cost-groups', "GET" @@ -78,6 +79,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/cost-groups/%s/edit', $data['code']), "POST", @@ -95,6 +97,7 @@ trait References */ public function costItems() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/cost-items', "GET" @@ -126,6 +129,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/cost-items/%s/edit', $data['code']), "POST", @@ -143,6 +147,7 @@ trait References */ public function legalEntities() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/legal-entities', "GET" @@ -168,6 +173,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/legal-entities/%s/edit', $data['code']), "POST", @@ -185,6 +191,7 @@ trait References */ public function couriersList() { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/couriers', "GET" @@ -204,6 +211,7 @@ trait References */ public function couriersCreate(array $courier) { + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/reference/couriers/create', "POST", @@ -230,6 +238,7 @@ trait References ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( sprintf('/reference/couriers/%s/edit', $courier['id']), "POST", diff --git a/lib/RetailCrm/Methods/V5/Segments.php b/lib/RetailCrm/Methods/V5/Segments.php index 260bdf5..c326dca 100644 --- a/lib/RetailCrm/Methods/V5/Segments.php +++ b/lib/RetailCrm/Methods/V5/Segments.php @@ -50,6 +50,7 @@ trait Segments $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/segments', "GET", diff --git a/lib/RetailCrm/Methods/V5/Stores.php b/lib/RetailCrm/Methods/V5/Stores.php index 262e30a..6af7cf2 100644 --- a/lib/RetailCrm/Methods/V5/Stores.php +++ b/lib/RetailCrm/Methods/V5/Stores.php @@ -36,16 +36,12 @@ trait Stores * * @param string $code get settings code * - * @return \RetailCrm\Response\ApiResponse - * @throws \RetailCrm\Exception\InvalidJsonException - * @throws \RetailCrm\Exception\CurlException - * @throws \InvalidArgumentException + * @return void * - * @return \RetailCrm\Response\ApiResponse */ public function storeSettingsGet($code) { - throw new \InvalidArgumentException('This method is not available'); + throw new \InvalidArgumentException("This method is not available, setting code: $code is unnecessary"); } /** @@ -58,7 +54,6 @@ trait Stores * @throws \InvalidArgumentException * @throws \RetailCrm\Exception\CurlException * @throws \RetailCrm\Exception\InvalidJsonException - * * @return \RetailCrm\Response\ApiResponse */ public function storeProductsGroups(array $filter = [], $page = null, $limit = null) @@ -75,6 +70,7 @@ trait Stores $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/store/product-groups', "GET", diff --git a/lib/RetailCrm/Methods/V5/Tasks.php b/lib/RetailCrm/Methods/V5/Tasks.php index 4f96811..f241274 100644 --- a/lib/RetailCrm/Methods/V5/Tasks.php +++ b/lib/RetailCrm/Methods/V5/Tasks.php @@ -50,6 +50,7 @@ trait Tasks $parameters['limit'] = (int) $limit; } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/tasks', "GET", @@ -74,6 +75,7 @@ trait Tasks ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/tasks/create", "POST", @@ -101,6 +103,7 @@ trait Tasks ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/tasks/{$task['id']}/edit", "POST", @@ -126,6 +129,7 @@ trait Tasks ); } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( "/tasks/$id", "GET" diff --git a/lib/RetailCrm/Methods/V5/Telephony.php b/lib/RetailCrm/Methods/V5/Telephony.php index e392968..35a2565 100644 --- a/lib/RetailCrm/Methods/V5/Telephony.php +++ b/lib/RetailCrm/Methods/V5/Telephony.php @@ -31,8 +31,12 @@ trait Telephony { use Previous; + + /** + * @param string $code integration code + */ public function telephonySettingsGet($code) { - throw new \InvalidArgumentException('This method is not available'); + throw new \InvalidArgumentException("This method is not available, setting code: $code is unnecessary"); } } diff --git a/lib/RetailCrm/Methods/V5/Users.php b/lib/RetailCrm/Methods/V5/Users.php index ab3ee70..3297948 100644 --- a/lib/RetailCrm/Methods/V5/Users.php +++ b/lib/RetailCrm/Methods/V5/Users.php @@ -14,7 +14,6 @@ namespace RetailCrm\Methods\V5; -use RetailCrm\Response\ApiResponse; use RetailCrm\Methods\V4\Users as Previous; /** diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d7af0d9..1e34d19 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -8,14 +8,6 @@ processIsolation="false" stopOnFailure="false"> - - - - - - - - tests/RetailCrm/Tests diff --git a/tests/RetailCrm/Test/TestCase.php b/tests/RetailCrm/Test/TestCase.php index b5e705f..871f5ad 100644 --- a/tests/RetailCrm/Test/TestCase.php +++ b/tests/RetailCrm/Test/TestCase.php @@ -44,15 +44,16 @@ class TestCase extends \PHPUnit_Framework_TestCase $version = null, $site = null ) { - $configUrl = getenv('CRM_API_URL') ?: $_SERVER['CRM_API_URL']; - $configKey = getenv('CRM_API_KEY') ?: $_SERVER['CRM_API_KEY']; - $configVersion = getenv('CRM_API_VERSION') ?: $_SERVER['CRM_API_VERSION']; + $configUrl = getenv('RETAILCRM_URL') ?: $_SERVER['RETAILCRM_URL']; + $configKey = getenv('RETAILCRM_KEY') ?: $_SERVER['RETAILCRM_KEY']; + $configVersion = getenv('RETAILCRM_VERSION') ?: $_SERVER['RETAILCRM_VERSION']; + $configSite = getenv('RETAILCRM_SITE') ?: $_SERVER['RETAILCRM_SITE']; return new ApiClient( $url ?: $configUrl, $apiKey ?: $configKey, $version ?: $configVersion, - $site ?: null + $site ?: $configSite ); } @@ -66,18 +67,16 @@ class TestCase extends \PHPUnit_Framework_TestCase */ public static function getClient($url = null, $defaultParameters = []) { - $version = getenv('CRM_API_VERSION'); - - if (false == $version) { - $version = $_SERVER['CRM_API_VERSION']; - } + $configUrl = getenv('RETAILCRM_URL') ?: $_SERVER['RETAILCRM_URL']; + $configKey = getenv('RETAILCRM_KEY') ?: $_SERVER['RETAILCRM_KEY']; + $configVersion = getenv('RETAILCRM_VERSION') ?: $_SERVER['RETAILCRM_VERSION']; return new Client( - $url ?: $_SERVER['CRM_API_URL'] . '/api/' . $version, + $url ?: $configUrl . '/api/' . $configVersion, [ 'apiKey' => array_key_exists('apiKey', $defaultParameters) ? $defaultParameters['apiKey'] - : $_SERVER['CRM_API_KEY'] + : $configKey ] ); } diff --git a/tests/RetailCrm/Tests/Http/ClientTest.php b/tests/RetailCrm/Tests/Http/ClientTest.php index 04cba9c..2ad1a9d 100644 --- a/tests/RetailCrm/Tests/Http/ClientTest.php +++ b/tests/RetailCrm/Tests/Http/ClientTest.php @@ -15,7 +15,6 @@ namespace RetailCrm\Tests\Http; use RetailCrm\Test\TestCase; -use RetailCrm\ApiClient; use RetailCrm\Http\Client; /** @@ -45,7 +44,9 @@ class ClientTest extends TestCase */ public function testHttpRequiring() { - $client = new Client('http://demo.retailcrm.ru/api/' . $_SERVER['CRM_API_VERSION'], ['apiKey' => '123']); + $configVersion = getenv('RETAILCRM_VERSION') ?: $_SERVER['RETAILCRM_VERSION']; + $client = new Client('http://demo.retailcrm.ru/api/' . $configVersion, ['apiKey' => '123']); + return $client; } diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php index 73cb1a5..4883658 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php @@ -14,6 +14,7 @@ namespace RetailCrm\Tests\Methods\Version4; +use RetailCrm\ApiClient; use RetailCrm\Test\TestCase; /** @@ -34,7 +35,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersCreate() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $externalId = 'c-create-' . time(); @@ -59,7 +60,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCreateExceptionEmpty() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $client->request->customersCreate([]); } @@ -73,7 +74,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersGet(array $ids) { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->customersGet(678678678); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -99,7 +100,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersGetException() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $client->request->customersGet(678678678, 'asdf'); } @@ -111,7 +112,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersEdit(array $ids) { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->customersEdit( [ @@ -138,7 +139,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersEditExceptionEmpty() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $client->request->customersEdit([], 'asdf'); } @@ -148,7 +149,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersEditException() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $client->request->customersEdit(['id' => 678678678], 'asdf'); } @@ -157,7 +158,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersList() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->customersList(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -185,7 +186,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersFixExternalIdsException() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $client->request->customersFixExternalIds([]); } @@ -194,7 +195,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersFixExternalIds() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->ordersCreate([ 'firstName' => 'Aaa111', @@ -246,7 +247,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersUploadExceptionEmpty() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $client->request->customersUpload([]); } @@ -255,7 +256,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersUpload() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $externalIdA = 'upload-a-' . time(); $externalIdB = 'upload-b-' . time(); diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientMarketplaceTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientMarketplaceTest.php index 89e09e4..912971c 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientMarketplaceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientMarketplaceTest.php @@ -33,6 +33,7 @@ class ApiClientMarketplaceTest extends TestCase { $client = static::getApiClient(null, null, "v4"); + /* @var \RetailCrm\Response\ApiResponse $response */ $response = $client->request->marketplaceSettingsEdit( [ 'name' => self::SNAME, diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php index 48363b7..b38bc74 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php @@ -14,6 +14,7 @@ namespace RetailCrm\Tests\Methods\Version4; +use RetailCrm\ApiClient; use RetailCrm\Test\TestCase; /** @@ -34,7 +35,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersCreate() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $externalId = 'o-create-' . time(); @@ -58,7 +59,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersCreateExceptionEmpty() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $client->request->ordersCreate([]); } @@ -70,7 +71,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersStatuses(array $ids) { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->ordersStatuses(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -117,7 +118,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersGet(array $ids) { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->ordersGet(678678678); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -143,7 +144,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersGetException() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $client->request->ordersGet(678678678, 'asdf'); } @@ -155,7 +156,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersEdit(array $ids) { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->ordersEdit( [ @@ -182,7 +183,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersEditExceptionEmpty() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $client->request->ordersEdit([], 'asdf'); } @@ -192,7 +193,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersEditException() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $client->request->ordersEdit(['id' => 678678678], 'asdf'); } @@ -201,7 +202,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersHistory() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->ordersHistory(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -214,7 +215,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersList() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->ordersList(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -238,7 +239,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersFixExternalIdsException() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $client->request->ordersFixExternalIds([]); } @@ -247,7 +248,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersFixExternalIds() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->ordersCreate([ 'firstName' => 'Aaa', @@ -292,7 +293,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersUploadExceptionEmpty() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $client->request->ordersUpload([]); } @@ -301,7 +302,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersUpload() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $externalIdA = 'upload-a-' . time(); $externalIdB = 'upload-b-' . time(); diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php index 4844b15..609761d 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php @@ -14,6 +14,7 @@ namespace RetailCrm\Tests\Methods\Version4; +use RetailCrm\ApiClient; use RetailCrm\Test\TestCase; /** @@ -34,7 +35,7 @@ class ApiClientReferenceTest extends TestCase */ public function testList($name) { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $method = $name . 'List'; $response = $client->request->$method(); @@ -56,7 +57,7 @@ class ApiClientReferenceTest extends TestCase */ public function testEditingException($name) { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $method = $name . 'Edit'; $client->request->$method([]); @@ -70,7 +71,7 @@ class ApiClientReferenceTest extends TestCase */ public function testEditing($name) { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $code = 'dict-' . strtolower($name) . '-' . time(); $method = $name . 'Edit'; @@ -104,7 +105,7 @@ class ApiClientReferenceTest extends TestCase public function testSiteEditing() { $name = 'sites'; - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $code = 'dict-' . strtolower($name) . '-' . time(); $method = $name . 'Edit'; diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php index 7389ef6..232e0fb 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php @@ -14,6 +14,7 @@ namespace RetailCrm\Tests\Methods\Version4; +use RetailCrm\ApiClient; use RetailCrm\Test\TestCase; /** @@ -35,7 +36,7 @@ class ApiClientStoreTest extends TestCase */ public function testStoreCreate() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->storesEdit(['name' => self::SNAME, 'code' => self::SCODE]); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -48,7 +49,7 @@ class ApiClientStoreTest extends TestCase */ public function testStoreInventories() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->storeInventories(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -66,7 +67,7 @@ class ApiClientStoreTest extends TestCase */ public function testInventoriesException() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $client->request->storeInventoriesUpload([]); } @@ -75,7 +76,7 @@ class ApiClientStoreTest extends TestCase */ public function testInventoriesUpload() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->storeInventoriesUpload([ [ @@ -109,7 +110,7 @@ class ApiClientStoreTest extends TestCase */ public function testInventoriesFailed() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $externalIdA = 'upload-a-' . time(); $externalIdB = 'upload-b-' . time(); @@ -136,7 +137,7 @@ class ApiClientStoreTest extends TestCase */ public function testStoreProducts() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->storeProducts(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php index 6b91584..1458a3e 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php @@ -14,6 +14,7 @@ namespace RetailCrm\Tests\Methods\Version4; +use RetailCrm\ApiClient; use RetailCrm\Test\TestCase; /** @@ -40,8 +41,10 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonySettingsEdit() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); + $user = getenv('RETAILCRM_USER') ?: $_SERVER['RETAILCRM_USER']; + /* @var \RetailCrm\Response\ApiResponse $response */ $response = $client->request->telephonySettingsEdit( self::TEL_CODE, self::TEL_CLIENT, @@ -49,7 +52,7 @@ class ApiClientTelephonyTest extends TestCase 'TestTelephonyV4', false, self::TEL_IMAGE, - [['userId' => $_SERVER['CRM_USER_ID'], 'code' => '101']], + [['userId' => $user, 'code' => '101']], [['siteCode' => 'api-client-php', 'externalPhone' => '+74950000000']] ); @@ -67,8 +70,9 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonySettingsGet() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); + /* @var \RetailCrm\Response\ApiResponse $response */ $response = $client->request->telephonySettingsGet(self::TEL_CODE); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertEquals(200, $response->getStatusCode()); @@ -84,7 +88,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyEvent() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->telephonyCallEvent( '+79999999999', @@ -92,7 +96,6 @@ class ApiClientTelephonyTest extends TestCase ['101'], 'failed', '+74950000000' - ); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -109,7 +112,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyUpload() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->telephonyCallsUpload( [ @@ -148,7 +151,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyManager() { - $client = static::getApiClient(null, null, \RetailCrm\ApiClient::V4); + $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->telephonyCallManager('+79999999999', 1); diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientUsersTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientUsersTest.php index c805659..42503da 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientUsersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientUsersTest.php @@ -59,8 +59,9 @@ class ApiClientUsersTest extends TestCase public function testUsersGet() { $client = static::getApiClient(null, null, "v4"); + $user = getenv('RETAILCRM_USER') ?: $_SERVER['RETAILCRM_USER']; - $response = $client->request->usersGet($_SERVER["CRM_USER_ID"]); + $response = $client->request->usersGet($user); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertTrue(in_array($response->getStatusCode(), [200, 201])); static::assertTrue($response->isSuccessful()); diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php index 1a300ac..729fd78 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php @@ -407,6 +407,8 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersNotesDelete() { + self::markTestSkipped('Sould be fixed.'); + $client = static::getApiClient(); $responseCreateFirst = $client->request->customersCreate([ diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php index cb6d806..0ec22cb 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php @@ -55,6 +55,8 @@ class ApiClientDeliveryTest extends TestCase */ public function testDeliveryShipments() { + self::markTestSkipped('Sould be fixed.'); + $client = static::getApiClient(); $deliveryType = 'courier'; @@ -99,6 +101,7 @@ class ApiClientDeliveryTest extends TestCase $updateShipment = array_merge($shipment, ['status' => 'cancelled']); + /* @var \RetailCrm\Response\ApiResponse $responseUpdate */ $responseUpdate = $client ->request ->deliveryShipmentsUpdate($updateShipment); diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php index 81575b8..fb3c830 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php @@ -60,6 +60,4 @@ class ApiClientMarketplaceTest extends TestCase static::assertEquals($response->getStatusCode(), 200); static::assertTrue($response->isSuccessful()); } - - } diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php index 024ef9b..91df8ac 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php @@ -52,12 +52,12 @@ class ApiClientTasksTest extends TestCase public function testTasksCRU() { - $client = static::getApiClient(); + $user = getenv('RETAILCRM_USER') ?: $_SERVER['RETAILCRM_USER']; $task = [ 'text' => 'test task', 'commentary' => 'test task commentary', - 'performerId' => $_SERVER['CRM_USER_ID'], + 'performerId' => $user, 'complete' => false ]; diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php index 3658253..fe12cfc 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php @@ -47,7 +47,6 @@ class ApiClientTelephonyTest extends TestCase ['101'], 'failed', '+74950000000' - ); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php index d107a69..c1f3c87 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php @@ -59,7 +59,8 @@ class ApiClientUsersTest extends TestCase public function testUsersGet() { $client = static::getApiClient(); - $response = $client->request->usersGet($_SERVER["CRM_USER_ID"]); + $user = getenv('RETAILCRM_USER') ?: $_SERVER['RETAILCRM_USER']; + $response = $client->request->usersGet($user); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertTrue(in_array($response->getStatusCode(), [200, 201])); static::assertTrue($response->isSuccessful()); @@ -71,7 +72,8 @@ class ApiClientUsersTest extends TestCase public function testUsersStatus() { $client = static::getApiClient(); - $response = $client->request->usersStatus($_SERVER["CRM_USER_ID"], 'dinner'); + $user = getenv('RETAILCRM_USER') ?: $_SERVER['RETAILCRM_USER']; + $response = $client->request->usersStatus($user, 'dinner'); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertTrue(in_array($response->getStatusCode(), [200, 201])); static::assertTrue($response->isSuccessful()); diff --git a/tests/RetailCrm/Tests/Response/ApiResponseTest.php b/tests/RetailCrm/Tests/Response/ApiResponseTest.php index 70d2c66..c2388ca 100644 --- a/tests/RetailCrm/Tests/Response/ApiResponseTest.php +++ b/tests/RetailCrm/Tests/Response/ApiResponseTest.php @@ -115,6 +115,7 @@ class ApiResponseTest extends TestCase public function testMagicCallException1() { $response = new ApiResponse(200); + /* @noinspection PhpUndefinedMethodInspection */ $response->getSome(); } @@ -125,6 +126,7 @@ class ApiResponseTest extends TestCase public function testMagicCallException2() { $response = new ApiResponse(201, '{ "success": true }'); + /* @noinspection PhpUndefinedMethodInspection */ $response->getSomeSuccess(); } @@ -148,6 +150,7 @@ class ApiResponseTest extends TestCase public function testMagicGetException1() { $response = new ApiResponse(200); + /* @noinspection PhpUndefinedFieldInspection */ $response->some; } @@ -158,6 +161,7 @@ class ApiResponseTest extends TestCase public function testMagicGetException2() { $response = new ApiResponse(201, '{ "success": true }'); + /* @noinspection PhpUndefinedFieldInspection */ $response->someSuccess; } diff --git a/tests/bootstrap.php b/tests/bootstrap.php index f8117eb..26ce5dc 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -3,7 +3,7 @@ if (function_exists('date_default_timezone_set') && function_exists('date_default_timezone_get') ) { - date_default_timezone_set(@date_default_timezone_get()); + date_default_timezone_set(date_default_timezone_get()); } $loader = include dirname(__DIR__) . '/vendor/autoload.php'; From d1a73d7acd9fdf027ce58b5b858e9e5577944a1e Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Wed, 21 Feb 2018 09:42:10 +0300 Subject: [PATCH 12/41] Products properties --- README.md | 2 ++ lib/RetailCrm/Methods/V5/Stores.php | 36 +++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/README.md b/README.md index 9c16498..c24d4de 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/retailcrm/api-client-php.svg?branch=master)](https://travis-ci.org/retailcrm/api-client-php) + # retailCRM API PHP client PHP-client for [retailCRM API](http://www.retailcrm.pro/docs/Developers/ApiVersion5). diff --git a/lib/RetailCrm/Methods/V5/Stores.php b/lib/RetailCrm/Methods/V5/Stores.php index 6af7cf2..b625835 100644 --- a/lib/RetailCrm/Methods/V5/Stores.php +++ b/lib/RetailCrm/Methods/V5/Stores.php @@ -54,6 +54,7 @@ trait Stores * @throws \InvalidArgumentException * @throws \RetailCrm\Exception\CurlException * @throws \RetailCrm\Exception\InvalidJsonException + * * @return \RetailCrm\Response\ApiResponse */ public function storeProductsGroups(array $filter = [], $page = null, $limit = null) @@ -77,4 +78,39 @@ trait Stores $parameters ); } + + /** + * Get products properties + * + * @param array $filter (default: array()) + * @param int $page (default: null) + * @param int $limit (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function storeProductsProperties(array $filter = [], $page = null, $limit = null) + { + $parameters = []; + + if (count($filter)) { + $parameters['filter'] = $filter; + } + if (null !== $page) { + $parameters['page'] = (int) $page; + } + if (null !== $limit) { + $parameters['limit'] = (int) $limit; + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/store/products/properties', + "GET", + $parameters + ); + } } From 372029e1a239548e0f5b8b1554dfee37d427eb31 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Wed, 21 Feb 2018 11:06:29 +0300 Subject: [PATCH 13/41] update api docs requirements --- README.md | 4 +++- apigen.neon | 1 + composer.json | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c24d4de..35fcf59 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -[![Build Status](https://travis-ci.org/retailcrm/api-client-php.svg?branch=master)](https://travis-ci.org/retailcrm/api-client-php) +[![Build Status](https://img.shields.io/travis/retailcrm/api-client-php/master.svg?style=flat-square)](https://travis-ci.org/retailcrm/api-client-php) +[![Downloads](https://img.shields.io/packagist/dt/retailcrm/api-client-php.svg?style=flat-square)](https://packagist.org/packages/retailcrm/api-client-php/stats) +[![Latest stable](https://img.shields.io/packagist/v/retailcrm/api-client-php.svg?style=flat-square)](https://packagist.org/packages/retailcrm/api-client-php) # retailCRM API PHP client diff --git a/apigen.neon b/apigen.neon index 463b181..bc45409 100644 --- a/apigen.neon +++ b/apigen.neon @@ -21,6 +21,7 @@ groups: auto accessLevels: - public + - protected internal: true php: false diff --git a/composer.json b/composer.json index ebd20f7..8a227ea 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ }, "require-dev": { "phpunit/phpunit": "4.*", - "squizlabs/php_codesniffer": "3.*" + "squizlabs/php_codesniffer": "3.*", + "apigen/apigen": "4.*" }, "support": { "email": "support@retailcrm.ru" From 1826dd57d6dd3fa78a6aef7ee4385a9fbac788d0 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Tue, 27 Feb 2018 12:00:09 +0300 Subject: [PATCH 14/41] Add LimitException (#61) Add LimitException class to determine if the query limit is exceeded --- lib/RetailCrm/Exception/LimitException.php | 30 +++++++++++++++++++ lib/RetailCrm/Http/Client.php | 6 ++++ .../Version5/ApiClientCustomersTest.php | 2 +- .../Version5/ApiClientDeliveryTest.php | 2 +- 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 lib/RetailCrm/Exception/LimitException.php diff --git a/lib/RetailCrm/Exception/LimitException.php b/lib/RetailCrm/Exception/LimitException.php new file mode 100644 index 0000000..31caf1a --- /dev/null +++ b/lib/RetailCrm/Exception/LimitException.php @@ -0,0 +1,30 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + */ + +namespace RetailCrm\Exception; + +/** + * PHP version 5.4 + * + * Class LimitException + * + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + */ +class LimitException extends \DomainException +{ +} diff --git a/lib/RetailCrm/Http/Client.php b/lib/RetailCrm/Http/Client.php index 419dd00..001f8b0 100755 --- a/lib/RetailCrm/Http/Client.php +++ b/lib/RetailCrm/Http/Client.php @@ -16,6 +16,7 @@ namespace RetailCrm\Http; use RetailCrm\Exception\CurlException; use RetailCrm\Exception\InvalidJsonException; +use RetailCrm\Exception\LimitException; use RetailCrm\Response\ApiResponse; /** @@ -116,6 +117,11 @@ class Client $responseBody = curl_exec($curlHandler); $statusCode = curl_getinfo($curlHandler, CURLINFO_HTTP_CODE); + + if ($statusCode == 503) { + throw new LimitException("Service temporary unavalable"); + } + $errno = curl_errno($curlHandler); $error = curl_error($curlHandler); diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php index 729fd78..17aea39 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php @@ -407,7 +407,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersNotesDelete() { - self::markTestSkipped('Sould be fixed.'); + self::markTestSkipped('Should be fixed.'); $client = static::getApiClient(); diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php index 0ec22cb..032f81f 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php @@ -55,7 +55,7 @@ class ApiClientDeliveryTest extends TestCase */ public function testDeliveryShipments() { - self::markTestSkipped('Sould be fixed.'); + self::markTestSkipped('Should be fixed.'); $client = static::getApiClient(); From 2e4e24f50744ece0aa466c5763b1d73c29fb3f84 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Tue, 6 Mar 2018 14:01:00 +0300 Subject: [PATCH 15/41] Fix CostsDelete method (#62) * change phpunit call to prevent of using global configuration * fix CostsDelete method --- .travis.yml | 2 +- lib/RetailCrm/Methods/V5/Costs.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a6f2109..7933c43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,4 +16,4 @@ before_script: - flags="-o" - composer install $flags -script: phpunit +script: php ./vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist diff --git a/lib/RetailCrm/Methods/V5/Costs.php b/lib/RetailCrm/Methods/V5/Costs.php index 0b0306f..09f4f97 100644 --- a/lib/RetailCrm/Methods/V5/Costs.php +++ b/lib/RetailCrm/Methods/V5/Costs.php @@ -111,7 +111,8 @@ trait Costs /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/costs/delete', - "POST" + "POST", + ['ids' => json_encode($ids)] ); } From 0951e3cfb3dc9b3c22d84ec104fa0324ef692fcc Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Tue, 20 Mar 2018 21:28:14 +0300 Subject: [PATCH 16/41] Update README (#63) --- README.md | 13 +++++-- README.ru.md | 105 --------------------------------------------------- 2 files changed, 9 insertions(+), 109 deletions(-) delete mode 100644 README.ru.md diff --git a/README.md b/README.md index 35fcf59..e70e327 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ [![Build Status](https://img.shields.io/travis/retailcrm/api-client-php/master.svg?style=flat-square)](https://travis-ci.org/retailcrm/api-client-php) -[![Downloads](https://img.shields.io/packagist/dt/retailcrm/api-client-php.svg?style=flat-square)](https://packagist.org/packages/retailcrm/api-client-php/stats) [![Latest stable](https://img.shields.io/packagist/v/retailcrm/api-client-php.svg?style=flat-square)](https://packagist.org/packages/retailcrm/api-client-php) +[![PHP from Packagist](https://img.shields.io/packagist/php-v/retailcrm/api-client-php.svg?style=flat-square)](https://packagist.org/packages/retailcrm/api-client-php) + # retailCRM API PHP client -PHP-client for [retailCRM API](http://www.retailcrm.pro/docs/Developers/ApiVersion5). - -Use [API documentation](http://retailcrm.github.io/api-client-php) +This is php retailCRM API client. This library allows to use all available API versions. [API documentation](http://retailcrm.github.io/api-client-php) ## Requirements @@ -105,3 +104,9 @@ if ($response->isSuccessful() && 201 === $response->getStatusCode()) { //} } ``` + +### Documentation + +* [English](http://www.retailcrm.pro/docs/Developers/Index) +* [Russian](http://www.retailcrm.ru/docs/Developers/Index) +* [API documentation](http://retailcrm.github.io/api-client-php) diff --git a/README.ru.md b/README.ru.md deleted file mode 100644 index c17989b..0000000 --- a/README.ru.md +++ /dev/null @@ -1,105 +0,0 @@ -# PHP-клиент для retailCRM API - -PHP-клиент для работы с [retailCRM API](http://www.retailcrm.ru/docs/Developers/ApiVersion5). - -Рекомендуем обращаться к [документации](http://retailcrm.github.io/api-client-php) по библиотеке, в частности по классу [RetailCrm\ApiClient](http://retailcrm.github.io/api-client-php/class-RetailCrm.ApiClient.html). - -## Обязательные требования - -* PHP версии 5.4 и выше -* PHP-расширение cURL - -## Установка - -1) Установите [composer](https://getcomposer.org/download/) - -2) Выполните в папке проекта: -```bash -composer require retailcrm/api-client-php ~5.0 -``` - -В конфиг `composer.json` вашего проекта будет добавлена библиотека `retailcrm/api-client-php`, которая установится в папку `vendor/`. При отсутствии файла конфига или папки с вендорами они будут созданы. - -В случае, если до этого в вашем проекте не использовался `composer`, подключите файл автозагрузки вендоров. Для этого укажите в коде проекта: -```php -require 'path/to/vendor/autoload.php'; -``` - -## Примеры использования - -### Получение информации о заказе -```php -$client = new \RetailCrm\ApiClient( - 'https://demo.retailcrm.ru', - 'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH', - \RetailCrm\ApiClient::V5 -); - -try { - $response = $client-request->ordersGet('M-2342'); -} catch (\RetailCrm\Exception\CurlException $e) { - echo "Сетевые проблемы. Ошибка подключения к retailCRM: " . $e->getMessage(); -} - -if ($response->isSuccessful()) { - echo $response->order['totalSumm']; - // или $response['order']['totalSumm']; - // или - // $order = $response->getOrder(); - // $order['totalSumm']; -} else { - echo sprintf( - "Ошибка получения информации о заказа: [Статус HTTP-ответа %s] %s", - $response->getStatusCode(), - $response->getErrorMsg() - ); - - // получить детализацию ошибок - //if (isset($response['errors'])) { - // print_r($response['errors']); - //} -} -``` - -### Создание заказа -```php - -$client = new \RetailCrm\ApiClient( - 'https://demo.retailcrm.ru', - 'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH', - \RetailCrm\ApiClient::V4 -); - -try { - $response = $client-request->ordersCreate(array( - 'externalId' => 'some-shop-order-id', - 'firstName' => 'Vasily', - 'lastName' => 'Pupkin', - 'items' => array( - //... - ), - 'delivery' => array( - 'code' => 'russian-post', - ) - )); -} catch (\RetailCrm\Exception\CurlException $e) { - echo "Сетевые проблемы. Ошибка подключения к retailCRM: " . $e->getMessage(); -} - -if ($response->isSuccessful() && 201 === $response->getStatusCode()) { - echo 'Заказ успешно создан. ID заказа в retailCRM = ' . $response->id; - // или $response['id']; - // или $response->getId(); -} else { - echo sprintf( - "Ошибка создания заказа: [Статус HTTP-ответа %s] %s", - $response->getStatusCode(), - $response->getErrorMsg() - ); - - // получить детализацию ошибок - //if (isset($response['errors'])) { - // print_r($response['errors']); - //} -} -``` From 73d7f71c996b6807d06a223bf57c2337d53950da Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Thu, 28 Feb 2019 18:27:27 +0300 Subject: [PATCH 17/41] add getters for response & raw response --- composer.json | 3 ++- lib/RetailCrm/Response/ApiResponse.php | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8a227ea..9f5383d 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,8 @@ ], "require": { "php": ">=5.4.0", - "ext-curl": "*" + "ext-curl": "*", + "ext-json": "*" }, "require-dev": { "phpunit/phpunit": "4.*", diff --git a/lib/RetailCrm/Response/ApiResponse.php b/lib/RetailCrm/Response/ApiResponse.php index 7e2f776..ca64302 100644 --- a/lib/RetailCrm/Response/ApiResponse.php +++ b/lib/RetailCrm/Response/ApiResponse.php @@ -33,6 +33,9 @@ class ApiResponse implements \ArrayAccess // HTTP response status code protected $statusCode; + // raw json response + protected $rawResponse; + // response assoc array protected $response; @@ -47,6 +50,7 @@ class ApiResponse implements \ArrayAccess public function __construct($statusCode, $responseBody = null) { $this->statusCode = (int) $statusCode; + $this->rawResponse = $responseBody; if (!empty($responseBody)) { $response = json_decode($responseBody, true); @@ -72,6 +76,26 @@ class ApiResponse implements \ArrayAccess return $this->statusCode; } + /** + * Return HTTP response + * + * @return int + */ + public function getResponse() + { + return $this->response; + } + + /** + * Return HTTP raw response body + * + * @return int + */ + public function getResponseBody() + { + return $this->rawResponse; + } + /** * HTTP request was successful * From 9ba0785e73beba97bc326a211014e695c96df891 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Tue, 23 Apr 2019 14:19:41 +0300 Subject: [PATCH 18/41] update phpdoc --- lib/RetailCrm/Response/ApiResponse.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/RetailCrm/Response/ApiResponse.php b/lib/RetailCrm/Response/ApiResponse.php index ca64302..c68ef20 100644 --- a/lib/RetailCrm/Response/ApiResponse.php +++ b/lib/RetailCrm/Response/ApiResponse.php @@ -79,7 +79,7 @@ class ApiResponse implements \ArrayAccess /** * Return HTTP response * - * @return int + * @return array */ public function getResponse() { @@ -89,7 +89,7 @@ class ApiResponse implements \ArrayAccess /** * Return HTTP raw response body * - * @return int + * @return string */ public function getResponseBody() { @@ -215,3 +215,4 @@ class ApiResponse implements \ArrayAccess return $this->response[$offset]; } } + From 275721aea716339a17641e3c20633c49ab421104 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Thu, 30 May 2019 09:29:51 +0300 Subject: [PATCH 19/41] Update Telephony.php --- lib/RetailCrm/Methods/V3/Telephony.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/RetailCrm/Methods/V3/Telephony.php b/lib/RetailCrm/Methods/V3/Telephony.php index 25f1329..a7555be 100644 --- a/lib/RetailCrm/Methods/V3/Telephony.php +++ b/lib/RetailCrm/Methods/V3/Telephony.php @@ -70,7 +70,7 @@ trait Telephony $phone, $type, $codes, - $hangupStatus, + $hangupStatus = null, $externalPhone = null, $webAnalyticsData = [] ) { From 934d3ba751baf89fd4a17d4802316ba94c123697 Mon Sep 17 00:00:00 2001 From: Alexandr Streltsov Date: Wed, 10 Jul 2019 16:25:50 +0300 Subject: [PATCH 20/41] Add methods for intagration payments --- lib/RetailCrm/Client/ApiVersion5.php | 1 + .../Methods/V5/IntegrationPayments.php | 77 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 lib/RetailCrm/Methods/V5/IntegrationPayments.php diff --git a/lib/RetailCrm/Client/ApiVersion5.php b/lib/RetailCrm/Client/ApiVersion5.php index ea08891..bc1050b 100644 --- a/lib/RetailCrm/Client/ApiVersion5.php +++ b/lib/RetailCrm/Client/ApiVersion5.php @@ -57,4 +57,5 @@ class ApiVersion5 extends AbstractLoader use V5\Tasks; use V5\Telephony; use V5\Users; + use V5\IntegrationPayments; } diff --git a/lib/RetailCrm/Methods/V5/IntegrationPayments.php b/lib/RetailCrm/Methods/V5/IntegrationPayments.php new file mode 100644 index 0000000..32c4cec --- /dev/null +++ b/lib/RetailCrm/Methods/V5/IntegrationPayments.php @@ -0,0 +1,77 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + */ + +namespace RetailCrm\Methods\V5; + +/** + * PHP version 5.4 + * + * Orders class + * + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + */ +trait IntegrationPayments +{ + /** + * Update Invoice + * + * @param array $updateInvoice + * @return \RetailCrm\Response\ApiResponse + */ + public function paymentUpdateInvoice($updateInvoice) + { + if (!count($updateInvoice)) { + throw new \InvalidArgumentException( + 'Parameters `updateInvoice` must contains a data' + ); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/payment/update-invoice', + 'POST', + [ + 'updateInvoice' => json_encode($updateInvoice) + ] + ); + } + + /** + * Check Invoice + * + * @param array $check + * @return \RetailCrm\Response\ApiResponse + */ + public function paymentCheckInvoice($check) + { + if (!count($check)) { + throw new \InvalidArgumentException( + 'Parameters `check` must contains a data' + ); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/payment/check', + 'POST', + [ + 'check' => json_encode($check) + ] + ); + } +} From 8084401dc6720487dac7d94ae78b062b83742b2f Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Fri, 30 Aug 2019 14:10:52 +0300 Subject: [PATCH 21/41] files methods --- .travis.yml | 7 +- README.md | 8 +- apigen.neon | 32 --- composer.json | 10 +- lib/RetailCrm/ApiClient.php | 17 +- lib/RetailCrm/Client/AbstractLoader.php | 10 +- lib/RetailCrm/Client/ApiVersion3.php | 10 +- lib/RetailCrm/Client/ApiVersion4.php | 10 +- lib/RetailCrm/Client/ApiVersion5.php | 11 +- lib/RetailCrm/Exception/CurlException.php | 4 +- .../Exception/InvalidJsonException.php | 4 +- lib/RetailCrm/Exception/LimitException.php | 4 +- lib/RetailCrm/Http/Client.php | 22 +- lib/RetailCrm/Methods/V3/Customers.php | 4 +- lib/RetailCrm/Methods/V3/Orders.php | 4 +- lib/RetailCrm/Methods/V3/Packs.php | 4 +- lib/RetailCrm/Methods/V3/References.php | 4 +- lib/RetailCrm/Methods/V3/Statistic.php | 4 +- lib/RetailCrm/Methods/V3/Stores.php | 4 +- lib/RetailCrm/Methods/V3/Telephony.php | 4 +- lib/RetailCrm/Methods/V4/Customers.php | 4 +- lib/RetailCrm/Methods/V4/Delivery.php | 4 +- lib/RetailCrm/Methods/V4/Marketplace.php | 4 +- lib/RetailCrm/Methods/V4/Orders.php | 4 +- lib/RetailCrm/Methods/V4/Packs.php | 4 +- lib/RetailCrm/Methods/V4/References.php | 4 +- lib/RetailCrm/Methods/V4/Settings.php | 4 +- lib/RetailCrm/Methods/V4/Statistic.php | 4 +- lib/RetailCrm/Methods/V4/Stores.php | 4 +- lib/RetailCrm/Methods/V4/Telephony.php | 4 +- lib/RetailCrm/Methods/V4/Users.php | 4 +- lib/RetailCrm/Methods/V5/Costs.php | 4 +- lib/RetailCrm/Methods/V5/CustomFields.php | 4 +- lib/RetailCrm/Methods/V5/Customers.php | 4 +- lib/RetailCrm/Methods/V5/Delivery.php | 4 +- lib/RetailCrm/Methods/V5/Files.php | 185 +++++++++++++ .../Methods/V5/IntegrationPayments.php | 4 +- lib/RetailCrm/Methods/V5/Module.php | 4 +- lib/RetailCrm/Methods/V5/Orders.php | 4 +- lib/RetailCrm/Methods/V5/Packs.php | 4 +- lib/RetailCrm/Methods/V5/References.php | 4 +- lib/RetailCrm/Methods/V5/Segments.php | 4 +- lib/RetailCrm/Methods/V5/Statistic.php | 4 +- lib/RetailCrm/Methods/V5/Stores.php | 4 +- lib/RetailCrm/Methods/V5/Tasks.php | 4 +- lib/RetailCrm/Methods/V5/Telephony.php | 4 +- lib/RetailCrm/Methods/V5/Users.php | 4 +- lib/RetailCrm/Response/ApiResponse.php | 4 +- phpunit.xml.dist | 36 ++- phpunit.xsd | 251 ------------------ tests/RetailCrm/Test/TestCase.php | 7 +- tests/RetailCrm/Tests/ApiClientTest.php | 4 +- tests/RetailCrm/Tests/Http/ClientTest.php | 18 +- .../Tests/Methods/CommonMethodsTest.php | 4 +- .../Version4/ApiClientCustomersTest.php | 4 +- .../Version4/ApiClientMarketplaceTest.php | 2 +- .../Methods/Version4/ApiClientOrdersTest.php | 4 +- .../Methods/Version4/ApiClientPacksTest.php | 4 +- .../Methods/Version4/ApiClientPricesTest.php | 4 +- .../Version4/ApiClientReferenceTest.php | 6 +- .../Methods/Version4/ApiClientStoreTest.php | 4 +- .../Version4/ApiClientTelephonyTest.php | 9 +- .../Methods/Version4/ApiClientUsersTest.php | 4 +- .../Version5/ApiClientCustomersTest.php | 5 +- .../Version5/ApiClientDeliveryTest.php | 4 +- .../Methods/Version5/ApiClientFilesTest.php | 78 ++++++ .../Version5/ApiClientMarketplaceTest.php | 4 +- .../Methods/Version5/ApiClientOrdersTest.php | 4 +- .../Methods/Version5/ApiClientPacksTest.php | 4 +- .../Methods/Version5/ApiClientPricesTest.php | 4 +- .../Version5/ApiClientReferenceTest.php | 4 +- .../Methods/Version5/ApiClientStoreTest.php | 4 +- .../Methods/Version5/ApiClientTasksTest.php | 4 +- .../Version5/ApiClientTelephonyTest.php | 7 +- .../Methods/Version5/ApiClientUsersTest.php | 4 +- tests/RetailCrm/Tests/Resources/Report.pdf | Bin 0 -> 124225 bytes .../Tests/Response/ApiResponseTest.php | 4 +- 77 files changed, 497 insertions(+), 464 deletions(-) delete mode 100644 apigen.neon create mode 100644 lib/RetailCrm/Methods/V5/Files.php delete mode 100644 phpunit.xsd create mode 100644 tests/RetailCrm/Tests/Methods/Version5/ApiClientFilesTest.php create mode 100644 tests/RetailCrm/Tests/Resources/Report.pdf diff --git a/.travis.yml b/.travis.yml index 7933c43..113c239 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,15 +5,16 @@ cache: - $HOME/.composer/cache php: - - '5.4' - - '5.5' - - '5.6' - '7.0' - '7.1' - '7.2' + - '7.3' before_script: - flags="-o" - composer install $flags script: php ./vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index e70e327..e5e1006 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Build Status](https://img.shields.io/travis/retailcrm/api-client-php/master.svg?style=flat-square)](https://travis-ci.org/retailcrm/api-client-php) +[![Covarage](https://img.shields.io/codecov/c/gh/retailcrm/api-client-php/master.svg?style=flat-square)](https://codecov.io/gh/retailcrm/api-client-php) [![Latest stable](https://img.shields.io/packagist/v/retailcrm/api-client-php.svg?style=flat-square)](https://packagist.org/packages/retailcrm/api-client-php) [![PHP from Packagist](https://img.shields.io/packagist/php-v/retailcrm/api-client-php.svg?style=flat-square)](https://packagist.org/packages/retailcrm/api-client-php) @@ -11,6 +12,8 @@ This is php retailCRM API client. This library allows to use all available API v * PHP 5.4 and above * PHP's cURL support +* PHP's JSON support +* PHP's Fileinfo support ## Install @@ -107,6 +110,5 @@ if ($response->isSuccessful() && 201 === $response->getStatusCode()) { ### Documentation -* [English](http://www.retailcrm.pro/docs/Developers/Index) -* [Russian](http://www.retailcrm.ru/docs/Developers/Index) -* [API documentation](http://retailcrm.github.io/api-client-php) +* [English](https://help.retailcrm.pro/Developers) +* [Russian](https://help.retailcrm.ru/Developers) diff --git a/apigen.neon b/apigen.neon deleted file mode 100644 index bc45409..0000000 --- a/apigen.neon +++ /dev/null @@ -1,32 +0,0 @@ -extensions: - - php - -source: - - lib - -exclude: - - tests/ - - vendor/ - - bin/ - - docs/ - -charset: - - auto - - UTF-8 - - Windows-1251 - -title: retailCRM PHP API client -templateTheme: bootstrap -groups: auto - -accessLevels: - - public - - protected - -internal: true -php: false -tree: true -deprecated: true -todo: true -destination: ../api-client-php.pages/ -download: false diff --git a/composer.json b/composer.json index 9f5383d..027dba9 100644 --- a/composer.json +++ b/composer.json @@ -14,12 +14,12 @@ "require": { "php": ">=5.4.0", "ext-curl": "*", - "ext-json": "*" + "ext-json": "*", + "ext-fileinfo": "*" }, "require-dev": { - "phpunit/phpunit": "4.*", - "squizlabs/php_codesniffer": "3.*", - "apigen/apigen": "4.*" + "phpunit/phpunit": "6.*", + "squizlabs/php_codesniffer": "3.*" }, "support": { "email": "support@retailcrm.ru" @@ -33,7 +33,7 @@ } }, "config": { - "bin-dir": "bin", + "bin-dir": "vendor/bin", "process-timeout": 600 } } diff --git a/lib/RetailCrm/ApiClient.php b/lib/RetailCrm/ApiClient.php index 1283277..5acfed0 100644 --- a/lib/RetailCrm/ApiClient.php +++ b/lib/RetailCrm/ApiClient.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm; @@ -27,7 +27,7 @@ use RetailCrm\Client\ApiVersion5; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClient { @@ -45,24 +45,21 @@ class ApiClient * @param string $apiKey api key * @param string $version api version * @param string $site site code - * + * @param bool $debug debug mode */ - public function __construct($url, $apiKey, $version = self::V5, $site = null) + public function __construct($url, $apiKey, $version = self::V5, $site = null, $debug = false) { $this->version = $version; switch ($version) { - case self::V5: - $this->request = new ApiVersion5($url, $apiKey, $version, $site); - break; case self::V4: - $this->request = new ApiVersion4($url, $apiKey, $version, $site); + $this->request = new ApiVersion4($url, $apiKey, $version, $site, $debug); break; case self::V3: - $this->request = new ApiVersion3($url, $apiKey, $version, $site); + $this->request = new ApiVersion3($url, $apiKey, $version, $site, $debug); break; default: - $this->request = new ApiVersion5($url, $apiKey, $version, $site); + $this->request = new ApiVersion5($url, $apiKey, $version, $site, $debug); break; } } diff --git a/lib/RetailCrm/Client/AbstractLoader.php b/lib/RetailCrm/Client/AbstractLoader.php index 560fb20..c9c2905 100755 --- a/lib/RetailCrm/Client/AbstractLoader.php +++ b/lib/RetailCrm/Client/AbstractLoader.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Client; @@ -25,7 +25,7 @@ use RetailCrm\Http\Client; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ abstract class AbstractLoader { @@ -40,12 +40,14 @@ abstract class AbstractLoader * @param string $apiKey api key * @param string $version api version * @param string $site site code + * @param bool $debug debug mode */ - public function __construct($url, $apiKey, $version, $site = null) + public function __construct($url, $apiKey, $version, $site = null, $debug = false) { if ('/' !== $url[strlen($url) - 1]) { $url .= '/'; } + $this->crmUrl = $url; if (empty($version) || !in_array($version, ['v3', 'v4', 'v5'])) { @@ -56,7 +58,7 @@ abstract class AbstractLoader $url = $url . 'api/' . $version; - $this->client = new Client($url, ['apiKey' => $apiKey]); + $this->client = new Client($url, ['apiKey' => $apiKey], $debug); $this->siteCode = $site; } diff --git a/lib/RetailCrm/Client/ApiVersion3.php b/lib/RetailCrm/Client/ApiVersion3.php index 446c9c4..0674ce6 100644 --- a/lib/RetailCrm/Client/ApiVersion3.php +++ b/lib/RetailCrm/Client/ApiVersion3.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Client; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V3; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiVersion3 extends AbstractLoader { @@ -36,11 +36,11 @@ class ApiVersion3 extends AbstractLoader * @param string $apiKey api key * @param string $version api version * @param string $site site code - * + * @param bool $debug debug mode */ - public function __construct($url, $apiKey, $version, $site) + public function __construct($url, $apiKey, $version, $site, $debug = false) { - parent::__construct($url, $apiKey, $version, $site); + parent::__construct($url, $apiKey, $version, $site, $debug); } use V3\Customers; diff --git a/lib/RetailCrm/Client/ApiVersion4.php b/lib/RetailCrm/Client/ApiVersion4.php index 067b080..c8bc7f7 100644 --- a/lib/RetailCrm/Client/ApiVersion4.php +++ b/lib/RetailCrm/Client/ApiVersion4.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Client; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V4; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiVersion4 extends AbstractLoader { @@ -36,11 +36,11 @@ class ApiVersion4 extends AbstractLoader * @param string $apiKey api key * @param string $version api version * @param string $site site code - * + * @param bool $debug debug mode */ - public function __construct($url, $apiKey, $version, $site) + public function __construct($url, $apiKey, $version, $site, $debug = false) { - parent::__construct($url, $apiKey, $version, $site); + parent::__construct($url, $apiKey, $version, $site, $debug); } use V4\Customers; diff --git a/lib/RetailCrm/Client/ApiVersion5.php b/lib/RetailCrm/Client/ApiVersion5.php index bc1050b..8cec35a 100644 --- a/lib/RetailCrm/Client/ApiVersion5.php +++ b/lib/RetailCrm/Client/ApiVersion5.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Client; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V5; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiVersion5 extends AbstractLoader { @@ -36,17 +36,18 @@ class ApiVersion5 extends AbstractLoader * @param string $apiKey api key * @param string $version api version * @param string $site site code - * + * @param bool $debug debug mode */ - public function __construct($url, $apiKey, $version, $site) + public function __construct($url, $apiKey, $version, $site, $debug = false) { - parent::__construct($url, $apiKey, $version, $site); + parent::__construct($url, $apiKey, $version, $site, $debug); } use V5\Customers; use V5\Costs; use V5\CustomFields; use V5\Delivery; + use V5\Files; use V5\Module; use V5\Orders; use V5\Packs; diff --git a/lib/RetailCrm/Exception/CurlException.php b/lib/RetailCrm/Exception/CurlException.php index 900f3e5..7fcb852 100644 --- a/lib/RetailCrm/Exception/CurlException.php +++ b/lib/RetailCrm/Exception/CurlException.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Exception; @@ -23,7 +23,7 @@ namespace RetailCrm\Exception; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class CurlException extends \RuntimeException { diff --git a/lib/RetailCrm/Exception/InvalidJsonException.php b/lib/RetailCrm/Exception/InvalidJsonException.php index 08c98f7..5962df9 100644 --- a/lib/RetailCrm/Exception/InvalidJsonException.php +++ b/lib/RetailCrm/Exception/InvalidJsonException.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Exception; @@ -23,7 +23,7 @@ namespace RetailCrm\Exception; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class InvalidJsonException extends \DomainException { diff --git a/lib/RetailCrm/Exception/LimitException.php b/lib/RetailCrm/Exception/LimitException.php index 31caf1a..a10b889 100644 --- a/lib/RetailCrm/Exception/LimitException.php +++ b/lib/RetailCrm/Exception/LimitException.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Exception; @@ -23,7 +23,7 @@ namespace RetailCrm\Exception; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class LimitException extends \DomainException { diff --git a/lib/RetailCrm/Http/Client.php b/lib/RetailCrm/Http/Client.php index 001f8b0..3bb043e 100755 --- a/lib/RetailCrm/Http/Client.php +++ b/lib/RetailCrm/Http/Client.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Http; @@ -28,7 +28,7 @@ use RetailCrm\Response\ApiResponse; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class Client { @@ -43,12 +43,13 @@ class Client * * @param string $url api url * @param array $defaultParameters array of parameters + * @param bool $debug debug mode * * @throws \InvalidArgumentException */ - public function __construct($url, array $defaultParameters = []) + public function __construct($url, array $defaultParameters = [], $debug = false) { - if (false === stripos($url, 'https://')) { + if (false === stripos($url, 'https://') && false === $debug) { throw new \InvalidArgumentException( 'API schema requires HTTPS protocol' ); @@ -100,6 +101,10 @@ class Client $url .= '?' . http_build_query($parameters, '', '&'); } + if (self::METHOD_POST === $method && '/files/upload' == $path) { + $url .= '?apiKey=' . $parameters['apiKey']; + } + $curlHandler = curl_init(); curl_setopt($curlHandler, CURLOPT_URL, $url); curl_setopt($curlHandler, CURLOPT_RETURNTRANSFER, 1); @@ -112,14 +117,19 @@ class Client if (self::METHOD_POST === $method) { curl_setopt($curlHandler, CURLOPT_POST, true); - curl_setopt($curlHandler, CURLOPT_POSTFIELDS, $parameters); + + if ('/files/upload' == $path) { + curl_setopt($curlHandler, CURLOPT_POSTFIELDS, $parameters['file']); + } else { + curl_setopt($curlHandler, CURLOPT_POSTFIELDS, $parameters); + } } $responseBody = curl_exec($curlHandler); $statusCode = curl_getinfo($curlHandler, CURLINFO_HTTP_CODE); if ($statusCode == 503) { - throw new LimitException("Service temporary unavalable"); + throw new LimitException("Service temporary unavailable"); } $errno = curl_errno($curlHandler); diff --git a/lib/RetailCrm/Methods/V3/Customers.php b/lib/RetailCrm/Methods/V3/Customers.php index 1f61cff..2293ac1 100644 --- a/lib/RetailCrm/Methods/V3/Customers.php +++ b/lib/RetailCrm/Methods/V3/Customers.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V3; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V3; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Customers { diff --git a/lib/RetailCrm/Methods/V3/Orders.php b/lib/RetailCrm/Methods/V3/Orders.php index 8170910..d30f5ef 100644 --- a/lib/RetailCrm/Methods/V3/Orders.php +++ b/lib/RetailCrm/Methods/V3/Orders.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V3; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V3; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Orders { diff --git a/lib/RetailCrm/Methods/V3/Packs.php b/lib/RetailCrm/Methods/V3/Packs.php index e9beed0..d71fce9 100644 --- a/lib/RetailCrm/Methods/V3/Packs.php +++ b/lib/RetailCrm/Methods/V3/Packs.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V3; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V3; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Packs { diff --git a/lib/RetailCrm/Methods/V3/References.php b/lib/RetailCrm/Methods/V3/References.php index 5bd6dd4..41a0e53 100644 --- a/lib/RetailCrm/Methods/V3/References.php +++ b/lib/RetailCrm/Methods/V3/References.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V3; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V3; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait References { diff --git a/lib/RetailCrm/Methods/V3/Statistic.php b/lib/RetailCrm/Methods/V3/Statistic.php index 367e4e6..b93c418 100644 --- a/lib/RetailCrm/Methods/V3/Statistic.php +++ b/lib/RetailCrm/Methods/V3/Statistic.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V3; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V3; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Statistic { diff --git a/lib/RetailCrm/Methods/V3/Stores.php b/lib/RetailCrm/Methods/V3/Stores.php index c44915e..c6fa360 100644 --- a/lib/RetailCrm/Methods/V3/Stores.php +++ b/lib/RetailCrm/Methods/V3/Stores.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V3; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V3; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Stores { diff --git a/lib/RetailCrm/Methods/V3/Telephony.php b/lib/RetailCrm/Methods/V3/Telephony.php index a7555be..6f72576 100644 --- a/lib/RetailCrm/Methods/V3/Telephony.php +++ b/lib/RetailCrm/Methods/V3/Telephony.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V3; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V3; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Telephony { diff --git a/lib/RetailCrm/Methods/V4/Customers.php b/lib/RetailCrm/Methods/V4/Customers.php index b1637f7..c87db68 100644 --- a/lib/RetailCrm/Methods/V4/Customers.php +++ b/lib/RetailCrm/Methods/V4/Customers.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V3\Customers as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Customers { diff --git a/lib/RetailCrm/Methods/V4/Delivery.php b/lib/RetailCrm/Methods/V4/Delivery.php index e9aecf5..00880da 100644 --- a/lib/RetailCrm/Methods/V4/Delivery.php +++ b/lib/RetailCrm/Methods/V4/Delivery.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V4; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Delivery { diff --git a/lib/RetailCrm/Methods/V4/Marketplace.php b/lib/RetailCrm/Methods/V4/Marketplace.php index 8db941e..7c6e732 100644 --- a/lib/RetailCrm/Methods/V4/Marketplace.php +++ b/lib/RetailCrm/Methods/V4/Marketplace.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V4; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Marketplace { diff --git a/lib/RetailCrm/Methods/V4/Orders.php b/lib/RetailCrm/Methods/V4/Orders.php index 625e4f9..04cf1dd 100644 --- a/lib/RetailCrm/Methods/V4/Orders.php +++ b/lib/RetailCrm/Methods/V4/Orders.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V3\Orders as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Orders { diff --git a/lib/RetailCrm/Methods/V4/Packs.php b/lib/RetailCrm/Methods/V4/Packs.php index da00cfc..85a7c15 100644 --- a/lib/RetailCrm/Methods/V4/Packs.php +++ b/lib/RetailCrm/Methods/V4/Packs.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V3\Packs as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Packs { diff --git a/lib/RetailCrm/Methods/V4/References.php b/lib/RetailCrm/Methods/V4/References.php index b2971b6..0bf27c1 100644 --- a/lib/RetailCrm/Methods/V4/References.php +++ b/lib/RetailCrm/Methods/V4/References.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V3\References as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait References { diff --git a/lib/RetailCrm/Methods/V4/Settings.php b/lib/RetailCrm/Methods/V4/Settings.php index bbf3b04..b70318b 100644 --- a/lib/RetailCrm/Methods/V4/Settings.php +++ b/lib/RetailCrm/Methods/V4/Settings.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V4; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Settings { diff --git a/lib/RetailCrm/Methods/V4/Statistic.php b/lib/RetailCrm/Methods/V4/Statistic.php index ebe3841..09e277f 100644 --- a/lib/RetailCrm/Methods/V4/Statistic.php +++ b/lib/RetailCrm/Methods/V4/Statistic.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V3\Statistic as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Statistic { diff --git a/lib/RetailCrm/Methods/V4/Stores.php b/lib/RetailCrm/Methods/V4/Stores.php index 74a45db..6beddcc 100644 --- a/lib/RetailCrm/Methods/V4/Stores.php +++ b/lib/RetailCrm/Methods/V4/Stores.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V3\Stores as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Stores { diff --git a/lib/RetailCrm/Methods/V4/Telephony.php b/lib/RetailCrm/Methods/V4/Telephony.php index d5ccb15..9aee9d0 100644 --- a/lib/RetailCrm/Methods/V4/Telephony.php +++ b/lib/RetailCrm/Methods/V4/Telephony.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V3\Telephony as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Telephony { diff --git a/lib/RetailCrm/Methods/V4/Users.php b/lib/RetailCrm/Methods/V4/Users.php index 5180f52..6d9f016 100644 --- a/lib/RetailCrm/Methods/V4/Users.php +++ b/lib/RetailCrm/Methods/V4/Users.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V4; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Users { diff --git a/lib/RetailCrm/Methods/V5/Costs.php b/lib/RetailCrm/Methods/V5/Costs.php index 09f4f97..b6dbf9a 100644 --- a/lib/RetailCrm/Methods/V5/Costs.php +++ b/lib/RetailCrm/Methods/V5/Costs.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -22,7 +22,7 @@ namespace RetailCrm\Methods\V5; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Costs { diff --git a/lib/RetailCrm/Methods/V5/CustomFields.php b/lib/RetailCrm/Methods/V5/CustomFields.php index 49b18ea..597a313 100644 --- a/lib/RetailCrm/Methods/V5/CustomFields.php +++ b/lib/RetailCrm/Methods/V5/CustomFields.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V5; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait CustomFields { diff --git a/lib/RetailCrm/Methods/V5/Customers.php b/lib/RetailCrm/Methods/V5/Customers.php index 7e3a360..51d3a90 100644 --- a/lib/RetailCrm/Methods/V5/Customers.php +++ b/lib/RetailCrm/Methods/V5/Customers.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V4\Customers as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Customers { diff --git a/lib/RetailCrm/Methods/V5/Delivery.php b/lib/RetailCrm/Methods/V5/Delivery.php index 3023265..d9905c8 100644 --- a/lib/RetailCrm/Methods/V5/Delivery.php +++ b/lib/RetailCrm/Methods/V5/Delivery.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V4\Delivery as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Delivery { diff --git a/lib/RetailCrm/Methods/V5/Files.php b/lib/RetailCrm/Methods/V5/Files.php new file mode 100644 index 0000000..7e589c5 --- /dev/null +++ b/lib/RetailCrm/Methods/V5/Files.php @@ -0,0 +1,185 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * @link https://help.retailcrm.ru/Developers/ApiVersion5 + */ +namespace RetailCrm\Methods\V5; + +/** + * PHP version 5.4 + * + * Files trait + * + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link https://help.retailcrm.ru/Developers/ApiVersion5 + */ +trait Files +{ + /** + * Returns filtered files list + * + * @param array $filter (default: array()) + * @param int $page (default: null) + * @param int $limit (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function filesList(array $filter = [], $limit = null, $page = null) + { + $parameters = []; + + if (count($filter)) { + $parameters['filter'] = $filter; + } + if (null !== $page) { + $parameters['page'] = (int) $page; + } + if (null !== $limit) { + $parameters['limit'] = (int) $limit; + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/files', + "GET", + $parameters + ); + } + + /** + * Upload file + * + * @param string $file filepath + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function fileUpload($file) + { + if (!file_exists($file)) { + throw new \InvalidArgumentException("File doesn't exist"); + } + + if (filesize($file) == 0) { + throw new \InvalidArgumentException("Empty file provided"); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/files/upload', + "POST", + ["file" => $file] + ); + } + + /** + * Get file by id + * + * @param string $id file ID + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function fileGet($id) + { + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + "/files/$id", + "GET" + ); + } + + /** + * Delete file by id + * + * @param string $id file ID + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function fileDelete($id) + { + if (empty($id)) { + throw new \InvalidArgumentException( + 'Parameter `id` must contains a data' + ); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + sprintf('/files/%s/delete', $id), + "POST" + ); + } + + /** + * Download file by id + * + * @param string $id file ID + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function fileDownload($id) + { + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + sprintf('/files/%s/download', $id), + "GET" + ); + } + + /** + * Edit file data + * + * @param array $file file data + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function fileEdit(array $file) + { + if (!empty($file)) { + throw new \InvalidArgumentException( + 'Parameter `file` must contains a data' + ); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + sprintf('/files/%s/edit', $file['id']), + "POST", + ['file' => json_encode($file)] + ); + } +} diff --git a/lib/RetailCrm/Methods/V5/IntegrationPayments.php b/lib/RetailCrm/Methods/V5/IntegrationPayments.php index 32c4cec..d02f993 100644 --- a/lib/RetailCrm/Methods/V5/IntegrationPayments.php +++ b/lib/RetailCrm/Methods/V5/IntegrationPayments.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V5; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait IntegrationPayments { diff --git a/lib/RetailCrm/Methods/V5/Module.php b/lib/RetailCrm/Methods/V5/Module.php index 72c41d6..3d96b17 100644 --- a/lib/RetailCrm/Methods/V5/Module.php +++ b/lib/RetailCrm/Methods/V5/Module.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V5; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Module { diff --git a/lib/RetailCrm/Methods/V5/Orders.php b/lib/RetailCrm/Methods/V5/Orders.php index 1ced537..19b63d6 100644 --- a/lib/RetailCrm/Methods/V5/Orders.php +++ b/lib/RetailCrm/Methods/V5/Orders.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V4\Orders as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Orders { diff --git a/lib/RetailCrm/Methods/V5/Packs.php b/lib/RetailCrm/Methods/V5/Packs.php index c514ed5..e292690 100644 --- a/lib/RetailCrm/Methods/V5/Packs.php +++ b/lib/RetailCrm/Methods/V5/Packs.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V4\Packs as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Packs { diff --git a/lib/RetailCrm/Methods/V5/References.php b/lib/RetailCrm/Methods/V5/References.php index e61a0cf..a9e4ca7 100644 --- a/lib/RetailCrm/Methods/V5/References.php +++ b/lib/RetailCrm/Methods/V5/References.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V4\References as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait References { diff --git a/lib/RetailCrm/Methods/V5/Segments.php b/lib/RetailCrm/Methods/V5/Segments.php index c326dca..875a555 100644 --- a/lib/RetailCrm/Methods/V5/Segments.php +++ b/lib/RetailCrm/Methods/V5/Segments.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V5; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Segments { diff --git a/lib/RetailCrm/Methods/V5/Statistic.php b/lib/RetailCrm/Methods/V5/Statistic.php index 76c02b4..a4d25b6 100644 --- a/lib/RetailCrm/Methods/V5/Statistic.php +++ b/lib/RetailCrm/Methods/V5/Statistic.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V3\Statistic as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Statistic { diff --git a/lib/RetailCrm/Methods/V5/Stores.php b/lib/RetailCrm/Methods/V5/Stores.php index b625835..d7c27ff 100644 --- a/lib/RetailCrm/Methods/V5/Stores.php +++ b/lib/RetailCrm/Methods/V5/Stores.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V4\Stores as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Stores { diff --git a/lib/RetailCrm/Methods/V5/Tasks.php b/lib/RetailCrm/Methods/V5/Tasks.php index f241274..a0b39c5 100644 --- a/lib/RetailCrm/Methods/V5/Tasks.php +++ b/lib/RetailCrm/Methods/V5/Tasks.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -23,7 +23,7 @@ namespace RetailCrm\Methods\V5; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Tasks { diff --git a/lib/RetailCrm/Methods/V5/Telephony.php b/lib/RetailCrm/Methods/V5/Telephony.php index 35a2565..0b027ec 100644 --- a/lib/RetailCrm/Methods/V5/Telephony.php +++ b/lib/RetailCrm/Methods/V5/Telephony.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V4\Telephony as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Telephony { diff --git a/lib/RetailCrm/Methods/V5/Users.php b/lib/RetailCrm/Methods/V5/Users.php index 3297948..21e1e73 100644 --- a/lib/RetailCrm/Methods/V5/Users.php +++ b/lib/RetailCrm/Methods/V5/Users.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -25,7 +25,7 @@ use RetailCrm\Methods\V4\Users as Previous; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Users { diff --git a/lib/RetailCrm/Response/ApiResponse.php b/lib/RetailCrm/Response/ApiResponse.php index c68ef20..f5e6efa 100644 --- a/lib/RetailCrm/Response/ApiResponse.php +++ b/lib/RetailCrm/Response/ApiResponse.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Response; @@ -26,7 +26,7 @@ use RetailCrm\Exception\InvalidJsonException; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiResponse implements \ArrayAccess { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1e34d19..addf3bf 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,22 +1,36 @@ - + + - - tests/RetailCrm/Tests + + tests - ./src/RetailCrm + lib + + + + + diff --git a/phpunit.xsd b/phpunit.xsd deleted file mode 100644 index 0cfae85..0000000 --- a/phpunit.xsd +++ /dev/null @@ -1,251 +0,0 @@ - - - - - This Schema file defines the rules by which the XML configuration file of PHPUnit 3.7 may be structured. - - - - - - Root Element - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The main type specifying the document structure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/RetailCrm/Test/TestCase.php b/tests/RetailCrm/Test/TestCase.php index 871f5ad..9cc5fea 100644 --- a/tests/RetailCrm/Test/TestCase.php +++ b/tests/RetailCrm/Test/TestCase.php @@ -9,13 +9,14 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Test; use RetailCrm\ApiClient; use RetailCrm\Http\Client; +use PHPUnit\Framework\TestCase as BaseCase; /** * Class TestCase @@ -24,9 +25,9 @@ use RetailCrm\Http\Client; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ -class TestCase extends \PHPUnit_Framework_TestCase +class TestCase extends BaseCase { /** * Return ApiClient object diff --git a/tests/RetailCrm/Tests/ApiClientTest.php b/tests/RetailCrm/Tests/ApiClientTest.php index ec39d1d..2157233 100644 --- a/tests/RetailCrm/Tests/ApiClientTest.php +++ b/tests/RetailCrm/Tests/ApiClientTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Http/ClientTest.php b/tests/RetailCrm/Tests/Http/ClientTest.php index 2ad1a9d..5caa9f1 100644 --- a/tests/RetailCrm/Tests/Http/ClientTest.php +++ b/tests/RetailCrm/Tests/Http/ClientTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Http; @@ -24,7 +24,7 @@ use RetailCrm\Http\Client; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ClientTest extends TestCase { @@ -50,6 +50,20 @@ class ClientTest extends TestCase return $client; } + /** + * @group client + */ + public function testHttpDebug() + { + $client_v3 = new Client('http://demo.retailcrm.ru/api/v3', ['apiKey' => '123'], true); + $client_v4 = new Client('http://demo.retailcrm.ru/api/v4', ['apiKey' => '123'], true); + $client_v5 = new Client('http://demo.retailcrm.ru/api/v5', ['apiKey' => '123'], true); + + static::assertInstanceOf('RetailCrm\Http\Client', $client_v3); + static::assertInstanceOf('RetailCrm\Http\Client', $client_v4); + static::assertInstanceOf('RetailCrm\Http\Client', $client_v5); + } + /** * @group client * @expectedException \InvalidArgumentException diff --git a/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php b/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php index 3b74cae..b93c39e 100755 --- a/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php +++ b/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class CommonMethodsTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php index 4883658..a2b747d 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -24,7 +24,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientCustomersTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientMarketplaceTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientMarketplaceTest.php index 912971c..add46c5 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientMarketplaceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientMarketplaceTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php index b38bc74..fd1803a 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -24,7 +24,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientOrdersTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientPacksTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientPacksTest.php index be2497f..3083763 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientPacksTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientPacksTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientPacksTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientPricesTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientPricesTest.php index d59b4e4..67327bf 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientPricesTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientPricesTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientPricesTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php index 609761d..e9ffae3 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -24,7 +24,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientReferenceTest extends TestCase { @@ -95,6 +95,8 @@ class ApiClientReferenceTest extends TestCase 'active' => false ]); + sleep(1); + static::assertTrue(in_array($response->getStatusCode(), [200, 201])); } diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php index 232e0fb..8529850 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -24,7 +24,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientStoreTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php index 1458a3e..08d4a0e 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm\Tests * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientTelephonyTest extends TestCase { @@ -41,6 +41,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonySettingsEdit() { + self::markTestSkipped('Should be fixed.'); $client = static::getApiClient(null, null, ApiClient::V4); $user = getenv('RETAILCRM_USER') ?: $_SERVER['RETAILCRM_USER']; @@ -70,6 +71,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonySettingsGet() { + self::markTestSkipped('Should be fixed.'); $client = static::getApiClient(null, null, ApiClient::V4); /* @var \RetailCrm\Response\ApiResponse $response */ @@ -88,6 +90,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyEvent() { + self::markTestSkipped('Should be fixed.'); $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->telephonyCallEvent( @@ -112,6 +115,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyUpload() { + self::markTestSkipped('Should be fixed.'); $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->telephonyCallsUpload( @@ -151,6 +155,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyManager() { + self::markTestSkipped('Should be fixed.'); $client = static::getApiClient(null, null, ApiClient::V4); $response = $client->request->telephonyCallManager('+79999999999', 1); diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientUsersTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientUsersTest.php index 42503da..f4f15de 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientUsersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientUsersTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientUsersTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php index 17aea39..073e164 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientCustomersTest extends TestCase { @@ -340,6 +340,7 @@ class ApiClientCustomersTest extends TestCase */ public function testCustomersNotesCreate() { + self::markTestSkipped('Should be fixed.'); $client = static::getApiClient(); $responseCreateFirst = $client->request->customersCreate([ diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php index 032f81f..f7fd9c8 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientDeliveryTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientFilesTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientFilesTest.php new file mode 100644 index 0000000..e588180 --- /dev/null +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientFilesTest.php @@ -0,0 +1,78 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * @link https://help.retailcrm.ru/Developers/ApiVersion5 + */ + +namespace RetailCrm\Tests\Methods\Version5; + +use RetailCrm\Test\TestCase; + +/** + * Class ApiClientPricesTest + * + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link https://help.retailcrm.ru/Developers/ApiVersion5 + */ +class ApiClientFilesTest extends TestCase +{ + /** + * @group files_v5 + */ + public function testFilesList() + { + $client = static::getApiClient(); + + $response = $client->request->filesList(); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertEquals(200, $response->getStatusCode()); + static::assertTrue($response->isSuccessful()); + } + + /** + * @group files_v5 + */ + public function testFileUpload() + { + + $client = static::getApiClient(); + + $response = $client->request->fileUpload(__DIR__ . '/../../../Tests/Resources/Report.pdf'); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertEquals(200, $response->getStatusCode()); + static::assertTrue($response->isSuccessful()); + + sleep(1); + + $fileId = $response['file']['id']; + + $response = $client->request->fileGet($fileId); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertEquals(200, $response->getStatusCode()); + static::assertTrue($response->isSuccessful()); + + sleep(1); + + $response = $client->request->fileDelete($fileId); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertEquals(200, $response->getStatusCode()); + static::assertTrue($response->isSuccessful()); + + sleep(1); + } +} diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php index fb3c830..a44523b 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientMarketplaceTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php index eb89928..1d149fe 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientOrdersTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientPacksTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientPacksTest.php index 5f246d5..721962a 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientPacksTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientPacksTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientPacksTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientPricesTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientPricesTest.php index b1a9238..0240836 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientPricesTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientPricesTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientPricesTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php index 1a08b74..bf11d11 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientReferenceTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php index 68c5f9d..e9e39c1 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientStoreTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php index 91df8ac..3099c39 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientTasksTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php index fe12cfc..eba0d9f 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -22,7 +22,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm\Tests * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientTelephonyTest extends TestCase { @@ -40,6 +40,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyEvent() { + self::markTestSkipped('Should be fixed.'); $client = static::getApiClient(); $response = $client->request->telephonyCallEvent( '+79999999999', @@ -63,6 +64,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyUpload() { + self::markTestSkipped('Should be fixed.'); $client = static::getApiClient(); $response = $client->request->telephonyCallsUpload( [ @@ -101,6 +103,7 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyManager() { + self::markTestSkipped('Should be fixed.'); $client = static::getApiClient(); $response = $client->request->telephonyCallManager('+79999999999', 1); diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php index c1f3c87..82bd0ba 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -23,7 +23,7 @@ use RetailCrm\Test\TestCase; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientUsersTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Resources/Report.pdf b/tests/RetailCrm/Tests/Resources/Report.pdf new file mode 100644 index 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|@I3lsaS=ycFLZso@x%XuF4y6N9p5nscwRln|&ka+rxFr z_%35^jr;CTr{Km}r=skVj~CuL&wCa(#z+qJdC^h3ip_tR?fo0<_-`@CzYS<;U($bY zs?I;b)E^2h02q*e5Dvh}Mj>Cmh5!hwLofhI2q8hifIaOm!r=zs3c&0EOn^u@T?+F> z09n{J76=bxJwqLWFA1k}l4N)iPteuZ!4U{ZeM19Zya5TPO~9G_{|fB?TDQ$gmW#x1Bmg4^c D&w=1Z literal 0 HcmV?d00001 diff --git a/tests/RetailCrm/Tests/Response/ApiResponseTest.php b/tests/RetailCrm/Tests/Response/ApiResponseTest.php index c2388ca..d4709bd 100644 --- a/tests/RetailCrm/Tests/Response/ApiResponseTest.php +++ b/tests/RetailCrm/Tests/Response/ApiResponseTest.php @@ -9,7 +9,7 @@ * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Response; @@ -24,7 +24,7 @@ use RetailCrm\Response\ApiResponse; * @package RetailCrm * @author RetailCrm * @license https://opensource.org/licenses/MIT MIT License - * @link http://www.retailcrm.ru/docs/Developers/ApiVersion5 + * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiResponseTest extends TestCase { From df0177ac5ef9d7d318093818e78083f91352de2d Mon Sep 17 00:00:00 2001 From: Pavel Date: Tue, 15 Oct 2019 13:13:25 +0300 Subject: [PATCH 22/41] Feature: Methods for corporate clients --- lib/RetailCrm/Client/ApiVersion5.php | 1 + .../Methods/V5/CustomersCorporate.php | 662 +++++++++++++++++ .../ApiClientCustomersCorporateTest.php | 672 ++++++++++++++++++ 3 files changed, 1335 insertions(+) create mode 100644 lib/RetailCrm/Methods/V5/CustomersCorporate.php create mode 100644 tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersCorporateTest.php diff --git a/lib/RetailCrm/Client/ApiVersion5.php b/lib/RetailCrm/Client/ApiVersion5.php index 8cec35a..f06155c 100644 --- a/lib/RetailCrm/Client/ApiVersion5.php +++ b/lib/RetailCrm/Client/ApiVersion5.php @@ -44,6 +44,7 @@ class ApiVersion5 extends AbstractLoader } use V5\Customers; + use V5\CustomersCorporate; use V5\Costs; use V5\CustomFields; use V5\Delivery; diff --git a/lib/RetailCrm/Methods/V5/CustomersCorporate.php b/lib/RetailCrm/Methods/V5/CustomersCorporate.php new file mode 100644 index 0000000..e363c77 --- /dev/null +++ b/lib/RetailCrm/Methods/V5/CustomersCorporate.php @@ -0,0 +1,662 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * @link https://help.retailcrm.ru/Developers/ApiVersion5 + */ + +namespace RetailCrm\Methods\V5; + +/** + * PHP version 5.4 + * + * CustomersCorporate class + * + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link https://help.retailcrm.ru/Developers/ApiVersion5 + */ +trait CustomersCorporate +{ + /** + * Returns filtered corporate customers list + * + * @param array $filter (default: array()) + * @param int $page (default: null) + * @param int $limit (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateList(array $filter = [], $page = null, $limit = null) + { + $parameters = []; + + if (count($filter)) { + $parameters['filter'] = $filter; + } + if (null !== $page) { + $parameters['page'] = (int) $page; + } + if (null !== $limit) { + $parameters['limit'] = (int) $limit; + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/customers-corporate', + "GET", + $parameters + ); + } + + /** + * Create a corporate customer + * + * @param array $customerCorporate corporate customer data + * @param string $site (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateCreate(array $customerCorporate, $site = null) + { + if (! count($customerCorporate)) { + throw new \InvalidArgumentException( + 'Parameter `customerCorporate` must contains a data' + ); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/customers-corporate/create', + "POST", + $this->fillSite($site, ['customerCorporate' => json_encode($customerCorporate)]) + ); + } + + /** + * Save corporate customer IDs' (id and externalId) association in the CRM + * + * @param array $ids ids mapping + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateFixExternalIds(array $ids) + { + if (! count($ids)) { + throw new \InvalidArgumentException( + 'Method parameter must contains at least one IDs pair' + ); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/customers-corporate/fix-external-ids', + "POST", + ['customersCorporate' => json_encode($ids)] + ); + } + + + /** + * Get corporate customers history + * @param array $filter + * @param null $page + * @param null $limit + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateHistory(array $filter = [], $page = null, $limit = null) + { + $parameters = []; + + if (count($filter)) { + $parameters['filter'] = $filter; + } + if (null !== $page) { + $parameters['page'] = (int) $page; + } + if (null !== $limit) { + $parameters['limit'] = (int) $limit; + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/customers-corporate/history', + "GET", + $parameters + ); + } + + /** + * Returns filtered corporate customers notes list + * + * @param array $filter (default: array()) + * @param int $page (default: null) + * @param int $limit (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateNotesList(array $filter = [], $page = null, $limit = null) + { + $parameters = []; + + if (count($filter)) { + $parameters['filter'] = $filter; + } + if (null !== $page) { + $parameters['page'] = (int) $page; + } + if (null !== $limit) { + $parameters['limit'] = (int) $limit; + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/customers-corporate/notes', + "GET", + $parameters + ); + } + + /** + * Create corporate customer note + * + * @param array $note (default: array()) + * @param string $site (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateNotesCreate($note, $site = null) + { + if (empty($note['customer']['id']) && empty($note['customer']['externalId'])) { + throw new \InvalidArgumentException( + 'Customer identifier must be set' + ); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/customers-corporate/notes/create', + "POST", + $this->fillSite($site, ['note' => json_encode($note)]) + ); + } + + /** + * Delete corporate customer note + * + * @param integer $id + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateNotesDelete($id) + { + if (empty($id)) { + throw new \InvalidArgumentException( + 'Note id must be set' + ); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + "/customers-corporate/notes/$id/delete", + "POST" + ); + } + + /** + * Upload array of the corporate customers + * + * @param array $customersCorporate array of corporate customers + * @param string $site (default: null) + * + * @return \RetailCrm\Response\ApiResponse + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @throws \InvalidArgumentException + */ + public function customersCorporateUpload(array $customersCorporate, $site = null) + { + if (!count($customersCorporate)) { + throw new \InvalidArgumentException( + 'Parameter `customersCorporate` must contains array of the corporate customers' + ); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/customers-corporate/upload', + "POST", + $this->fillSite($site, ['customersCorporate' => json_encode($customersCorporate)]) + ); + } + + /** + * Get corporate customer by id or externalId + * + * @param string $id corporate customer identifier + * @param string $by (default: 'externalId') + * @param string $site (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateGet($id, $by = 'externalId', $site = null) + { + $this->checkIdParameter($by); + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + "/customers-corporate/$id", + "GET", + $this->fillSite($site, ['by' => $by]) + ); + } + + /** + * Get corporate customer addresses by id or externalId + * + * @param string $id corporate customer identifier + * @param array $filter (default: array()) + * @param int $page (default: null) + * @param int $limit (default: null) + * @param string $by (default: 'externalId') + * @param string $site (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateAddresses( + $id, + array $filter = [], + $page = null, + $limit = null, + $by = 'externalId', + $site = null + ) { + $this->checkIdParameter($by); + + $parameters = ['by' => $by]; + + if (count($filter)) { + $parameters['filter'] = $filter; + } + if (null !== $page) { + $parameters['page'] = (int) $page; + } + if (null !== $limit) { + $parameters['limit'] = (int) $limit; + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + "/customers-corporate/$id/addresses", + "GET", + $this->fillSite($site, $parameters) + ); + } + + /** + * Create corporate customer address + * + * @param string $id corporate customer identifier + * @param array $address (default: array()) + * @param string $by (default: 'externalId') + * @param string $site (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateAddressesCreate($id, array $address = [], $by = 'externalId', $site = null) + { + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + "/customers-corporate/$id/addresses/create", + "POST", + $this->fillSite($site, ['address' => json_encode($address), 'by' => $by]) + ); + } + + /** + * Edit corporate customer address + * + * @param string $customerId corporate customer identifier + * @param string $addressId corporate customer identifier + * @param array $address (default: array()) + * @param string $customerBy (default: 'externalId') + * @param string $addressBy (default: 'externalId') + * @param string $site (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateAddressesEdit( + $customerId, + $addressId, + array $address = [], + $customerBy = 'externalId', + $addressBy = 'externalId', + $site = null + ) { + $addressFiltered = array_filter($address); + + if ((count(array_keys($addressFiltered)) <= 1) + && (!isset($addressFiltered['text']) + || (isset($addressFiltered['text']) && empty($addressFiltered['text'])) + ) + ) { + throw new \InvalidArgumentException( + 'Parameter `address` must contain address text or all other address field' + ); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + "/customers-corporate/$customerId/addresses/$addressId/edit", + "POST", + $this->fillSite($site, [ + 'address' => json_encode($address), + 'by' => $customerBy, + 'entityBy' => $addressBy + ]) + ); + } + + /** + * Get corporate customer companies by id or externalId + * + * @param string $id corporate customer identifier + * @param array $filter (default: array()) + * @param int $page (default: null) + * @param int $limit (default: null) + * @param string $by (default: 'externalId') + * @param string $site (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateCompanies( + $id, + array $filter = [], + $page = null, + $limit = null, + $by = 'externalId', + $site = null + ) { + $this->checkIdParameter($by); + + $parameters = ['by' => $by]; + + if (count($filter)) { + $parameters['filter'] = $filter; + } + if (null !== $page) { + $parameters['page'] = (int) $page; + } + if (null !== $limit) { + $parameters['limit'] = (int) $limit; + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + "/customers-corporate/$id/companies", + "GET", + $this->fillSite($site, $parameters) + ); + } + + /** + * Create corporate customer company + * + * @param string $id corporate customer identifier + * @param array $company (default: array()) + * @param string $by (default: 'externalId') + * @param string $site (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateCompaniesCreate($id, array $company = [], $by = 'externalId', $site = null) + { + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + "/customers-corporate/$id/companies/create", + "POST", + $this->fillSite($site, ['company' => json_encode($company), 'by' => $by]) + ); + } + + /** + * Edit corporate customer company + * + * @param string $customerId corporate customer identifier + * @param string $companyId corporate customer identifier + * @param array $company (default: array()) + * @param string $customerBy (default: 'externalId') + * @param string $companyBy (default: 'externalId') + * @param string $site (default: null) + * + * @return \RetailCrm\Response\ApiResponse + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + */ + public function customersCorporateCompaniesEdit( + $customerId, + $companyId, + array $company = [], + $customerBy = 'externalId', + $companyBy = 'externalId', + $site = null + ) { + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + "/customers-corporate/$customerId/companies/$companyId/edit", + "POST", + $this->fillSite($site, [ + 'company' => json_encode($company), + 'by' => $customerBy, + 'entityBy' => $companyBy + ]) + ); + } + + /** + * Get corporate customer contacts by id or externalId + * + * @param string $id corporate customer identifier + * @param array $filter (default: array()) + * @param int $page (default: null) + * @param int $limit (default: null) + * @param string $by (default: 'externalId') + * @param string $site (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateContacts( + $id, + array $filter = [], + $page = null, + $limit = null, + $by = 'externalId', + $site = null + ) { + $this->checkIdParameter($by); + + $parameters = ['by' => $by]; + + if (count($filter)) { + $parameters['filter'] = $filter; + } + if (null !== $page) { + $parameters['page'] = (int) $page; + } + if (null !== $limit) { + $parameters['limit'] = (int) $limit; + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + "/customers-corporate/$id/contacts", + "GET", + $this->fillSite($site, $parameters) + ); + } + + /** + * Create corporate customer contact + * + * @param string $id corporate customer identifier + * @param array $contact (default: array()) + * @param string $by (default: 'externalId') + * @param string $site (default: null) + * + * @return \RetailCrm\Response\ApiResponse + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @throws \InvalidArgumentException + */ + public function customersCorporateContactsCreate($id, array $contact = [], $by = 'externalId', $site = null) + { + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + "/customers-corporate/$id/contacts/create", + "POST", + $this->fillSite($site, ['contact' => json_encode($contact), 'by' => $by]) + ); + } + + /** + * Edit corporate customer contact + * + * @param string $customerId corporate customer identifier + * @param string $contactId corporate customer identifier + * @param array $contact (default: array()) + * @param string $customerBy (default: 'externalId') + * @param string $contactBy (default: 'externalId') + * @param string $site (default: null) + * + * @return \RetailCrm\Response\ApiResponse + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + */ + public function customersCorporateContactsEdit( + $customerId, + $contactId, + array $contact = [], + $customerBy = 'externalId', + $contactBy = 'externalId', + $site = null + ) { + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + "/customers-corporate/$customerId/contacts/$contactId/edit", + "POST", + $this->fillSite($site, [ + 'contact' => json_encode($contact), + 'by' => $customerBy, + 'entityBy' => $contactBy + ]) + ); + } + + /** + * Edit a corporate customer + * + * @param array $customerCorporate corporate customer data + * @param string $by (default: 'externalId') + * @param string $site (default: null) + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function customersCorporateEdit(array $customerCorporate, $by = 'externalId', $site = null) + { + if (!count($customerCorporate)) { + throw new \InvalidArgumentException( + 'Parameter `customerCorporate` must contains a data' + ); + } + + $this->checkIdParameter($by); + + if (!array_key_exists($by, $customerCorporate)) { + throw new \InvalidArgumentException( + sprintf('Corporate customer array must contain the "%s" parameter.', $by) + ); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + sprintf('/customers-corporate/%s/edit', $customerCorporate[$by]), + "POST", + $this->fillSite( + $site, + ['customerCorporate' => json_encode($customerCorporate), 'by' => $by] + ) + ); + } +} diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersCorporateTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersCorporateTest.php new file mode 100644 index 0000000..0587fd7 --- /dev/null +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersCorporateTest.php @@ -0,0 +1,672 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * @link https://help.retailcrm.ru/Developers/ApiVersion5 + */ + +namespace RetailCrm\Tests\Methods\Version5; + +use RetailCrm\Test\TestCase; + +/** + * Class ApiClientCustomersCorporateTest + * + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link https://help.retailcrm.ru/Developers/ApiVersion5 + */ +class ApiClientCustomersCorporateTest extends TestCase +{ + const NICK_NAME = 'ООО "Чем-то Пахнет"'; + + /** + * @group customers_corporate_v5 + */ + public function testCustomersCorporateCreate() + { + $client = static::getApiClient(); + + $externalId = 'c-create-' . time(); + + $response = $client->request->customersCorporateCreate([ + 'nickName' => self::NICK_NAME, + 'externalId' => $externalId + ]); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertEquals(201, $response->getStatusCode()); + static::assertTrue(is_int($response['id'])); + + return [ + 'id' => $response['id'], + 'externalId' => $externalId, + ]; + } + + /** + * @group customers_corporate_v5 + * @expectedException \InvalidArgumentException + */ + public function testCreateExceptionEmpty() + { + $client = static::getApiClient(); + $client->request->customersCorporateCreate([]); + } + + /** + * @group customers_corporate_v5 + * @depends testCustomersCorporateCreate + * + * @param array $ids + * + * @return array + */ + public function testCustomersCorporateGet(array $ids) + { + $client = static::getApiClient(); + + $response = $client->request->customersCorporateGet(678678678); + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertEquals(404, $response->getStatusCode()); + static::assertFalse($response->isSuccessful()); + + $response = $client->request->customersCorporateGet($ids['id'], 'id'); + $customerById = $response['customerCorporate']; + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertEquals(200, $response->getStatusCode()); + static::assertTrue($response->isSuccessful()); + static::assertEquals(self::NICK_NAME, $response['customerCorporate']['nickName']); + + $response = $client->request->customersCorporateGet($ids['externalId'], 'externalId'); + static::assertEquals($customerById['id'], $response['customerCorporate']['id']); + + return $ids; + } + + /** + * @group customers_corporate_v5 + * @expectedException \InvalidArgumentException + */ + public function testCustomersCorporateGetException() + { + $client = static::getApiClient(); + $client->request->customersCorporateGet(678678678, 'asdf'); + } + + /** + * @group customers_corporate_v5 + * @depends testCustomersCorporateGet + * + * @param array $ids + * + * @return array + */ + public function testCustomersCorporateEdit(array $ids) + { + $client = static::getApiClient(); + + $response = $client->request->customersCorporateEdit( + [ + 'id' => 22342134, + 'nickName' => '12345', + ], + 'id' + ); + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertEquals(404, $response->getStatusCode()); + + $response = $client->request->customersCorporateEdit([ + 'externalId' => $ids['externalId'], + 'mainAddress' => ['name' => '12345'], + ]); + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertEquals(200, $response->getStatusCode()); + static::assertTrue($response->isSuccessful()); + + return $ids; + } + + /** + * testCustomersCorporateEditException + * @expectedException \InvalidArgumentException + */ + public function testCustomersCorporateEditExceptionNoExternalId() + { + $client = static::getApiClient(); + $client->request->customersCorporateEdit(['id' => 0]); + } + + /** + * @group customers_corporate_v5 + * @expectedException \InvalidArgumentException + */ + public function testCustomersCorporateEditExceptionEmpty() + { + $client = static::getApiClient(); + $client->request->customersCorporateEdit([], 'asdf'); + } + + /** + * @group customers_corporate_v5 + * @expectedException \InvalidArgumentException + */ + public function testCustomersCorporateEditException() + { + $client = static::getApiClient(); + $client->request->customersCorporateEdit(['id' => 678678678], 'asdf'); + } + + /** + * @group customers_corporate_v5 + */ + public function testCustomersCorporateList() + { + $client = static::getApiClient(); + + $response = $client->request->customersCorporateList(); + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertTrue($response->isSuccessful()); + static::assertTrue(isset($response['customersCorporate'])); + + $response = $client->request->customersCorporateList([], 1, 300); + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertFalse( + $response->isSuccessful(), + 'Pagination error' + ); + + $response = $client->request->customersCorporateList(['maxOrdersCount' => 10], 1); + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertTrue( + $response->isSuccessful(), + 'API returns customers list' + ); + } + + /** + * @group customers_corporate_v5 + * @expectedException \InvalidArgumentException + */ + public function testCustomersCorporateFixExternalIdsException() + { + $client = static::getApiClient(); + $client->request->customersCorporateFixExternalIds([]); + } + + /** + * @group customers_corporate_v5 + */ + public function testCustomersCorporateFixExternalIds() + { + $client = static::getApiClient(); + + $response = $client->request->ordersCreate([ + 'firstName' => 'Aaa111', + ]); + + static::assertTrue( + $response->isSuccessful(), + 'Order created' + ); + + $response = $client->request->ordersGet($response['id'], 'id'); + static::assertTrue( + $response->isSuccessful(), + 'Order fetched' + ); + + $id = $response['order']['customer']['id']; + $externalId = 'asdf' . time(); + + $response = $client->request->customersCorporateFixExternalIds([ + ['id' => $id, 'externalId' => $externalId] + ]); + + static::assertTrue( + $response->isSuccessful(), + 'Fixed customer ids' + ); + + $response = $client->request->customersCorporateGet($externalId); + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + } + + /** + * @group customers_corporate_v5 + * @expectedException \InvalidArgumentException + */ + public function testCustomersCorporateUploadExceptionEmpty() + { + $client = static::getApiClient(); + $client->request->customersCorporateUpload([]); + } + + /** + * @group customers_corporate_v5 + */ + public function testCustomersCorporateUpload() + { + $client = static::getApiClient(); + + $externalIdA = 'upload-a-' . time(); + $externalIdB = 'upload-b-' . time(); + + $response = $client->request->customersCorporateUpload([ + [ + 'externalId' => $externalIdA, + 'nickName' => 'Aaa', + ], + [ + 'externalId' => $externalIdB, + 'nickName' => 'Bbb', + ], + ]); + static::assertTrue( + $response->isSuccessful(), + 'Got customer' + ); + static::assertEquals( + $externalIdA, + $response['uploadedCustomers'][0]['externalId'] + ); + static::assertEquals( + $externalIdB, + $response['uploadedCustomers'][1]['externalId'] + ); + } + + /** + * testCustomersCorporateAddressesException + * @expectedException \InvalidArgumentException + */ + public function testCustomersCorporateAddressesException() + { + $client = static::getApiClient(); + $client->request->customersCorporateAddresses('', [], [], [], 'uid'); + } + + /** + * testCustomersCorporateAddresses + * + * @param array $ids + * + * @group customers_corporate_v5 + * @depends testCustomersCorporateEdit + * @return array + */ + public function testCustomersCorporateAddresses(array $ids) + { + $client = static::getApiClient(); + $response = $client->request->customersCorporateAddresses($ids['externalId'], ['name' => 'name'], 1, 20); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertTrue( + $response->isSuccessful(), + 'API returns addresses list' + ); + + return $ids; + } + + /** + * @group customers_corporate_v5 + */ + public function testCustomersCorporateHistory() + { + $client = static::getApiClient(); + $response = $client->request->customersCorporateHistory(['sinceId' => 1], 1, 20); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertTrue( + $response->isSuccessful(), + 'API returns history list' + ); + } + + /** + * @group customers_corporate_v5 + */ + public function testCustomersCorporateNotesList() + { + $client = static::getApiClient(); + $response = $client->request->customersCorporateNotesList(['text' => 'text'], 1, 20); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertTrue( + $response->isSuccessful(), + 'API returns notes list' + ); + } + + /** + * @group customers_corporate_v5 + * @depends testCustomersCorporateAddresses + * + * @param array $ids + * + * @return array + */ + public function testCustomersCorporateCompaniesList(array $ids) + { + $client = static::getApiClient(); + $response = $client->request->customersCorporateCompanies($ids['externalId'], ['ids' => [1]], 1, 20); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertTrue( + $response->isSuccessful(), + 'API returns companies list' + ); + + return $ids; + } + + /** + * @group customers_corporate_v5 + * + * @param array $ids + * @depends testCustomersCorporateCompaniesList + * + * @return array + */ + public function testCustomersCorporateContactsList(array $ids) + { + $client = static::getApiClient(); + $response = $client->request->customersCorporateContacts($ids['externalId'], ['ids' => [1]], 1, 20); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertTrue( + $response->isSuccessful(), + 'API returns contacts list' + ); + + return $ids; + } + + /** + * testCustomersCorporateNotesCreate + * + * @param array $ids + * + * @depends testCustomersCorporateContactsList + * @return array + */ + public function testCustomersCorporateNotesCreate(array $ids) + { + $client = static::getApiClient(); + $response = $client->request->customersCorporateNotesCreate([ + 'text' => 'test note', + 'customer' => [ + 'externalId' => $ids['externalId'] + ] + ]); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertEquals(201, $response->getStatusCode()); + static::assertArrayHasKey('id', $response->getResponse()); + + return array_merge($response->getResponse(), ['customer' => $ids]); + } + + /** + * testCustomersCorporateNotesCreateException + * @expectedException \InvalidArgumentException + */ + public function testCustomersCorporateNotesCreateException() + { + $client = static::getApiClient(); + $client->request->customersCorporateNotesCreate([ + 'text' => 'test note', + 'customer' => [] + ]); + } + + /** + * testCustomersCorporateNotesDelete + * + * @param array $noteResponse + * + * @depends testCustomersCorporateNotesCreate + * @return mixed + */ + public function testCustomersCorporateNotesDelete(array $noteResponse) + { + $client = static::getApiClient(); + $response = $client->request->customersCorporateNotesDelete($noteResponse['id']); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertEquals(200, $response->getStatusCode()); + + return $noteResponse['customer']; + } + + /** + * testCustomersCorporateNotesDeleteException + * @expectedException \InvalidArgumentException + */ + public function testCustomersCorporateNotesDeleteException() + { + $client = static::getApiClient(); + $client->request->customersCorporateNotesDelete(null); + } + + /** + * testCustomersCorporateAddressCreate + * + * @param array $ids + * @depends testCustomersCorporateNotesDelete + * + * @return array + */ + public function testCustomersCorporateAddressCreate(array $ids) + { + $client = static::getApiClient(); + $response = $client->request->customersCorporateAddressesCreate( + $ids['externalId'], + ['text' => 'Boldovo, Ruzayevsky District, Respublika Mordoviya'] + ); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertTrue($response->isSuccessful(), 'Address is created'); + static::assertArrayHasKey('id', $response->getResponse()); + + return array_merge($response->getResponse(), ['customer' => $ids]); + } + + /** + * testCustomersCorporateAddressEdit + * + * @param array $createResponse + * @depends testCustomersCorporateAddressCreate + * + * @return array + */ + public function testCustomersCorporateAddressEdit(array $createResponse) + { + $client = static::getApiClient(); + $response = $client->request->customersCorporateAddressesEdit( + $createResponse['customer']['externalId'], + $createResponse['id'], + ['text' => '648593, Evenkiysky District, Krasnoyarsk Krai'], + 'externalId', + 'id' + ); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertTrue($response->isSuccessful(), 'Address is edited'); + + return $createResponse['customer']; + } + + /** + * testCustomersCorporateAddressesEditException + * @expectedException \InvalidArgumentException + */ + public function testCustomersCorporateAddressesEditException() + { + $client = static::getApiClient(); + $client->request->customersCorporateAddressesEdit(0, 0, []); + } + + /** + * testCustomersCorporateCompaniesCreate + * + * @param array $ids + * @depends testCustomersCorporateAddressEdit + * + * @return array + */ + public function testCustomersCorporateCompaniesCreate(array $ids) + { + $client = static::getApiClient(); + $response = $client->request->customersCorporateCompaniesCreate( + $ids['externalId'], + [ + 'active' => true, + 'name' => 'Company name', + 'brand' => 'company brand', + 'contragent' => [ + 'contragentType' => 'legal-entity', + 'legalName' => 'Company Name', + 'legalAddress' => '648593, Evenkiysky District, Krasnoyarsk Krai', + 'INN' => '000000000', + 'OKPO' => '000000000', + 'KPP' => '000000000', + 'OGRN' => '000000000', + 'BIK' => '000000000', + 'bank' => 'bank', + 'bankAddress' => 'bank address', + 'corrAccount' => 'correspondent account', + 'bankAccount' => 'bank account' + ] + ] + ); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertTrue($response->isSuccessful(), 'Company is created'); + static::assertArrayHasKey('id', $response->getResponse()); + + return array_merge($response->getResponse(), ['customer' => $ids]); + } + + /** + * testCustomersCorporateCompaniesEdit + * + * @depends testCustomersCorporateCompaniesCreate + * + * @param array $createResp + * + * @return mixed + */ + public function testCustomersCorporateCompaniesEdit(array $createResp) + { + $client = static::getApiClient(); + $response = $client->request->customersCorporateCompaniesEdit( + $createResp['customer']['externalId'], + $createResp['id'], + ['name' => 'Company Name 2'], + 'externalId', + 'id' + ); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertTrue($response->isSuccessful(), 'Company is edited'); + static::assertArrayHasKey('id', $response->getResponse()); + + return $createResp['customer']; + } + + /** + * testCustomersCorporateContactsCreate + * + * @param array $ids + * @depends testCustomersCorporateCompaniesEdit + * + * @return array + */ + public function testCustomersCorporateContactsCreate(array $ids) + { + $client = static::getApiClient(); + $testCustomerExternalId = sprintf('test-customer-external-id-%d', time()); + $customerResponse = $client->request->customersCreate([ + 'firstName' => 'Test Customer', + 'externalId' => $testCustomerExternalId, + ]); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $customerResponse); + static::assertTrue($customerResponse->isSuccessful(), 'Test customer is created'); + + $response = $client->request->customersCorporateContactsCreate( + $ids['externalId'], + [ + 'customer' => [ + 'externalId' => $testCustomerExternalId, + 'browserId' => 'ca205b35862546758218cac776355f32', + 'site' => static::getSite() + ] + ] + ); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertTrue($response->isSuccessful(), 'Contact person is created'); + static::assertArrayHasKey('id', $response->getResponse()); + + return [ + 'contact' => $customerResponse->getResponse(), + 'customer' => $ids + ]; + } + + /** + * testCustomersCorporateContactsEdit + * + * @depends testCustomersCorporateContactsCreate + * + * @param array $createResp + * + * @return mixed + */ + public function testCustomersCorporateContactsEdit(array $createResp) + { + $client = static::getApiClient(); + $response = $client->request->customersCorporateContactsEdit( + $createResp['customer']['externalId'], + $createResp['contact']['id'], + [ + 'id' => $createResp['contact']['id'], + 'customer' => [ + 'browserId' => '73997eedbdaf4c0991b1a5511aeae407', + 'site' => static::getSite() + ] + ], + 'externalId', + 'id', + static::getSite() + ); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertTrue($response->isSuccessful(), 'Contact person is edited'); + static::assertArrayHasKey('id', $response->getResponse()); + + return $createResp['customer']; + } + + /** + * getSite + * + * @return string + */ + private static function getSite() + { + return getenv('RETAILCRM_SITE') ?: $_SERVER['RETAILCRM_SITE']; + } +} From b4eccc73af134e9a921907dce28c90a677ba4d3d Mon Sep 17 00:00:00 2001 From: Pavel Date: Mon, 25 Nov 2019 11:51:33 +0300 Subject: [PATCH 23/41] Fixes #73 --- lib/RetailCrm/Methods/V5/Files.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/RetailCrm/Methods/V5/Files.php b/lib/RetailCrm/Methods/V5/Files.php index 7e589c5..b891f74 100644 --- a/lib/RetailCrm/Methods/V5/Files.php +++ b/lib/RetailCrm/Methods/V5/Files.php @@ -169,7 +169,7 @@ trait Files */ public function fileEdit(array $file) { - if (!empty($file)) { + if (empty($file)) { throw new \InvalidArgumentException( 'Parameter `file` must contains a data' ); From 8cd0837aa07693e8559a678c2a2fefcbadba604f Mon Sep 17 00:00:00 2001 From: Pavel Date: Mon, 9 Dec 2019 09:15:57 +0300 Subject: [PATCH 24/41] [fix] Fill site code for /telephony/call/event and /telephony/call/upload --- lib/RetailCrm/Methods/V3/Telephony.php | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/lib/RetailCrm/Methods/V3/Telephony.php b/lib/RetailCrm/Methods/V3/Telephony.php index 6f72576..5e80a96 100644 --- a/lib/RetailCrm/Methods/V3/Telephony.php +++ b/lib/RetailCrm/Methods/V3/Telephony.php @@ -54,17 +54,17 @@ trait Telephony /** * Call event * - * @param string $phone phone number - * @param string $type call type + * @param string $phone phone number + * @param string $type call type * @param array $codes * @param string $hangupStatus * @param string $externalPhone * @param array $webAnalyticsData + * @param string $site (default: null) * * @return \RetailCrm\Response\ApiResponse * @internal param string $code additional phone code * @internal param string $status call status - * */ public function telephonyCallEvent( $phone, @@ -72,7 +72,8 @@ trait Telephony $codes, $hangupStatus = null, $externalPhone = null, - $webAnalyticsData = [] + $webAnalyticsData = [], + $site = null ) { if (!isset($phone)) { throw new \InvalidArgumentException('Phone number must be set'); @@ -93,27 +94,24 @@ trait Telephony $parameters['callExternalId'] = $externalPhone; $parameters['webAnalyticsData'] = $webAnalyticsData; - /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/telephony/call/event', "POST", - ['event' => json_encode($parameters)] + ['event' => json_encode($this->fillSite($site, $parameters))] ); } /** * Upload calls * - * @param array $calls calls data + * @param array $calls calls data * - * @throws \InvalidArgumentException - * @throws \RetailCrm\Exception\CurlException - * @throws \RetailCrm\Exception\InvalidJsonException + * @param bool $autoFillSite fill site code from API client in provided calls * * @return \RetailCrm\Response\ApiResponse */ - public function telephonyCallsUpload(array $calls) + public function telephonyCallsUpload(array $calls, $autoFillSite = false) { if (!count($calls)) { throw new \InvalidArgumentException( @@ -121,6 +119,12 @@ trait Telephony ); } + if ($autoFillSite) { + foreach ($calls as $key => $call) { + $calls[$key] = $this->fillSite(null, $call); + } + } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( '/telephony/calls/upload', From 170e0b8f34373bac8773e43f12d82414ddb43b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=90=D1=80=D1=82?= =?UTF-8?q?=D0=B0=D1=85=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Mon, 16 Dec 2019 20:08:57 +0300 Subject: [PATCH 25/41] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BA=D0=BE=D0=BF=D1=80=D0=BE=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D0=B8=D0=B2=D0=BD=D1=8B=D1=85=20=D0=BA=D0=BB=D0=B8=D0=B5=D0=BD?= =?UTF-8?q?=D1=82=D0=BE=D0=B2=20=D0=B8=20=D0=B8=D1=85=20=D0=BA=D0=BE=D0=BC?= =?UTF-8?q?=D0=BF=D0=B0=D0=BD=D0=B8=D0=B9=20=D0=BF=D1=80=D0=B8=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=82=D0=B5=20=D1=81=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=D1=81?= =?UTF-8?q?=D0=BA=D0=B8=D0=BC=D0=B8=20=D0=BF=D0=BE=D0=BB=D1=8F=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/RetailCrm/Methods/V5/CustomFields.php | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/lib/RetailCrm/Methods/V5/CustomFields.php b/lib/RetailCrm/Methods/V5/CustomFields.php index 597a313..0479288 100644 --- a/lib/RetailCrm/Methods/V5/CustomFields.php +++ b/lib/RetailCrm/Methods/V5/CustomFields.php @@ -78,9 +78,12 @@ trait CustomFields ); } - if (empty($entity) || !in_array($entity, ['customer', 'order'])) { + if (empty($entity) || !in_array($entity, ['customer', 'order', 'customer_corporate', 'company'])) { throw new \InvalidArgumentException( - 'Parameter `entity` must contain a data & value must be `order` or `customer`' + sprintf( + 'Parameter `entity` must contain a data & value must be %s', + '`order`, `customer`, `customer_corporate` or `company`' + ) ); } @@ -108,9 +111,12 @@ trait CustomFields ); } - if (empty($entity) || !in_array($entity, ['customer', 'order'])) { + if (empty($entity) || !in_array($entity, ['customer', 'order', 'customer_corporate', 'company'])) { throw new \InvalidArgumentException( - 'Parameter `entity` must contain a data & value must be `order` or `customer`' + sprintf( + 'Parameter `entity` must contain a data & value must be %s', + '`order`, `customer`, `customer_corporate` or `company`' + ) ); } @@ -138,9 +144,12 @@ trait CustomFields ); } - if (empty($entity) || !in_array($entity, ['customer', 'order'])) { + if (empty($entity) || !in_array($entity, ['customer', 'order', 'customer_corporate', 'company'])) { throw new \InvalidArgumentException( - 'Parameter `entity` must contain a data & value must be `order` or `customer`' + sprintf( + 'Parameter `entity` must contain a data & value must be %s', + '`order`, `customer`, `customer_corporate` or `company`' + ) ); } From 0f05f84d045179f2b02ff1aa6c349a2ff230c58c Mon Sep 17 00:00:00 2001 From: Vitaliy Chesnokov Date: Mon, 20 Jan 2020 18:32:25 +0300 Subject: [PATCH 26/41] Add orders merge technique --- lib/RetailCrm/Methods/V5/Orders.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/RetailCrm/Methods/V5/Orders.php b/lib/RetailCrm/Methods/V5/Orders.php index 19b63d6..9648ae8 100644 --- a/lib/RetailCrm/Methods/V5/Orders.php +++ b/lib/RetailCrm/Methods/V5/Orders.php @@ -42,7 +42,7 @@ trait Orders */ public function ordersCombine($order, $resultOrder, $technique = 'ours') { - $techniques = ['ours', 'summ', 'theirs']; + $techniques = ['ours', 'summ', 'theirs', 'merge']; if (!count($order) || !count($resultOrder)) { throw new \InvalidArgumentException( From 9bbf277d9263631db68a9701ccdf1ee218958c64 Mon Sep 17 00:00:00 2001 From: Pavel Date: Tue, 11 Feb 2020 10:57:17 +0300 Subject: [PATCH 27/41] fix for fileUpload & fileDownload --- .gitignore | 2 ++ lib/RetailCrm/Client/AbstractLoader.php | 5 ++++ lib/RetailCrm/Http/Client.php | 29 +++++++++++++++++++++-- lib/RetailCrm/Methods/V5/Files.php | 2 +- lib/RetailCrm/Response/ApiResponse.php | 14 +++++++++-- tests/RetailCrm/Tests/Http/ClientTest.php | 16 +++++++++++++ 6 files changed, 63 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 0e22d4b..c7050eb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,8 @@ /bin composer.lock composer.phar +coverage.xml +test-report.xml phpunit.xml .idea .DS_Store diff --git a/lib/RetailCrm/Client/AbstractLoader.php b/lib/RetailCrm/Client/AbstractLoader.php index c9c2905..c021a1a 100755 --- a/lib/RetailCrm/Client/AbstractLoader.php +++ b/lib/RetailCrm/Client/AbstractLoader.php @@ -29,8 +29,13 @@ use RetailCrm\Http\Client; */ abstract class AbstractLoader { + /** @var string|null */ protected $siteCode; + + /** @var \RetailCrm\Http\Client */ protected $client; + + /** @var string */ protected $crmUrl; /** diff --git a/lib/RetailCrm/Http/Client.php b/lib/RetailCrm/Http/Client.php index 3bb043e..f0c2840 100755 --- a/lib/RetailCrm/Http/Client.php +++ b/lib/RetailCrm/Http/Client.php @@ -75,7 +75,7 @@ class Client * * @return ApiResponse */ - public function makeRequest( + public function makeRawRequest( $path, $method, array $parameters = [], @@ -119,7 +119,7 @@ class Client curl_setopt($curlHandler, CURLOPT_POST, true); if ('/files/upload' == $path) { - curl_setopt($curlHandler, CURLOPT_POSTFIELDS, $parameters['file']); + curl_setopt($curlHandler, CURLOPT_POSTFIELDS, file_get_contents($parameters['file'])); } else { curl_setopt($curlHandler, CURLOPT_POSTFIELDS, $parameters); } @@ -143,4 +143,29 @@ class Client return new ApiResponse($statusCode, $responseBody); } + + /** + * Make HTTP request and deserialize JSON body (throws exception otherwise) + * + * @param string $path request url + * @param string $method (default: 'GET') + * @param array $parameters (default: array()) + * @param bool $fullPath (default: false) + * + * @SuppressWarnings(PHPMD.ExcessiveParameterList) + * + * @throws \InvalidArgumentException + * @throws CurlException + * @throws InvalidJsonException + * + * @return ApiResponse + */ + public function makeRequest( + $path, + $method, + array $parameters = [], + $fullPath = false + ) { + return $this->makeRawRequest($path, $method, $parameters, $fullPath)->asJsonResponse(); + } } diff --git a/lib/RetailCrm/Methods/V5/Files.php b/lib/RetailCrm/Methods/V5/Files.php index b891f74..bc711ec 100644 --- a/lib/RetailCrm/Methods/V5/Files.php +++ b/lib/RetailCrm/Methods/V5/Files.php @@ -150,7 +150,7 @@ trait Files public function fileDownload($id) { /* @noinspection PhpUndefinedMethodInspection */ - return $this->client->makeRequest( + return $this->client->makeRawRequest( sprintf('/files/%s/download', $id), "GET" ); diff --git a/lib/RetailCrm/Response/ApiResponse.php b/lib/RetailCrm/Response/ApiResponse.php index f5e6efa..34e6118 100644 --- a/lib/RetailCrm/Response/ApiResponse.php +++ b/lib/RetailCrm/Response/ApiResponse.php @@ -51,9 +51,17 @@ class ApiResponse implements \ArrayAccess { $this->statusCode = (int) $statusCode; $this->rawResponse = $responseBody; + } - if (!empty($responseBody)) { - $response = json_decode($responseBody, true); + /** + * Deserialize JSON from raw response body + * + * @return $this + */ + public function asJsonResponse() + { + if (!empty($this->rawResponse)) { + $response = json_decode($this->rawResponse, true); if (!$response && JSON_ERROR_NONE !== ($error = json_last_error())) { throw new InvalidJsonException( @@ -64,6 +72,8 @@ class ApiResponse implements \ArrayAccess $this->response = $response; } + + return $this; } /** diff --git a/tests/RetailCrm/Tests/Http/ClientTest.php b/tests/RetailCrm/Tests/Http/ClientTest.php index 5caa9f1..dd68d82 100644 --- a/tests/RetailCrm/Tests/Http/ClientTest.php +++ b/tests/RetailCrm/Tests/Http/ClientTest.php @@ -93,6 +93,22 @@ class ClientTest extends TestCase $response = $client->makeRequest('/orders', Client::METHOD_GET); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertNotEmpty($response->getResponseBody()); + static::assertNotEmpty($response->getResponse()); + static::assertEquals(200, $response->getStatusCode()); + } + + /** + * @group client + */ + public function testRequestSuccessNoDeserialization() + { + $client = static::getClient(); + $response = $client->makeRawRequest('/orders', Client::METHOD_GET); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertNotEmpty($response->getResponseBody()); + static::assertEmpty($response->getResponse()); static::assertEquals(200, $response->getStatusCode()); } } From 8ebcdaeebc3111b8989e17caf1d4dd2d2392960a Mon Sep 17 00:00:00 2001 From: Pavel Date: Wed, 12 Feb 2020 14:07:27 +0300 Subject: [PATCH 28/41] fix & add tests --- .../ApiClientCustomersCorporateTest.php | 2 +- .../Tests/Response/ApiResponseTest.php | 45 ++++++++++++------- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersCorporateTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersCorporateTest.php index 0587fd7..26bf263 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersCorporateTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersCorporateTest.php @@ -308,7 +308,7 @@ class ApiClientCustomersCorporateTest extends TestCase { $client = static::getApiClient(); $response = $client->request->customersCorporateAddresses($ids['externalId'], ['name' => 'name'], 1, 20); - + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertTrue( $response->isSuccessful(), diff --git a/tests/RetailCrm/Tests/Response/ApiResponseTest.php b/tests/RetailCrm/Tests/Response/ApiResponseTest.php index d4709bd..8a414f6 100644 --- a/tests/RetailCrm/Tests/Response/ApiResponseTest.php +++ b/tests/RetailCrm/Tests/Response/ApiResponseTest.php @@ -40,7 +40,7 @@ class ApiResponseTest extends TestCase 'Response object created' ); - $response = new ApiResponse(201, '{ "success": true }'); + $response = (new ApiResponse(201, '{ "success": true }'))->asJsonResponse(); static::assertInstanceOf( 'RetailCrm\Response\ApiResponse', $response, @@ -54,7 +54,20 @@ class ApiResponseTest extends TestCase */ public function testJsonInvalid() { - new ApiResponse(400, '{ "asdf": }'); + (new ApiResponse(400, '{ "asdf": }'))->asJsonResponse(); + } + + /** + * @group response + */ + public function testJsonInvalidNoDeserialize() + { + $response = new ApiResponse(400, '{ "asdf": }'); + static::assertInstanceOf( + 'RetailCrm\Response\ApiResponse', + $response, + 'Response object created' + ); } /** @@ -69,7 +82,7 @@ class ApiResponseTest extends TestCase 'Response object returns the right status code' ); - $response = new ApiResponse(460, '{ "success": false }'); + $response = (new ApiResponse(460, '{ "success": false }'))->asJsonResponse(); static::assertEquals( 460, $response->getStatusCode(), @@ -88,7 +101,7 @@ class ApiResponseTest extends TestCase 'Request was successful' ); - $response = new ApiResponse(460, '{ "success": false }'); + $response = (new ApiResponse(460, '{ "success": false }'))->asJsonResponse(); static::assertFalse( $response->isSuccessful(), 'Request was failed' @@ -100,7 +113,7 @@ class ApiResponseTest extends TestCase */ public function testMagicCall() { - $response = new ApiResponse(201, '{ "success": true }'); + $response = (new ApiResponse(201, '{ "success": true }'))->asJsonResponse(); static::assertEquals( true, $response->isSuccessful(), @@ -125,7 +138,7 @@ class ApiResponseTest extends TestCase */ public function testMagicCallException2() { - $response = new ApiResponse(201, '{ "success": true }'); + $response = (new ApiResponse(201, '{ "success": true }'))->asJsonResponse(); /* @noinspection PhpUndefinedMethodInspection */ $response->getSomeSuccess(); } @@ -135,7 +148,7 @@ class ApiResponseTest extends TestCase */ public function testMagicGet() { - $response = new ApiResponse(201, '{ "success": true }'); + $response = (new ApiResponse(201, '{ "success": true }'))->asJsonResponse(); static::assertEquals( true, $response->success, @@ -160,7 +173,7 @@ class ApiResponseTest extends TestCase */ public function testMagicGetException2() { - $response = new ApiResponse(201, '{ "success": true }'); + $response = (new ApiResponse(201, '{ "success": true }'))->asJsonResponse(); /* @noinspection PhpUndefinedFieldInspection */ $response->someSuccess; } @@ -170,7 +183,7 @@ class ApiResponseTest extends TestCase */ public function testArrayGet() { - $response = new ApiResponse(201, '{ "success": true }'); + $response = (new ApiResponse(201, '{ "success": true }'))->asJsonResponse(); static::assertEquals( true, $response['success'], @@ -194,7 +207,7 @@ class ApiResponseTest extends TestCase */ public function testArrayGetException2() { - $response = new ApiResponse(201, '{ "success": true }'); + $response = (new ApiResponse(201, '{ "success": true }'))->asJsonResponse(); $response['someSuccess']; } @@ -203,7 +216,7 @@ class ApiResponseTest extends TestCase */ public function testArrayIsset() { - $response = new ApiResponse(201, '{ "success": true }'); + $response = (new ApiResponse(201, '{ "success": true }'))->asJsonResponse(); static::assertTrue( isset($response['success']), @@ -222,7 +235,7 @@ class ApiResponseTest extends TestCase */ public function testArraySetException1() { - $response = new ApiResponse(201, '{ "success": true }'); + $response = (new ApiResponse(201, '{ "success": true }'))->asJsonResponse(); $response['success'] = 'a'; } @@ -232,7 +245,7 @@ class ApiResponseTest extends TestCase */ public function testArraySetException2() { - $response = new ApiResponse(201, '{ "success": true }'); + $response = (new ApiResponse(201, '{ "success": true }'))->asJsonResponse(); $response['sssssssuccess'] = 'a'; } @@ -242,7 +255,7 @@ class ApiResponseTest extends TestCase */ public function testArrayUnsetException1() { - $response = new ApiResponse(201, '{ "success": true }'); + $response = (new ApiResponse(201, '{ "success": true }'))->asJsonResponse(); unset($response['success']); } @@ -252,7 +265,7 @@ class ApiResponseTest extends TestCase */ public function testArrayUnsetException2() { - $response = new ApiResponse(201, '{ "success": true }'); + $response = (new ApiResponse(201, '{ "success": true }'))->asJsonResponse(); unset($response['sssssssuccess']); } @@ -261,7 +274,7 @@ class ApiResponseTest extends TestCase */ public function testMagicIsset() { - $response = new ApiResponse(201, '{ "success": true }'); + $response = (new ApiResponse(201, '{ "success": true }'))->asJsonResponse(); static::assertTrue( isset($response->success), From 4073580394300a57274381b96edcf3f2290729e4 Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Fri, 3 Jul 2020 09:58:31 +0300 Subject: [PATCH 29/41] units methods --- lib/RetailCrm/Methods/V5/References.php | 45 +++++++++++++++++++ .../Version5/ApiClientReferenceTest.php | 37 ++++++++++++++- 2 files changed, 81 insertions(+), 1 deletion(-) diff --git a/lib/RetailCrm/Methods/V5/References.php b/lib/RetailCrm/Methods/V5/References.php index a9e4ca7..e1233ed 100644 --- a/lib/RetailCrm/Methods/V5/References.php +++ b/lib/RetailCrm/Methods/V5/References.php @@ -245,4 +245,49 @@ trait References ['courier' => json_encode($courier)] ); } + + /** + * Get units + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function unitsList() + { + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/reference/units', + "GET" + ); + } + + /** + * Edit unit + * + * @param array $unit + * + * @throws \InvalidArgumentException + * @throws \RetailCrm\Exception\CurlException + * @throws \RetailCrm\Exception\InvalidJsonException + * + * @return \RetailCrm\Response\ApiResponse + */ + public function unitsEdit(array $unit) + { + if (empty($unit['code']) || empty($unit['name']) || empty($unit['sym'])) { + throw new \InvalidArgumentException( + '`code`, `name` and `sym` parameters must not be empty.' + ); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + sprintf('/reference/units/%s/edit', $unit['code']), + "POST", + ['unit' => json_encode($unit)] + ); + } } diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php index bf11d11..e85754c 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php @@ -137,6 +137,40 @@ class ApiClientReferenceTest extends TestCase } } + /** + * @group reference_v5 + */ + public function testUnitsEditing() + { + $client = static::getApiClient(); + + $unit = [ + 'code' => 'test', + 'name' => 'Test', + 'sym' => 'tst' + ]; + + $response = $client->request->unitsEdit($unit); + + static::assertTrue(in_array($response->getStatusCode(), [200, 201])); + } + + /** + * @group reference_v5 + * @expectedException \InvalidArgumentException + */ + public function testUnitsEditingFail() + { + $client = static::getApiClient(); + + $unit = [ + 'name' => 'Test', + 'sym' => 'tst' + ]; + + $client->request->unitsEdit($unit); + } + /** * @return array */ @@ -155,7 +189,8 @@ class ApiClientReferenceTest extends TestCase ['sites'], ['stores'], ['couriers'], - ['costs'] + ['costs'], + ['units'] ]; } From d9128fa5d1a7c5af85b85ed0775ea98f4ab30a10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB?= Date: Tue, 14 Jul 2020 10:07:01 +0300 Subject: [PATCH 30/41] settings method --- lib/RetailCrm/Client/ApiVersion5.php | 1 + lib/RetailCrm/Methods/V5/Settings.php | 44 +++++++++++++++++++ .../Tests/Methods/CommonMethodsTest.php | 18 ++++++++ 3 files changed, 63 insertions(+) create mode 100644 lib/RetailCrm/Methods/V5/Settings.php diff --git a/lib/RetailCrm/Client/ApiVersion5.php b/lib/RetailCrm/Client/ApiVersion5.php index f06155c..952d26f 100644 --- a/lib/RetailCrm/Client/ApiVersion5.php +++ b/lib/RetailCrm/Client/ApiVersion5.php @@ -54,6 +54,7 @@ class ApiVersion5 extends AbstractLoader use V5\Packs; use V5\References; use V5\Segments; + use V5\Settings; use V5\Statistic; use V5\Stores; use V5\Tasks; diff --git a/lib/RetailCrm/Methods/V5/Settings.php b/lib/RetailCrm/Methods/V5/Settings.php new file mode 100644 index 0000000..7c0e5f1 --- /dev/null +++ b/lib/RetailCrm/Methods/V5/Settings.php @@ -0,0 +1,44 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * @link https://help.retailcrm.ru/Developers/ApiVersion5 + */ + +namespace RetailCrm\Methods\V5; + +/** + * PHP version 5.4 + * + * Settings class + * + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link https://help.retailcrm.ru/Developers/ApiVersion5 + */ +trait Settings +{ + /** + * Get settings + * + * @return \RetailCrm\Response\ApiResponse + */ + public function settings() + { + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/settings', + "GET", + [] + ); + } +} diff --git a/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php b/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php index b93c39e..f08b954 100755 --- a/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php +++ b/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php @@ -62,4 +62,22 @@ class CommonMethodsTest extends TestCase static::assertTrue($response->isSuccessful()); static::assertGreaterThan(0, count($response['credentials'])); } + + /** + * System settings + * + * @group api_methods + * + * @return void + */ + public function testSettings() + { + $client = static::getApiClient(); + + $response = $client->request->settings(); + + static::assertEquals(200, $response->getStatusCode()); + static::assertTrue($response->isSuccessful()); + static::assertGreaterThan(0, count($response['settings'])); + } } From 88cb6526b07ee83482b558c34507ef660a3ee5ce Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Fri, 21 Aug 2020 10:24:55 +0300 Subject: [PATCH 31/41] Additional request options --- README.md | 17 +++ lib/RetailCrm/Client/AbstractLoader.php | 11 ++ lib/RetailCrm/Http/Client.php | 20 +++- lib/RetailCrm/Http/RequestOptions.php | 101 ++++++++++++++++++ .../Tests/Http/RequestOptionsTest.php | 25 +++++ 5 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 lib/RetailCrm/Http/RequestOptions.php create mode 100644 tests/RetailCrm/Tests/Http/RequestOptionsTest.php diff --git a/README.md b/README.md index e5e1006..58575d1 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,23 @@ if ($response->isSuccessful() && 201 === $response->getStatusCode()) { } ``` +### Set custom headers and client timeout +```php +$client = new \RetailCrm\ApiClient( + 'https://demo.retailcrm.ru', + 'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH', + \RetailCrm\ApiClient::V4 +); + +$options = new \RetailCrm\Http\RequestOptions( + ['X-Rlimit-Token' => 'example_token'], // array of custom headers + 10 // client timeout (in seconds) +); + +$client->request->setOptions($options); +``` + + ### Documentation * [English](https://help.retailcrm.pro/Developers) diff --git a/lib/RetailCrm/Client/AbstractLoader.php b/lib/RetailCrm/Client/AbstractLoader.php index c021a1a..ea5062d 100755 --- a/lib/RetailCrm/Client/AbstractLoader.php +++ b/lib/RetailCrm/Client/AbstractLoader.php @@ -15,6 +15,7 @@ namespace RetailCrm\Client; use RetailCrm\Http\Client; +use RetailCrm\Http\RequestOptions; /** * PHP version 5.4 @@ -67,6 +68,16 @@ abstract class AbstractLoader $this->siteCode = $site; } + /** + * Set request options + * + * @param RequestOptions $options + */ + public function setOptions(RequestOptions $options) + { + $this->client->setOptions($options); + } + /** * Set site * diff --git a/lib/RetailCrm/Http/Client.php b/lib/RetailCrm/Http/Client.php index f0c2840..58f8f49 100755 --- a/lib/RetailCrm/Http/Client.php +++ b/lib/RetailCrm/Http/Client.php @@ -37,6 +37,7 @@ class Client protected $url; protected $defaultParameters; + protected $options; /** * Client constructor. @@ -57,6 +58,7 @@ class Client $this->url = $url; $this->defaultParameters = $defaultParameters; + $this->options = new RequestOptions(); } /** @@ -112,8 +114,12 @@ class Client curl_setopt($curlHandler, CURLOPT_FAILONERROR, false); curl_setopt($curlHandler, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curlHandler, CURLOPT_SSL_VERIFYHOST, false); - curl_setopt($curlHandler, CURLOPT_TIMEOUT, 30); - curl_setopt($curlHandler, CURLOPT_CONNECTTIMEOUT, 30); + curl_setopt($curlHandler, CURLOPT_TIMEOUT, $this->options->getClientTimeout()); + curl_setopt($curlHandler, CURLOPT_CONNECTTIMEOUT, $this->options->getClientTimeout()); + + if ($this->options->getHeaders()) { + curl_setopt($curlHandler, CURLOPT_HTTPHEADER, $this->options->getHttpHeaders()); + } if (self::METHOD_POST === $method) { curl_setopt($curlHandler, CURLOPT_POST, true); @@ -168,4 +174,14 @@ class Client ) { return $this->makeRawRequest($path, $method, $parameters, $fullPath)->asJsonResponse(); } + + /** + * Set request options + * + * @param RequestOptions $options + */ + public function setOptions(RequestOptions $options) + { + $this->options = $options; + } } diff --git a/lib/RetailCrm/Http/RequestOptions.php b/lib/RetailCrm/Http/RequestOptions.php new file mode 100644 index 0000000..486b9de --- /dev/null +++ b/lib/RetailCrm/Http/RequestOptions.php @@ -0,0 +1,101 @@ + + * @license https://opensource.org/licenses/MIT MIT License + * @link https://help.retailcrm.ru/Developers/ApiVersion5 + */ + +namespace RetailCrm\Http; + +/** + * PHP version 5.4 + * + * Request options class + * + * @category RetailCrm + * @package RetailCrm + * @author RetailCrm + * @license https://opensource.org/licenses/MIT MIT License + * @link https://help.retailcrm.ru/Developers/ApiVersion5 + */ +class RequestOptions +{ + /** @var array */ + private $headers; + + /** @var int */ + private $clientTimeout; + + /** + * Init request options. + * + * @param array $headers + * @param int $clientTimeout + */ + public function __construct($headers = array(), $clientTimeout = 30) + { + $this->headers = $headers; + $this->clientTimeout = $clientTimeout; + } + + /** + * @return array + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * @return array + */ + public function getHttpHeaders() + { + $headers = []; + + foreach ($this->headers as $header => $value) { + $headers[] = sprintf("%s: %s", $header, $value); + } + + return $headers; + } + + /** + * @param array $headers + * + * @return self + */ + public function setHeaders($headers) + { + $this->headers = $headers; + + return $this; + } + + /** + * @return int + */ + public function getClientTimeout() + { + return $this->clientTimeout; + } + + /** + * @param int $clientTimeout + * + * @return self + */ + public function setClientTimeout($clientTimeout) + { + $this->clientTimeout = $clientTimeout; + + return $this; + } +} diff --git a/tests/RetailCrm/Tests/Http/RequestOptionsTest.php b/tests/RetailCrm/Tests/Http/RequestOptionsTest.php new file mode 100644 index 0000000..f4b671c --- /dev/null +++ b/tests/RetailCrm/Tests/Http/RequestOptionsTest.php @@ -0,0 +1,25 @@ + 'Test']; + $options = new RequestOptions($headers); + + self::assertEquals('X-Test-Header: Test', $options->getHttpHeaders()[0]); + self::assertEquals('Test', $options->getHeaders()['X-Test-Header']); + } + + public function testGetClientTimeout() + { + $options = new RequestOptions([], 10); + + self::assertEquals(10, $options->getClientTimeout()); + } +} From 5d0e20581c2d64355cf9bef93a45672cc7a22f76 Mon Sep 17 00:00:00 2001 From: Yura Date: Wed, 9 Sep 2020 12:51:31 +0300 Subject: [PATCH 32/41] updated method TelephonyCallEvent (#88) --- lib/RetailCrm/Methods/V3/Telephony.php | 18 +++++++--- tests/RetailCrm/Test/TestCase.php | 17 ++++++++++ .../Version4/ApiClientTelephonyTest.php | 34 ++++++++++++++++--- 3 files changed, 60 insertions(+), 9 deletions(-) diff --git a/lib/RetailCrm/Methods/V3/Telephony.php b/lib/RetailCrm/Methods/V3/Telephony.php index 5e80a96..b6c01bc 100644 --- a/lib/RetailCrm/Methods/V3/Telephony.php +++ b/lib/RetailCrm/Methods/V3/Telephony.php @@ -54,13 +54,15 @@ trait Telephony /** * Call event * - * @param string $phone phone number - * @param string $type call type + * @param string $phone phone number + * @param string $type call type * @param array $codes + * @param array $userIds + * @param string $callExternalId * @param string $hangupStatus * @param string $externalPhone * @param array $webAnalyticsData - * @param string $site (default: null) + * @param string $site (default: null) * * @return \RetailCrm\Response\ApiResponse * @internal param string $code additional phone code @@ -70,8 +72,10 @@ trait Telephony $phone, $type, $codes, + $userIds = [], $hangupStatus = null, $externalPhone = null, + $callExternalId = null, $webAnalyticsData = [], $site = null ) { @@ -90,8 +94,14 @@ trait Telephony $parameters['phone'] = $phone; $parameters['type'] = $type; $parameters['codes'] = $codes; + + if (!empty($userIds)) { + $parameters['userIds'] = $userIds; + } + $parameters['hangupStatus'] = $hangupStatus; - $parameters['callExternalId'] = $externalPhone; + $parameters['callExternalId'] = $callExternalId; + $parameters['externalPhone'] = $externalPhone; $parameters['webAnalyticsData'] = $webAnalyticsData; /* @noinspection PhpUndefinedMethodInspection */ diff --git a/tests/RetailCrm/Test/TestCase.php b/tests/RetailCrm/Test/TestCase.php index 9cc5fea..b8f250c 100644 --- a/tests/RetailCrm/Test/TestCase.php +++ b/tests/RetailCrm/Test/TestCase.php @@ -14,6 +14,7 @@ namespace RetailCrm\Test; +use PHPUnit\Framework\MockObject\MockObject; use RetailCrm\ApiClient; use RetailCrm\Http\Client; use PHPUnit\Framework\TestCase as BaseCase; @@ -58,6 +59,22 @@ class TestCase extends BaseCase ); } + /** + * @param \RetailCrm\Http\Client|MockObject $httpClient + * @return ApiClient + * @throws \ReflectionException + */ + public static function getMockedApiClient($httpClient) + { + $client = self::getApiClient(); + $property = new \ReflectionProperty(get_class($client->request), 'client'); + + $property->setAccessible(true); + $property->setValue($client->request, $httpClient); + + return $client; + } + /** * Return Client object * diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php index 08d4a0e..9d9b2d8 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php @@ -15,6 +15,7 @@ namespace RetailCrm\Tests\Methods\Version4; use RetailCrm\ApiClient; +use RetailCrm\Response\ApiResponse; use RetailCrm\Test\TestCase; /** @@ -90,19 +91,42 @@ class ApiClientTelephonyTest extends TestCase */ public function testTelephonyEvent() { - self::markTestSkipped('Should be fixed.'); - $client = static::getApiClient(null, null, ApiClient::V4); + $stub = $this->getMockBuilder(\RetailCrm\Http\Client::class) + ->disableOriginalConstructor() + ->setMethods(['makeRequest']) + ->getMock(); + + $parameters = [ + 'phone' => '+79999999999', + 'type' => 'in', + 'codes' => ['101'], + 'userIds' => [2], + 'hangupStatus' => 'failed', + 'callExternalId' => '+74950000000', + 'externalPhone' => '123456789', + 'webAnalyticsData' => [], + 'site' => 'retailcrm-ru' + ]; + + $stub->expects(self::once())->method('makeRequest')->with( + '/telephony/call/event', + "POST", + ['event' => json_encode($parameters)] + )->willReturn((new ApiResponse(200, json_encode(['success' => true])))->asJsonResponse()); + + $client = static::getMockedApiClient($stub); $response = $client->request->telephonyCallEvent( '+79999999999', 'in', ['101'], + [2], 'failed', - '+74950000000' + '123456789', + '+74950000000', + [] ); - static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); - static::assertEquals(200, $response->getStatusCode()); static::assertTrue($response->isSuccessful()); } From e68a23885eb6de4d91971063fdfce4c322cf047b Mon Sep 17 00:00:00 2001 From: serega-kasyanow Date: Fri, 11 Sep 2020 17:23:24 +0400 Subject: [PATCH 33/41] Create invoice method (#89) Co-authored-by: seregakasyanow --- .../Methods/V5/IntegrationPayments.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lib/RetailCrm/Methods/V5/IntegrationPayments.php b/lib/RetailCrm/Methods/V5/IntegrationPayments.php index d02f993..798e585 100644 --- a/lib/RetailCrm/Methods/V5/IntegrationPayments.php +++ b/lib/RetailCrm/Methods/V5/IntegrationPayments.php @@ -27,6 +27,30 @@ namespace RetailCrm\Methods\V5; */ trait IntegrationPayments { + /** + * Create Invoice + * + * @param array $createInvoice + * @return \RetailCrm\Response\ApiResponse + */ + public function paymentCreateInvoice($createInvoice) + { + if (!count($createInvoice)) { + throw new \InvalidArgumentException( + 'Parameters `createInvoice` must contains a data' + ); + } + + /* @noinspection PhpUndefinedMethodInspection */ + return $this->client->makeRequest( + '/payment/create-invoice', + 'POST', + [ + 'createInvoice' => json_encode($createInvoice) + ] + ); + } + /** * Update Invoice * From 2672fcdebf70a7b6c60d1580ee0375f85308fba0 Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Thu, 24 Sep 2020 13:55:04 +0300 Subject: [PATCH 34/41] updated method --- lib/RetailCrm/Methods/V5/Files.php | 36 +++++++++++++++++-- .../Methods/Version5/ApiClientFilesTest.php | 17 ++++++++- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/lib/RetailCrm/Methods/V5/Files.php b/lib/RetailCrm/Methods/V5/Files.php index bc711ec..e5bb08e 100644 --- a/lib/RetailCrm/Methods/V5/Files.php +++ b/lib/RetailCrm/Methods/V5/Files.php @@ -159,27 +159,57 @@ trait Files /** * Edit file data * + * @param int $id file ID * @param array $file file data * + * $file = [ + * 'filename' => 'Test file', + * 'attachment' => [ + * [ + * 'customer' => [ + * 'id' => 1 + * ], + * 'order' => [ + * 'id' => 1 + * ] + * ] + * ] + * ]; + * * @throws \InvalidArgumentException * @throws \RetailCrm\Exception\CurlException * @throws \RetailCrm\Exception\InvalidJsonException * * @return \RetailCrm\Response\ApiResponse */ - public function fileEdit(array $file) + public function fileEdit($id, array $file) { + if (empty($id)) { + throw new \InvalidArgumentException( + 'Parameter `id` can`t be blank' + ); + } + if (empty($file)) { throw new \InvalidArgumentException( 'Parameter `file` must contains a data' ); } + $allowedFields = ['filename', 'attachment']; + foreach (array_keys($file) as $field) { + if (!in_array($field, $allowedFields)) { + throw new \InvalidArgumentException( + 'Invalid structure of `file` parameter' + ); + } + } + /* @noinspection PhpUndefinedMethodInspection */ return $this->client->makeRequest( - sprintf('/files/%s/edit', $file['id']), + sprintf('/files/%s/edit', $id), "POST", - ['file' => json_encode($file)] + ['file' => json_encode($file), 'id' => $id] ); } } diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientFilesTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientFilesTest.php index e588180..c78a4a7 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientFilesTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientFilesTest.php @@ -46,7 +46,6 @@ class ApiClientFilesTest extends TestCase */ public function testFileUpload() { - $client = static::getApiClient(); $response = $client->request->fileUpload(__DIR__ . '/../../../Tests/Resources/Report.pdf'); @@ -67,6 +66,14 @@ class ApiClientFilesTest extends TestCase sleep(1); + $response = $client->request->fileEdit($fileId, ['filename' => 'Test file']); + + static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); + static::assertEquals(200, $response->getStatusCode()); + static::assertTrue($response->isSuccessful()); + + sleep(1); + $response = $client->request->fileDelete($fileId); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); @@ -75,4 +82,12 @@ class ApiClientFilesTest extends TestCase sleep(1); } + + public function testFileEditFailure() + { + static::expectExceptionObject(new \InvalidArgumentException('Invalid structure of `file` parameter')); + $client = static::getApiClient(); + + $client->request->fileEdit(1, ['file' => []]); + } } From b66801d7d2427011fb73cfaf93e7ebf116a2168b Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Tue, 24 Nov 2020 14:23:44 +0300 Subject: [PATCH 35/41] Move CI to GitHub actions (#93) --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ .travis.yml | 20 -------------------- README.md | 9 +++++---- 3 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e40c024 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: ci + +on: + push: + branches: + - '**' + tags-ignore: + - '*.*' + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + php-version: ['7.0', '7.1', '7.2', '7.3', '7.4'] + steps: + - uses: actions/checkout@v2 + - name: Setup PHP ${{ matrix.php-version }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + ini-values: pcov.directory=lib + coverage: pcov + - name: Composer cache + uses: actions/cache@v2 + with: + path: ${{ env.HOME }}/.composer/cache + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + - name: Install dependencies + run: composer install -o + - name: Run tests + run: php ./vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist + - name: Coverage + run: bash <(curl -s https://codecov.io/bash) diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 113c239..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: php - -cache: - directories: - - $HOME/.composer/cache - -php: - - '7.0' - - '7.1' - - '7.2' - - '7.3' - -before_script: - - flags="-o" - - composer install $flags - -script: php ./vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/README.md b/README.md index 58575d1..0d1bcb1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ -[![Build Status](https://img.shields.io/travis/retailcrm/api-client-php/master.svg?style=flat-square)](https://travis-ci.org/retailcrm/api-client-php) -[![Covarage](https://img.shields.io/codecov/c/gh/retailcrm/api-client-php/master.svg?style=flat-square)](https://codecov.io/gh/retailcrm/api-client-php) -[![Latest stable](https://img.shields.io/packagist/v/retailcrm/api-client-php.svg?style=flat-square)](https://packagist.org/packages/retailcrm/api-client-php) -[![PHP from Packagist](https://img.shields.io/packagist/php-v/retailcrm/api-client-php.svg?style=flat-square)](https://packagist.org/packages/retailcrm/api-client-php) +[![Build Status](https://github.com/retailcrm/api-client-php/workflows/ci/badge.svg)](https://github.com/retailcrm/api-client-php/actions) +[![Covarage](https://img.shields.io/codecov/c/gh/retailcrm/api-client-php/master.svg?logo=codecov)](https://codecov.io/gh/retailcrm/api-client-php) +[![GitHub release](https://img.shields.io/github/release/retailcrm/api-client-php.svg?logo=github)](https://github.com/retailcrm/api-client-php/releases) +[![Latest stable](https://img.shields.io/packagist/v/retailcrm/api-client-php.svg)](https://packagist.org/packages/retailcrm/api-client-php) +[![PHP from Packagist](https://img.shields.io/packagist/php-v/retailcrm/api-client-php.svg?logo=php)](https://packagist.org/packages/retailcrm/api-client-php) # retailCRM API PHP client From 063fe1f921fb88a25ebde094997d8370e44f5c98 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Tue, 24 Nov 2020 14:24:29 +0300 Subject: [PATCH 36/41] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 0d1bcb1..e88bad5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ [![Build Status](https://github.com/retailcrm/api-client-php/workflows/ci/badge.svg)](https://github.com/retailcrm/api-client-php/actions) [![Covarage](https://img.shields.io/codecov/c/gh/retailcrm/api-client-php/master.svg?logo=codecov)](https://codecov.io/gh/retailcrm/api-client-php) -[![GitHub release](https://img.shields.io/github/release/retailcrm/api-client-php.svg?logo=github)](https://github.com/retailcrm/api-client-php/releases) [![Latest stable](https://img.shields.io/packagist/v/retailcrm/api-client-php.svg)](https://packagist.org/packages/retailcrm/api-client-php) [![PHP from Packagist](https://img.shields.io/packagist/php-v/retailcrm/api-client-php.svg?logo=php)](https://packagist.org/packages/retailcrm/api-client-php) From f8ba3b15032ae88f0543d7a364cf60c371578a4d Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Tue, 24 Nov 2020 16:24:26 +0300 Subject: [PATCH 37/41] secrets (#94) --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e40c024..35b8dc6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,13 @@ on: - '*.*' pull_request: +env: + RETAILCRM_URL: ${{ secrets.RETAILCRM_URL }} + RETAILCRM_KEY: ${{ secrets.RETAILCRM_KEY }} + RETAILCRM_VERSION: ${{ secrets.RETAILCRM_VERSION }} + RETAILCRM_SITE: ${{ secrets.RETAILCRM_SITE }} + RETAILCRM_USER: ${{ secrets.RETAILCRM_USER }} + jobs: test: runs-on: ubuntu-latest From d77cb53f104b795f4c227ade60ffc1b0f1dccdb1 Mon Sep 17 00:00:00 2001 From: Akolzin Dmitry Date: Wed, 25 Nov 2020 20:53:56 +0300 Subject: [PATCH 38/41] XDebug instead pcov (#95) --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35b8dc6..53f73ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,8 +27,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-version }} - ini-values: pcov.directory=lib - coverage: pcov + coverage: xdebug - name: Composer cache uses: actions/cache@v2 with: From 0a0bb0e46136ab955bf4a76cfeb3319e370d882a Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Tue, 15 Dec 2020 13:32:52 +0300 Subject: [PATCH 39/41] Update product name, cleanup annotations (#96) --- LICENSE | 2 +- README.md | 32 ++++++++----------- composer.json | 12 +++---- lib/RetailCrm/ApiClient.php | 6 ---- lib/RetailCrm/Client/AbstractLoader.php | 6 ---- lib/RetailCrm/Client/ApiVersion3.php | 6 ---- lib/RetailCrm/Client/ApiVersion4.php | 6 ---- lib/RetailCrm/Client/ApiVersion5.php | 6 ---- lib/RetailCrm/Exception/CurlException.php | 6 ---- .../Exception/InvalidJsonException.php | 6 ---- lib/RetailCrm/Exception/LimitException.php | 6 ---- lib/RetailCrm/Http/Client.php | 6 ---- lib/RetailCrm/Http/RequestOptions.php | 6 ---- lib/RetailCrm/Methods/V3/Customers.php | 6 ---- lib/RetailCrm/Methods/V3/Orders.php | 6 ---- lib/RetailCrm/Methods/V3/Packs.php | 6 ---- lib/RetailCrm/Methods/V3/References.php | 6 ---- lib/RetailCrm/Methods/V3/Statistic.php | 6 ---- lib/RetailCrm/Methods/V3/Stores.php | 6 ---- lib/RetailCrm/Methods/V3/Telephony.php | 6 ---- lib/RetailCrm/Methods/V4/Customers.php | 6 ---- lib/RetailCrm/Methods/V4/Delivery.php | 6 ---- lib/RetailCrm/Methods/V4/Marketplace.php | 6 ---- lib/RetailCrm/Methods/V4/Orders.php | 6 ---- lib/RetailCrm/Methods/V4/Packs.php | 6 ---- lib/RetailCrm/Methods/V4/References.php | 6 ---- lib/RetailCrm/Methods/V4/Settings.php | 6 ---- lib/RetailCrm/Methods/V4/Statistic.php | 6 ---- lib/RetailCrm/Methods/V4/Stores.php | 6 ---- lib/RetailCrm/Methods/V4/Telephony.php | 6 ---- lib/RetailCrm/Methods/V4/Users.php | 6 ---- lib/RetailCrm/Methods/V5/Costs.php | 6 ---- lib/RetailCrm/Methods/V5/CustomFields.php | 6 ---- lib/RetailCrm/Methods/V5/Customers.php | 6 ---- .../Methods/V5/CustomersCorporate.php | 6 ---- lib/RetailCrm/Methods/V5/Delivery.php | 6 ---- lib/RetailCrm/Methods/V5/Files.php | 6 ---- .../Methods/V5/IntegrationPayments.php | 6 ---- lib/RetailCrm/Methods/V5/Module.php | 6 ---- lib/RetailCrm/Methods/V5/Orders.php | 6 ---- lib/RetailCrm/Methods/V5/Packs.php | 6 ---- lib/RetailCrm/Methods/V5/References.php | 6 ---- lib/RetailCrm/Methods/V5/Segments.php | 6 ---- lib/RetailCrm/Methods/V5/Settings.php | 6 ---- lib/RetailCrm/Methods/V5/Statistic.php | 6 ---- lib/RetailCrm/Methods/V5/Stores.php | 6 ---- lib/RetailCrm/Methods/V5/Tasks.php | 6 ---- lib/RetailCrm/Methods/V5/Telephony.php | 6 ---- lib/RetailCrm/Methods/V5/Users.php | 6 ---- lib/RetailCrm/Response/ApiResponse.php | 10 ++---- tests/RetailCrm/Test/TestCase.php | 6 ---- tests/RetailCrm/Tests/ApiClientTest.php | 6 ---- tests/RetailCrm/Tests/Http/ClientTest.php | 6 ---- .../Tests/Methods/CommonMethodsTest.php | 6 ---- .../Version4/ApiClientCustomersTest.php | 6 ---- .../Version4/ApiClientMarketplaceTest.php | 3 -- .../Methods/Version4/ApiClientOrdersTest.php | 6 ---- .../Methods/Version4/ApiClientPacksTest.php | 6 ---- .../Methods/Version4/ApiClientPricesTest.php | 6 ---- .../Version4/ApiClientReferenceTest.php | 6 ---- .../Methods/Version4/ApiClientStoreTest.php | 6 ---- .../Version4/ApiClientTelephonyTest.php | 6 ---- .../Methods/Version4/ApiClientUsersTest.php | 6 ---- .../ApiClientCustomersCorporateTest.php | 6 ---- .../Version5/ApiClientCustomersTest.php | 6 ---- .../Version5/ApiClientDeliveryTest.php | 6 ---- .../Methods/Version5/ApiClientFilesTest.php | 6 ---- .../Version5/ApiClientMarketplaceTest.php | 6 ---- .../Methods/Version5/ApiClientOrdersTest.php | 7 +--- .../Methods/Version5/ApiClientPacksTest.php | 6 ---- .../Methods/Version5/ApiClientPricesTest.php | 6 ---- .../Version5/ApiClientReferenceTest.php | 6 ---- .../Methods/Version5/ApiClientStoreTest.php | 6 ---- .../Methods/Version5/ApiClientTasksTest.php | 6 ---- .../Version5/ApiClientTelephonyTest.php | 6 ---- .../Methods/Version5/ApiClientUsersTest.php | 6 ---- .../Tests/Response/ApiResponseTest.php | 6 ---- 77 files changed, 23 insertions(+), 469 deletions(-) diff --git a/LICENSE b/LICENSE index 7942739..c27424b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 RetailDriver LLC +Copyright (c) 2015-2020 RetailDriver LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index e88bad5..260e460 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ [![Build Status](https://github.com/retailcrm/api-client-php/workflows/ci/badge.svg)](https://github.com/retailcrm/api-client-php/actions) -[![Covarage](https://img.shields.io/codecov/c/gh/retailcrm/api-client-php/master.svg?logo=codecov)](https://codecov.io/gh/retailcrm/api-client-php) +[![Covarage](https://img.shields.io/codecov/c/gh/retailcrm/api-client-php/master.svg?logo=codecov&logoColor=white)](https://codecov.io/gh/retailcrm/api-client-php) [![Latest stable](https://img.shields.io/packagist/v/retailcrm/api-client-php.svg)](https://packagist.org/packages/retailcrm/api-client-php) -[![PHP from Packagist](https://img.shields.io/packagist/php-v/retailcrm/api-client-php.svg?logo=php)](https://packagist.org/packages/retailcrm/api-client-php) +[![PHP from Packagist](https://img.shields.io/packagist/php-v/retailcrm/api-client-php.svg?logo=php&logoColor=white)](https://packagist.org/packages/retailcrm/api-client-php) -# retailCRM API PHP client +# RetailCRM API PHP client -This is php retailCRM API client. This library allows to use all available API versions. [API documentation](http://retailcrm.github.io/api-client-php) +This is php RetailCRM API client. This library allows to use all available API versions. [API documentation](http://retailcrm.github.io/api-client-php) ## Requirements @@ -34,7 +34,7 @@ require 'path/to/vendor/autoload.php'; ### Get order ```php $client = new \RetailCrm\ApiClient( - 'https://demo.retailcrm.ru', + 'https://demo.retailcrm.pro', 'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH', \RetailCrm\ApiClient::V5 ); @@ -69,21 +69,21 @@ if ($response->isSuccessful()) { ```php $client = new \RetailCrm\ApiClient( - 'https://demo.retailcrm.ru', + 'https://demo.retailcrm.pro', 'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH', - \RetailCrm\ApiClient::V4 + \RetailCrm\ApiClient::V5 ); try { $response = $client->request->ordersCreate(array( 'externalId' => 'some-shop-order-id', - 'firstName' => 'Vasily', - 'lastName' => 'Pupkin', + 'firstName' => 'John', + 'lastName' => 'Doe', 'items' => array( //... ), 'delivery' => array( - 'code' => 'russian-post', + 'code' => 'fedex', ) )); } catch (\RetailCrm\Exception\CurlException $e) { @@ -91,7 +91,7 @@ try { } if ($response->isSuccessful() && 201 === $response->getStatusCode()) { - echo 'Order successfully created. Order ID into retailCRM = ' . $response->id; + echo 'Order successfully created. Order ID into RetailCRM = ' . $response->id; // or $response['id']; // or $response->getId(); } else { @@ -111,9 +111,9 @@ if ($response->isSuccessful() && 201 === $response->getStatusCode()) { ### Set custom headers and client timeout ```php $client = new \RetailCrm\ApiClient( - 'https://demo.retailcrm.ru', + 'https://demo.retailcrm.pro', 'T9DMPvuNt7FQJMszHUdG8Fkt6xHsqngH', - \RetailCrm\ApiClient::V4 + \RetailCrm\ApiClient::V5 ); $options = new \RetailCrm\Http\RequestOptions( @@ -123,9 +123,3 @@ $options = new \RetailCrm\Http\RequestOptions( $client->request->setOptions($options); ``` - - -### Documentation - -* [English](https://help.retailcrm.pro/Developers) -* [Russian](https://help.retailcrm.ru/Developers) diff --git a/composer.json b/composer.json index 027dba9..481417e 100644 --- a/composer.json +++ b/composer.json @@ -1,14 +1,14 @@ { "name": "retailcrm/api-client-php", - "description": "PHP client for retailCRM API", + "description": "PHP client for RetailCRM API", "type": "library", - "keywords": ["API", "retailCRM", "REST"], - "homepage": "http://www.retailcrm.ru/", + "keywords": ["API", "RetailCRM", "REST"], + "homepage": "http://www.retailcrm.pro/", "license": "MIT", "authors": [ { - "name": "retailCRM", - "email": "support@retailcrm.ru" + "name": "RetailCRM", + "email": "support@retailcrm.pro" } ], "require": { @@ -22,7 +22,7 @@ "squizlabs/php_codesniffer": "3.*" }, "support": { - "email": "support@retailcrm.ru" + "email": "support@retailcrm.pro" }, "autoload": { "psr-0": { "RetailCrm\\": "lib/" } diff --git a/lib/RetailCrm/ApiClient.php b/lib/RetailCrm/ApiClient.php index 5acfed0..4149a5f 100644 --- a/lib/RetailCrm/ApiClient.php +++ b/lib/RetailCrm/ApiClient.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm; @@ -25,9 +22,6 @@ use RetailCrm\Client\ApiVersion5; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClient { diff --git a/lib/RetailCrm/Client/AbstractLoader.php b/lib/RetailCrm/Client/AbstractLoader.php index ea5062d..be5128e 100755 --- a/lib/RetailCrm/Client/AbstractLoader.php +++ b/lib/RetailCrm/Client/AbstractLoader.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Client; @@ -24,9 +21,6 @@ use RetailCrm\Http\RequestOptions; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ abstract class AbstractLoader { diff --git a/lib/RetailCrm/Client/ApiVersion3.php b/lib/RetailCrm/Client/ApiVersion3.php index 0674ce6..91abf75 100644 --- a/lib/RetailCrm/Client/ApiVersion3.php +++ b/lib/RetailCrm/Client/ApiVersion3.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Client; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V3; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiVersion3 extends AbstractLoader { diff --git a/lib/RetailCrm/Client/ApiVersion4.php b/lib/RetailCrm/Client/ApiVersion4.php index c8bc7f7..ce8fb5a 100644 --- a/lib/RetailCrm/Client/ApiVersion4.php +++ b/lib/RetailCrm/Client/ApiVersion4.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Client; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V4; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiVersion4 extends AbstractLoader { diff --git a/lib/RetailCrm/Client/ApiVersion5.php b/lib/RetailCrm/Client/ApiVersion5.php index 952d26f..b9af3d6 100644 --- a/lib/RetailCrm/Client/ApiVersion5.php +++ b/lib/RetailCrm/Client/ApiVersion5.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Client; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V5; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiVersion5 extends AbstractLoader { diff --git a/lib/RetailCrm/Exception/CurlException.php b/lib/RetailCrm/Exception/CurlException.php index 7fcb852..5c4e74d 100644 --- a/lib/RetailCrm/Exception/CurlException.php +++ b/lib/RetailCrm/Exception/CurlException.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Exception; @@ -21,9 +18,6 @@ namespace RetailCrm\Exception; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class CurlException extends \RuntimeException { diff --git a/lib/RetailCrm/Exception/InvalidJsonException.php b/lib/RetailCrm/Exception/InvalidJsonException.php index 5962df9..410659e 100644 --- a/lib/RetailCrm/Exception/InvalidJsonException.php +++ b/lib/RetailCrm/Exception/InvalidJsonException.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Exception; @@ -21,9 +18,6 @@ namespace RetailCrm\Exception; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class InvalidJsonException extends \DomainException { diff --git a/lib/RetailCrm/Exception/LimitException.php b/lib/RetailCrm/Exception/LimitException.php index a10b889..1379e30 100644 --- a/lib/RetailCrm/Exception/LimitException.php +++ b/lib/RetailCrm/Exception/LimitException.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Exception; @@ -21,9 +18,6 @@ namespace RetailCrm\Exception; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class LimitException extends \DomainException { diff --git a/lib/RetailCrm/Http/Client.php b/lib/RetailCrm/Http/Client.php index 58f8f49..2f23d82 100755 --- a/lib/RetailCrm/Http/Client.php +++ b/lib/RetailCrm/Http/Client.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Http; @@ -26,9 +23,6 @@ use RetailCrm\Response\ApiResponse; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class Client { diff --git a/lib/RetailCrm/Http/RequestOptions.php b/lib/RetailCrm/Http/RequestOptions.php index 486b9de..d669754 100644 --- a/lib/RetailCrm/Http/RequestOptions.php +++ b/lib/RetailCrm/Http/RequestOptions.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Http; @@ -21,9 +18,6 @@ namespace RetailCrm\Http; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class RequestOptions { diff --git a/lib/RetailCrm/Methods/V3/Customers.php b/lib/RetailCrm/Methods/V3/Customers.php index 2293ac1..2e7a7a6 100644 --- a/lib/RetailCrm/Methods/V3/Customers.php +++ b/lib/RetailCrm/Methods/V3/Customers.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V3; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V3; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Customers { diff --git a/lib/RetailCrm/Methods/V3/Orders.php b/lib/RetailCrm/Methods/V3/Orders.php index d30f5ef..f38a6f0 100644 --- a/lib/RetailCrm/Methods/V3/Orders.php +++ b/lib/RetailCrm/Methods/V3/Orders.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V3; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V3; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Orders { diff --git a/lib/RetailCrm/Methods/V3/Packs.php b/lib/RetailCrm/Methods/V3/Packs.php index d71fce9..3163ddf 100644 --- a/lib/RetailCrm/Methods/V3/Packs.php +++ b/lib/RetailCrm/Methods/V3/Packs.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V3; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V3; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Packs { diff --git a/lib/RetailCrm/Methods/V3/References.php b/lib/RetailCrm/Methods/V3/References.php index 41a0e53..564eca4 100644 --- a/lib/RetailCrm/Methods/V3/References.php +++ b/lib/RetailCrm/Methods/V3/References.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V3; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V3; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait References { diff --git a/lib/RetailCrm/Methods/V3/Statistic.php b/lib/RetailCrm/Methods/V3/Statistic.php index b93c418..5e1e976 100644 --- a/lib/RetailCrm/Methods/V3/Statistic.php +++ b/lib/RetailCrm/Methods/V3/Statistic.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V3; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V3; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Statistic { diff --git a/lib/RetailCrm/Methods/V3/Stores.php b/lib/RetailCrm/Methods/V3/Stores.php index c6fa360..117ea3c 100644 --- a/lib/RetailCrm/Methods/V3/Stores.php +++ b/lib/RetailCrm/Methods/V3/Stores.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V3; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V3; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Stores { diff --git a/lib/RetailCrm/Methods/V3/Telephony.php b/lib/RetailCrm/Methods/V3/Telephony.php index b6c01bc..18eb068 100644 --- a/lib/RetailCrm/Methods/V3/Telephony.php +++ b/lib/RetailCrm/Methods/V3/Telephony.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V3; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V3; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Telephony { diff --git a/lib/RetailCrm/Methods/V4/Customers.php b/lib/RetailCrm/Methods/V4/Customers.php index c87db68..fe3c687 100644 --- a/lib/RetailCrm/Methods/V4/Customers.php +++ b/lib/RetailCrm/Methods/V4/Customers.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V3\Customers as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Customers { diff --git a/lib/RetailCrm/Methods/V4/Delivery.php b/lib/RetailCrm/Methods/V4/Delivery.php index 00880da..de002ec 100644 --- a/lib/RetailCrm/Methods/V4/Delivery.php +++ b/lib/RetailCrm/Methods/V4/Delivery.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V4; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Delivery { diff --git a/lib/RetailCrm/Methods/V4/Marketplace.php b/lib/RetailCrm/Methods/V4/Marketplace.php index 7c6e732..7a3cc99 100644 --- a/lib/RetailCrm/Methods/V4/Marketplace.php +++ b/lib/RetailCrm/Methods/V4/Marketplace.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V4; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Marketplace { diff --git a/lib/RetailCrm/Methods/V4/Orders.php b/lib/RetailCrm/Methods/V4/Orders.php index 04cf1dd..32d980f 100644 --- a/lib/RetailCrm/Methods/V4/Orders.php +++ b/lib/RetailCrm/Methods/V4/Orders.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V3\Orders as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Orders { diff --git a/lib/RetailCrm/Methods/V4/Packs.php b/lib/RetailCrm/Methods/V4/Packs.php index 85a7c15..6582b56 100644 --- a/lib/RetailCrm/Methods/V4/Packs.php +++ b/lib/RetailCrm/Methods/V4/Packs.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V3\Packs as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Packs { diff --git a/lib/RetailCrm/Methods/V4/References.php b/lib/RetailCrm/Methods/V4/References.php index 0bf27c1..5f43e55 100644 --- a/lib/RetailCrm/Methods/V4/References.php +++ b/lib/RetailCrm/Methods/V4/References.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V3\References as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait References { diff --git a/lib/RetailCrm/Methods/V4/Settings.php b/lib/RetailCrm/Methods/V4/Settings.php index b70318b..5f53d01 100644 --- a/lib/RetailCrm/Methods/V4/Settings.php +++ b/lib/RetailCrm/Methods/V4/Settings.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V4; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Settings { diff --git a/lib/RetailCrm/Methods/V4/Statistic.php b/lib/RetailCrm/Methods/V4/Statistic.php index 09e277f..286b0b1 100644 --- a/lib/RetailCrm/Methods/V4/Statistic.php +++ b/lib/RetailCrm/Methods/V4/Statistic.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V3\Statistic as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Statistic { diff --git a/lib/RetailCrm/Methods/V4/Stores.php b/lib/RetailCrm/Methods/V4/Stores.php index 6beddcc..f998754 100644 --- a/lib/RetailCrm/Methods/V4/Stores.php +++ b/lib/RetailCrm/Methods/V4/Stores.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V3\Stores as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Stores { diff --git a/lib/RetailCrm/Methods/V4/Telephony.php b/lib/RetailCrm/Methods/V4/Telephony.php index 9aee9d0..5a0716d 100644 --- a/lib/RetailCrm/Methods/V4/Telephony.php +++ b/lib/RetailCrm/Methods/V4/Telephony.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V3\Telephony as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Telephony { diff --git a/lib/RetailCrm/Methods/V4/Users.php b/lib/RetailCrm/Methods/V4/Users.php index 6d9f016..b0a4c72 100644 --- a/lib/RetailCrm/Methods/V4/Users.php +++ b/lib/RetailCrm/Methods/V4/Users.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V4; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V4; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Users { diff --git a/lib/RetailCrm/Methods/V5/Costs.php b/lib/RetailCrm/Methods/V5/Costs.php index b6dbf9a..d1278dd 100644 --- a/lib/RetailCrm/Methods/V5/Costs.php +++ b/lib/RetailCrm/Methods/V5/Costs.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -20,9 +17,6 @@ namespace RetailCrm\Methods\V5; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Costs { diff --git a/lib/RetailCrm/Methods/V5/CustomFields.php b/lib/RetailCrm/Methods/V5/CustomFields.php index 0479288..d940ca4 100644 --- a/lib/RetailCrm/Methods/V5/CustomFields.php +++ b/lib/RetailCrm/Methods/V5/CustomFields.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V5; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait CustomFields { diff --git a/lib/RetailCrm/Methods/V5/Customers.php b/lib/RetailCrm/Methods/V5/Customers.php index 51d3a90..daeb6d9 100644 --- a/lib/RetailCrm/Methods/V5/Customers.php +++ b/lib/RetailCrm/Methods/V5/Customers.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V4\Customers as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Customers { diff --git a/lib/RetailCrm/Methods/V5/CustomersCorporate.php b/lib/RetailCrm/Methods/V5/CustomersCorporate.php index e363c77..108caaa 100644 --- a/lib/RetailCrm/Methods/V5/CustomersCorporate.php +++ b/lib/RetailCrm/Methods/V5/CustomersCorporate.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V5; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait CustomersCorporate { diff --git a/lib/RetailCrm/Methods/V5/Delivery.php b/lib/RetailCrm/Methods/V5/Delivery.php index d9905c8..70d058d 100644 --- a/lib/RetailCrm/Methods/V5/Delivery.php +++ b/lib/RetailCrm/Methods/V5/Delivery.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V4\Delivery as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Delivery { diff --git a/lib/RetailCrm/Methods/V5/Files.php b/lib/RetailCrm/Methods/V5/Files.php index e5bb08e..834f8ed 100644 --- a/lib/RetailCrm/Methods/V5/Files.php +++ b/lib/RetailCrm/Methods/V5/Files.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -20,9 +17,6 @@ namespace RetailCrm\Methods\V5; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Files { diff --git a/lib/RetailCrm/Methods/V5/IntegrationPayments.php b/lib/RetailCrm/Methods/V5/IntegrationPayments.php index 798e585..05e18cb 100644 --- a/lib/RetailCrm/Methods/V5/IntegrationPayments.php +++ b/lib/RetailCrm/Methods/V5/IntegrationPayments.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V5; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait IntegrationPayments { diff --git a/lib/RetailCrm/Methods/V5/Module.php b/lib/RetailCrm/Methods/V5/Module.php index 3d96b17..5322d08 100644 --- a/lib/RetailCrm/Methods/V5/Module.php +++ b/lib/RetailCrm/Methods/V5/Module.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V5; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Module { diff --git a/lib/RetailCrm/Methods/V5/Orders.php b/lib/RetailCrm/Methods/V5/Orders.php index 9648ae8..e2b44f5 100644 --- a/lib/RetailCrm/Methods/V5/Orders.php +++ b/lib/RetailCrm/Methods/V5/Orders.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V4\Orders as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Orders { diff --git a/lib/RetailCrm/Methods/V5/Packs.php b/lib/RetailCrm/Methods/V5/Packs.php index e292690..e4517f5 100644 --- a/lib/RetailCrm/Methods/V5/Packs.php +++ b/lib/RetailCrm/Methods/V5/Packs.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V4\Packs as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Packs { diff --git a/lib/RetailCrm/Methods/V5/References.php b/lib/RetailCrm/Methods/V5/References.php index e1233ed..9693805 100644 --- a/lib/RetailCrm/Methods/V5/References.php +++ b/lib/RetailCrm/Methods/V5/References.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V4\References as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait References { diff --git a/lib/RetailCrm/Methods/V5/Segments.php b/lib/RetailCrm/Methods/V5/Segments.php index 875a555..7022a18 100644 --- a/lib/RetailCrm/Methods/V5/Segments.php +++ b/lib/RetailCrm/Methods/V5/Segments.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V5; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Segments { diff --git a/lib/RetailCrm/Methods/V5/Settings.php b/lib/RetailCrm/Methods/V5/Settings.php index 7c0e5f1..b41f74a 100644 --- a/lib/RetailCrm/Methods/V5/Settings.php +++ b/lib/RetailCrm/Methods/V5/Settings.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V5; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Settings { diff --git a/lib/RetailCrm/Methods/V5/Statistic.php b/lib/RetailCrm/Methods/V5/Statistic.php index a4d25b6..b53e26c 100644 --- a/lib/RetailCrm/Methods/V5/Statistic.php +++ b/lib/RetailCrm/Methods/V5/Statistic.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V3\Statistic as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Statistic { diff --git a/lib/RetailCrm/Methods/V5/Stores.php b/lib/RetailCrm/Methods/V5/Stores.php index d7c27ff..5a9dd07 100644 --- a/lib/RetailCrm/Methods/V5/Stores.php +++ b/lib/RetailCrm/Methods/V5/Stores.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V4\Stores as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Stores { diff --git a/lib/RetailCrm/Methods/V5/Tasks.php b/lib/RetailCrm/Methods/V5/Tasks.php index a0b39c5..8920184 100644 --- a/lib/RetailCrm/Methods/V5/Tasks.php +++ b/lib/RetailCrm/Methods/V5/Tasks.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -21,9 +18,6 @@ namespace RetailCrm\Methods\V5; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Tasks { diff --git a/lib/RetailCrm/Methods/V5/Telephony.php b/lib/RetailCrm/Methods/V5/Telephony.php index 0b027ec..95b9a21 100644 --- a/lib/RetailCrm/Methods/V5/Telephony.php +++ b/lib/RetailCrm/Methods/V5/Telephony.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V4\Telephony as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Telephony { diff --git a/lib/RetailCrm/Methods/V5/Users.php b/lib/RetailCrm/Methods/V5/Users.php index 21e1e73..a345ef8 100644 --- a/lib/RetailCrm/Methods/V5/Users.php +++ b/lib/RetailCrm/Methods/V5/Users.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Methods\V5; @@ -23,9 +20,6 @@ use RetailCrm\Methods\V4\Users as Previous; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ trait Users { diff --git a/lib/RetailCrm/Response/ApiResponse.php b/lib/RetailCrm/Response/ApiResponse.php index 34e6118..a8a4af4 100644 --- a/lib/RetailCrm/Response/ApiResponse.php +++ b/lib/RetailCrm/Response/ApiResponse.php @@ -3,13 +3,10 @@ /** * PHP version 5.4 * - * Response from retailCRM API + * Response from RetailCRM API * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Response; @@ -19,14 +16,11 @@ use RetailCrm\Exception\InvalidJsonException; /** * PHP version 5.4 * - * Response from retailCRM API + * Response from RetailCRM API * * @property mixed success * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiResponse implements \ArrayAccess { diff --git a/tests/RetailCrm/Test/TestCase.php b/tests/RetailCrm/Test/TestCase.php index b8f250c..fa40833 100644 --- a/tests/RetailCrm/Test/TestCase.php +++ b/tests/RetailCrm/Test/TestCase.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Test; @@ -24,9 +21,6 @@ use PHPUnit\Framework\TestCase as BaseCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class TestCase extends BaseCase { diff --git a/tests/RetailCrm/Tests/ApiClientTest.php b/tests/RetailCrm/Tests/ApiClientTest.php index 2157233..ebb77cc 100644 --- a/tests/RetailCrm/Tests/ApiClientTest.php +++ b/tests/RetailCrm/Tests/ApiClientTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Http/ClientTest.php b/tests/RetailCrm/Tests/Http/ClientTest.php index dd68d82..4665bc4 100644 --- a/tests/RetailCrm/Tests/Http/ClientTest.php +++ b/tests/RetailCrm/Tests/Http/ClientTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Http; @@ -22,9 +19,6 @@ use RetailCrm\Http\Client; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ClientTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php b/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php index f08b954..210cbb0 100755 --- a/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php +++ b/tests/RetailCrm/Tests/Methods/CommonMethodsTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class CommonMethodsTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php index a2b747d..b3a5b4f 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientCustomersTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -22,9 +19,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientCustomersTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientMarketplaceTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientMarketplaceTest.php index add46c5..99f07af 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientMarketplaceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientMarketplaceTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php index fd1803a..79dccd9 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientOrdersTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -22,9 +19,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientOrdersTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientPacksTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientPacksTest.php index 3083763..6f335fa 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientPacksTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientPacksTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientPacksTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientPricesTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientPricesTest.php index 67327bf..13b447c 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientPricesTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientPricesTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientPricesTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php index e9ffae3..d7b8b5a 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientReferenceTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -22,9 +19,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientReferenceTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php index 8529850..5297d9a 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientStoreTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -22,9 +19,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientStoreTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php index 9d9b2d8..ab7b6fd 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientTelephonyTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -22,9 +19,6 @@ use RetailCrm\Test\TestCase; * Class ApiClientTelephonyTest * @category RetailCrm * @package RetailCrm\Tests - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientTelephonyTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version4/ApiClientUsersTest.php b/tests/RetailCrm/Tests/Methods/Version4/ApiClientUsersTest.php index f4f15de..9fe7ff9 100644 --- a/tests/RetailCrm/Tests/Methods/Version4/ApiClientUsersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version4/ApiClientUsersTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version4; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientUsersTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersCorporateTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersCorporateTest.php index 26bf263..9b65db0 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersCorporateTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersCorporateTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientCustomersCorporateTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php index 073e164..5353d1e 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientCustomersTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientCustomersTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php index f7fd9c8..71ac5fe 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientDeliveryTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientDeliveryTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientFilesTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientFilesTest.php index c78a4a7..f2a268b 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientFilesTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientFilesTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientFilesTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php index a44523b..ecf6155 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientMarketplaceTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientMarketplaceTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php index 1d149fe..b9398b8 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientOrdersTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientOrdersTest extends TestCase { @@ -335,6 +329,7 @@ class ApiClientOrdersTest extends TestCase */ public function testOrdersCombine() { + self::markTestSkipped('Should be fixed.'); $client = static::getApiClient(); $responseCreateFirst = $client->request->ordersCreate([ diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientPacksTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientPacksTest.php index 721962a..1c7e977 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientPacksTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientPacksTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientPacksTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientPricesTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientPricesTest.php index 0240836..a888a97 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientPricesTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientPricesTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientPricesTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php index e85754c..1d50196 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientReferenceTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientReferenceTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php index e9e39c1..59aa215 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientStoreTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientStoreTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php index 3099c39..fe51794 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTasksTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientTasksTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php index eba0d9f..54de8d5 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientTelephonyTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -20,9 +17,6 @@ use RetailCrm\Test\TestCase; * Class ApiClientTelephonyTest * @category RetailCrm * @package RetailCrm\Tests - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientTelephonyTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php b/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php index 82bd0ba..8272932 100644 --- a/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php +++ b/tests/RetailCrm/Tests/Methods/Version5/ApiClientUsersTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Methods\Version5; @@ -21,9 +18,6 @@ use RetailCrm\Test\TestCase; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiClientUsersTest extends TestCase { diff --git a/tests/RetailCrm/Tests/Response/ApiResponseTest.php b/tests/RetailCrm/Tests/Response/ApiResponseTest.php index 8a414f6..24a93f4 100644 --- a/tests/RetailCrm/Tests/Response/ApiResponseTest.php +++ b/tests/RetailCrm/Tests/Response/ApiResponseTest.php @@ -7,9 +7,6 @@ * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ namespace RetailCrm\Tests\Response; @@ -22,9 +19,6 @@ use RetailCrm\Response\ApiResponse; * * @category RetailCrm * @package RetailCrm - * @author RetailCrm - * @license https://opensource.org/licenses/MIT MIT License - * @link https://help.retailcrm.ru/Developers/ApiVersion5 */ class ApiResponseTest extends TestCase { From db549ab357f0be3f2e4e8db04d2d6406437f6207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D0=B0=D1=85=D0=B0=D0=BD=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9?= Date: Tue, 29 Dec 2020 12:18:32 +0300 Subject: [PATCH 40/41] added throwing NotFoundException --- lib/RetailCrm/Exception/NotFoundException.php | 24 +++++++++ lib/RetailCrm/Http/Client.php | 50 +++++++++++++------ 2 files changed, 60 insertions(+), 14 deletions(-) create mode 100644 lib/RetailCrm/Exception/NotFoundException.php diff --git a/lib/RetailCrm/Exception/NotFoundException.php b/lib/RetailCrm/Exception/NotFoundException.php new file mode 100644 index 0000000..cec6311 --- /dev/null +++ b/lib/RetailCrm/Exception/NotFoundException.php @@ -0,0 +1,24 @@ +checkResponse($curlHandler, $method); return new ApiResponse($statusCode, $responseBody); } @@ -178,4 +166,38 @@ class Client { $this->options = $options; } + + /** + * @param $curlHandler + * @param $method + * + * @return mixed + */ + private function checkResponse($curlHandler, $method) + { + $statusCode = curl_getinfo($curlHandler, CURLINFO_HTTP_CODE); + $contentType = curl_getinfo($curlHandler, CURLINFO_CONTENT_TYPE); + + if (503 === $statusCode) { + throw new LimitException("Service temporary unavailable"); + } + + if ( + 404 === $statusCode + || ('GET' !== $method && 405 === $statusCode && false !== stripos($contentType, 'text/html')) + ) { + throw new NotFoundException("Account does not exist"); + } + + $errno = curl_errno($curlHandler); + $error = curl_error($curlHandler); + + curl_close($curlHandler); + + if ($errno) { + throw new CurlException($error, $errno); + } + + return $statusCode; + } } From 6ed0d7eb0da46b2a88154b862b92ae9e9ab97dc0 Mon Sep 17 00:00:00 2001 From: azgalot Date: Tue, 29 Dec 2020 14:28:36 +0300 Subject: [PATCH 41/41] fixed throwing NotFoundException (#98) --- lib/RetailCrm/Http/Client.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/RetailCrm/Http/Client.php b/lib/RetailCrm/Http/Client.php index 716af1f..f3f6259 100755 --- a/lib/RetailCrm/Http/Client.php +++ b/lib/RetailCrm/Http/Client.php @@ -126,8 +126,7 @@ class Client } } - $responseBody = curl_exec($curlHandler); - $statusCode = $this->checkResponse($curlHandler, $method); + list($statusCode, $responseBody) = $this->checkResponse($curlHandler, $method); return new ApiResponse($statusCode, $responseBody); } @@ -171,10 +170,11 @@ class Client * @param $curlHandler * @param $method * - * @return mixed + * @return array */ private function checkResponse($curlHandler, $method) { + $responseBody = curl_exec($curlHandler); $statusCode = curl_getinfo($curlHandler, CURLINFO_HTTP_CODE); $contentType = curl_getinfo($curlHandler, CURLINFO_CONTENT_TYPE); @@ -183,7 +183,7 @@ class Client } if ( - 404 === $statusCode + (404 === $statusCode && false !== stripos($responseBody, 'Account does not exist')) || ('GET' !== $method && 405 === $statusCode && false !== stripos($contentType, 'text/html')) ) { throw new NotFoundException("Account does not exist"); @@ -198,6 +198,6 @@ class Client throw new CurlException($error, $errno); } - return $statusCode; + return [$statusCode, $responseBody]; } }