Settings
extends AbstractApiResourceGroup
in package
Class Settings
Tags
Table of Contents
Methods
- get() : SettingsResponse
- Makes GET "/api/v5/settings" request.
Methods
get()
Makes GET "/api/v5/settings" request.
public
get() : SettingsResponse
Example:
use RetailCrm\Api\Factory\SimpleClientFactory;
use RetailCrm\Api\Interfaces\ApiExceptionInterface;
$client = SimpleClientFactory::createClient('https://test.retailcrm.pro', 'apiKey');
try {
$response = $client->settings->get();
} 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);
}
return;
}
echo 'System settings: ' . print_r($response->settings, true);