1
0
mirror of synced 2024-11-23 13:56:06 +03:00
api-client-php/lib/RetailCrm/Methods/V5/Segments.php
Alex Lushpai a18767bddc Update to API version 5 (#40)
* combine methods for orders & customer
* update status method for users
* custom fields|dictionaries
* task methods
* segments
* product groups list methods,
* orders payments
* multi-version
* customers notes methods
2017-06-22 00:55:08 +03:00

60 lines
1.3 KiB
PHP

<?php
/**
* PHP version 5.4
*
* Segments
*
* @category RetailCrm
* @package RetailCrm
* @author RetailCrm <integration@retailcrm.ru>
* @license https://opensource.org/licenses/MIT MIT License
* @link http://www.retailcrm.ru/docs/Developers/ApiVersion5
*/
namespace RetailCrm\Methods\V5;
/**
* PHP version 5.4
*
* Segments class
*
* @category RetailCrm
* @package RetailCrm
* @author RetailCrm <integration@retailcrm.ru>
* @license https://opensource.org/licenses/MIT MIT License
* @link http://www.retailcrm.ru/docs/Developers/ApiVersion5
*/
trait Segments
{
/**
* Get segments list
*
* @param array $filter
* @param null $limit
* @param null $page
*
* @return \RetailCrm\Response\ApiResponse
*/
public function segmentsList(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(
'/segments',
"GET",
$parameters
);
}
}