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

111 lines
2.5 KiB
PHP
Raw Normal View History

<?php
/**
* PHP version 5.4
*
2017-06-22 16:42:42 +03:00
* Stores
*
* @category RetailCrm
* @package RetailCrm
*/
namespace RetailCrm\Methods\V5;
use RetailCrm\Methods\V4\Stores as Previous;
/**
* PHP version 5.4
*
2017-06-22 16:42:42 +03:00
* Stores class
*
* @category RetailCrm
* @package RetailCrm
*/
trait Stores
{
use Previous;
2017-11-17 15:02:54 +03:00
/**
* Get store settings
*
* @param string $code get settings code
*
* @return void
2017-11-17 15:02:54 +03:00
*
*/
public function storeSettingsGet($code)
{
throw new \InvalidArgumentException("This method is not available, setting code: $code is unnecessary");
2017-11-17 15:02:54 +03:00
}
/**
* Get products groups
*
* @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
2018-02-21 09:42:10 +03:00
*
* @return \RetailCrm\Response\ApiResponse
*/
public function storeProductsGroups(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/product-groups',
"GET",
$parameters
);
}
2018-02-21 09:42:10 +03:00
/**
* 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
);
}
}