public function isAvailable($email, $entity = false)
    {
        $this->resetRestClient();

        $this->restClient->getConfig()->setPath(
            'request.options/headers/php-auth-user',
            $this->login
        );

        $this->restClient->getConfig()->setPath(
            'request.options/headers/php-auth-pw',
            $this->password
        );

        $parameters = array(
            'userEmail' => $email,
            'entity' => $entity ?: $this->entity
        );
        $command = $this->restClient->getCommand(
            'IsAvailable',
            $parameters
        );

        $result = $this->executeRest($command, $parameters);

        return $result['is_available'];
    }