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 + ); + } }