Statistics
extends AbstractApiResourceGroup
in package
Class Statistics
Tags
Table of Contents
Methods
- update() : SuccessResponse
- Makes GET "/api/v5/statistic/update" request.
Methods
update()
Makes GET "/api/v5/statistic/update" request.
public
update() : SuccessResponse
Example:
use RetailCrm\Api\Factory\SimpleClientFactory;
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
try {
$response = $client->statistics->update();
} catch (ApiExceptionInterface $exception) {
echo sprintf(
'Error from RetailCRM API (status code: %d): %s',
$exception->getStatusCode(),
$exception->getMessage()
);
if (count($exception->getErrorResponse()->errors) > 0) {
echo PHP_EOL . 'Errors: ' . implode(', ', $exception->getErrorResponse()->errors);
}
}