1
0
mirror of synced 2024-11-30 01:06:07 +03:00
api-client-php/lib/RetailCrm/Methods/V4/Customers.php

64 lines
1.4 KiB
PHP
Raw Normal View History

<?php
/**
* PHP version 5.4
*
2017-06-22 16:42:42 +03:00
* Customers
*
* @category RetailCrm
* @package RetailCrm
* @author RetailCrm <integration@retailcrm.ru>
* @license https://opensource.org/licenses/MIT MIT License
2019-08-30 14:10:52 +03:00
* @link https://help.retailcrm.ru/Developers/ApiVersion5
*/
namespace RetailCrm\Methods\V4;
use RetailCrm\Methods\V3\Customers as Previous;
/**
* PHP version 5.4
*
2017-06-22 16:42:42 +03:00
* Customers class
*
* @category RetailCrm
* @package RetailCrm
* @author RetailCrm <integration@retailcrm.ru>
* @license https://opensource.org/licenses/MIT MIT License
2019-08-30 14:10:52 +03:00
* @link https://help.retailcrm.ru/Developers/ApiVersion5
*/
trait Customers
{
use Previous;
/**
* Get customers history
* @param array $filter
* @param null $page
* @param null $limit
*
* @return \RetailCrm\Response\ApiResponse
*/
public function customersHistory(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/history',
"GET",
$parameters
);
}
}