public function createBackupFTPAccess($domain, $ipBlock)
{
// $domain = (string)$domain;
// $ipBlock= (string)$ipBlock;
if (!$domain) {
throw new BadMethodCallException('Parameter $domain is missing.');
}
if (!$ipBlock) {
throw new BadMethodCallException('Parameter $ipBlock is missing.');
}
$payload = array('ftp' => 1 == 1, 'ipBlock' => $ipBlock, 'nfs' => 1 == 0, 'cifs' => 1 == 0);
try {
$r = $this->post('dedicated/server/' . $domain . '/features/backupFTP/access', array('Content-Type' => 'application/json;charset=UTF-8'), json_encode($payload))->send();
} catch (\Exception $e) {
throw new ServerException($e->getMessage(), $e->getCode(), $e);
}
return $r->getBody(true);
}