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

Products properties

This commit is contained in:
Alex Lushpai 2018-02-21 09:42:10 +03:00
parent 251c21300a
commit d1a73d7acd
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
PHP-client for [retailCRM API](http://www.retailcrm.pro/docs/Developers/ApiVersion5).

View File

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