def METHOD_NAME(self) -> int:
    try:
        api_url = current_app.config["FRESH_DESK_API_URL"]
        if not api_url:
            raise NotImplementedError
        if current_app.config["FRESH_DESK_ENABLED"] is True:
            # The API and field definitions are defined here:
            # https://developer.zendesk.com/rest_api/docs/support/tickets
            response = requests.post(
                urljoin(api_url, "/api/v2/tickets"),
                json=self._generate_ticket(),
                auth=HTTPBasicAuth(current_app.config["FRESH_DESK_API_KEY"], "x"),
                timeout=5,
            )
            response.raise_for_status()
            if response.status_code == 201:
                current_app.logger.info(
                    f"Created Freshdesk ticket for service: {self.contact.service_id} type: {self.contact.support_type}"
                )
            return response.status_code
        else:
            return 201
    except requests.RequestException as e:
        current_app.logger.error(f"Failed to create Freshdesk ticket: {e}")
        self.email_freshdesk_ticket(self._generate_ticket())
        return 201