protected function getAccountId($account)
    {
        if($account instanceof Account){
            if(!empty($account->id)){
                $id = $account->id;
            } elseif(!empty($account->domain)){
                $id = $this->api->searchAccountId($account->domain);
            } else {
                throw new YouHostingException("You need to provide either an account ID (recommended) or account domain to search for");
            }
        } elseif(is_numeric($account)){
            $id = $account;
        } else {
            $id = $this->api->searchAccountId($account);
        }

        return (int)$id;
    }