def create_template_with_http_info(template_document, template_name, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: PDFApi.create_template ...'
      end
      # verify the required parameter 'template_document' is set
      if @api_client.config.client_side_validation && template_document.nil?
        fail ArgumentError, "Missing the required parameter 'template_document' when calling PDFApi.create_template"
      end
      # verify the required parameter 'template_name' is set
      if @api_client.config.client_side_validation && template_name.nil?
        fail ArgumentError, "Missing the required parameter 'template_name' when calling PDFApi.create_template"
      end
      # resource path
      local_var_path = '/templates'

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

      # form parameters
      form_params = {}
      form_params['template[document]'] = template_document
      form_params['template[name]'] = template_name

      # http body (model)
      post_body = nil
      auth_names = ['api_token_basic']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'PendingTemplate')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: PDFApi#create_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def create_template_with_http_info(template_document, template_name, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: PDFApi.create_template ...'
      end
      # verify the required parameter 'template_document' is set
      if @api_client.config.client_side_validation && template_document.nil?
        fail ArgumentError, "Missing the required parameter 'template_document' when calling PDFApi.create_template"
      end
      # verify the required parameter 'template_name' is set
      if @api_client.config.client_side_validation && template_name.nil?
        fail ArgumentError, "Missing the required parameter 'template_name' when calling PDFApi.create_template"
      end
      # resource path
      local_var_path = '/templates'

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

      # form parameters
      form_params = {}
      form_params['template[document]'] = template_document
      form_params['template[name]'] = template_name

      # http body (model)
      post_body = nil
      auth_names = ['api_token_basic']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'PendingTemplate')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: PDFApi#create_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
Upload a new PDF template with a file upload
 @param template_document
 @param template_name
 @param [Hash] opts the optional parameters
 @return [Array<(PendingTemplate, Fixnum, Hash)>] PendingTemplate data, response status code and response headers