public function update_template_version($name, $subject, $template_id, $version_id, $html, $text=null) {
        $endpoint = "templates/" . $template_id . "/versions/" . $version_id;

        $payload = array(
            "name" => $name,
            "subject" => $subject,
            "html" => $html
        );

        // set optional text
        if ($text) {
            $payload["text"] = $text;
        }

        if ($this->DEBUG) {
            $this->log_message(
                sprintf(
                    "updating template\n ID:%s\nVERSION:%s\n with name %s and subject %s\n",
                    $template_id,
                    $version_id,
                    $name,
                    $subject
                )
            );
        }

        return $this->api_request($endpoint, self::HTTP_PUT, $payload);
    }