1
0
mirror of synced 2024-11-28 00:06:06 +03:00

Merge pull request #58 from gwinn/master

Products properties method
This commit is contained in:
Alex Lushpai 2018-02-21 10:06:36 +03:00 committed by GitHub
commit 4d59f37980
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 0 deletions

View File

@ -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 # retailCRM API PHP client
PHP-client for [retailCRM API](http://www.retailcrm.pro/docs/Developers/ApiVersion5). PHP-client for [retailCRM API](http://www.retailcrm.pro/docs/Developers/ApiVersion5).

View File

@ -54,6 +54,7 @@ trait Stores
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* @throws \RetailCrm\Exception\CurlException * @throws \RetailCrm\Exception\CurlException
* @throws \RetailCrm\Exception\InvalidJsonException * @throws \RetailCrm\Exception\InvalidJsonException
*
* @return \RetailCrm\Response\ApiResponse * @return \RetailCrm\Response\ApiResponse
*/ */
public function storeProductsGroups(array $filter = [], $page = null, $limit = null) public function storeProductsGroups(array $filter = [], $page = null, $limit = null)
@ -77,4 +78,39 @@ trait Stores
$parameters $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
);
}
} }