def METHOD_NAME(self):
    payload = self._get("/domain/list")
    domains = payload["response"]["domains"]
    for record in domains:
        if record["domainname"] == self.domain:
            # Domain records do not have any id.
            # Since domain_id cannot be None, use domain name as id instead.
            self.domain_id = record["domainname"]
            break
    else:
        raise AuthenticationError("No domain found")