1
0
Fork 0
mirror of synced 2025-04-13 14:10:58 +00:00
This commit is contained in:
Alex Lushpai 2015-06-15 13:42:30 +00:00
commit 113f3ff136

View file

@ -520,6 +520,16 @@ class ApiClient
{
return $this->client->makeRequest('/reference/sites', Client::METHOD_GET);
}
/**
* Returns stores list
*
* @return ApiResponse
*/
public function storesList()
{
return $this->client->makeRequest('/reference/stores', Client::METHOD_GET);
}
/**
* Edit deliveryService
@ -710,6 +720,31 @@ class ApiClient
);
}
/**
* Edit store
*
* @param array $data site data
* @return ApiResponse
*/
public function storesEdit(array $data)
{
if (!isset($data['code'])) {
throw new \InvalidArgumentException('Data must contain "code" parameter.');
}
if (!isset($data['name'])) {
throw new \InvalidArgumentException('Data must contain "name" parameter.');
}
return $this->client->makeRequest(
'/reference/stores/' . $data['code'] . '/edit',
Client::METHOD_POST,
array(
'site' => json_encode($data)
)
);
}
/**
* Update CRM basic statistic
*