/// <summary>
        /// Generate quotes document The &#x60;document&#x60; call generates a quote document and returns the generated document URL. You can directly access the generated quote file through the returned URL.  The &#x60;document&#x60; call should be only used from Zuora Quotes.   ## File Size Limitation  The maximum export file size is 2047MB. If you have large data requests that go over this limit, you will get the following 403 HTTP response code from Zuora: &#x60;security:max-object-size&gt;2047MB&lt;/security:max-object-size&gt;&#x60;  Submit a request at [Zuora Global Support](http://support.zuora.com/) if you require additional assistance.  We can work with you to determine if large file optimization is an option for you.
        /// </summary>
        /// <param name="request"></param>
        /// <returns>POSTQuoteDocResponseType</returns>
        public POSTQuoteDocResponseType POSTQuoteDoc(POSTQuoteDocType request)
        {
            // verify the required parameter 'request' is set
            if (request == null)
            {
                throw new ApiException(400, "Missing required parameter 'request' when calling POSTQuoteDoc");
            }


            var path = "/quotes/document";

            path = path.Replace("{format}", "json");

            var    queryParams  = new Dictionary <String, String>();
            var    headerParams = new Dictionary <String, String>();
            var    formParams   = new Dictionary <String, String>();
            var    fileParams   = new Dictionary <String, FileParameter>();
            String postBody     = null;

            postBody = ApiClient.Serialize(request);                                     // http body (model) parameter

            // authentication setting, if any
            String[] authSettings = new String[] {  };

            // make the HTTP request
            IRestResponse response = (IRestResponse)ApiClient.CallApi(path, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, authSettings);

            if (((int)response.StatusCode) >= 400)
            {
                throw new ApiException((int)response.StatusCode, "Error calling POSTQuoteDoc: " + response.Content, response.Content);
            }
            else if (((int)response.StatusCode) == 0)
            {
                throw new ApiException((int)response.StatusCode, "Error calling POSTQuoteDoc: " + response.ErrorMessage, response.ErrorMessage);
            }

            return((POSTQuoteDocResponseType)ApiClient.Deserialize(response.Content, typeof(POSTQuoteDocResponseType), response.Headers));
        }
        /// <summary>
        /// Generate quotes document The &#x60;document&#x60; call generates a quote document and returns the generated document URL. You can directly access the generated quote file through the returned URL.  The &#x60;document&#x60; call should be only used from Zuora Quotes.   ## File Size Limitation  The maximum export file size is 2047MB. If you have large data requests that go over this limit, you will get the following 403 HTTP response code from Zuora: &#x60;security:max-object-size&gt;2047MB&lt;/security:max-object-size&gt;&#x60;  Submit a request at [Zuora Global Support](http://support.zuora.com/) if you require additional assistance.  We can work with you to determine if large file optimization is an option for you.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="request"></param>
        /// <returns>Task of ApiResponse (POSTQuoteDocResponseType)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <POSTQuoteDocResponseType> > POSTQuoteDocAsyncWithHttpInfo(POSTQuoteDocType request)
        {
            // verify the required parameter 'request' is set
            if (request == null)
            {
                throw new ApiException(400, "Missing required parameter 'request' when calling QuotesDocumentApi->POSTQuoteDoc");
            }

            var    localVarPath         = "/quotes/document";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new Dictionary <String, String>();
            var    localVarHeaderParams = new Dictionary <String, String>(Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json"
            };
            String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            // set "format" to json by default
            // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
            localVarPathParams.Add("format", "json");
            if (request != null && request.GetType() != typeof(byte[]))
            {
                localVarPostBody = Configuration.ApiClient.Serialize(request); // http body (model) parameter
            }
            else
            {
                localVarPostBody = request; // byte array
            }


            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                       Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                       localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("POSTQuoteDoc", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <POSTQuoteDocResponseType>(localVarStatusCode,
                                                              localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                                                              (POSTQuoteDocResponseType)Configuration.ApiClient.Deserialize(localVarResponse, typeof(POSTQuoteDocResponseType))));
        }
        /// <summary>
        /// Generate quotes document The &#x60;document&#x60; call generates a quote document and returns the generated document URL. You can directly access the generated quote file through the returned URL.  The &#x60;document&#x60; call should be only used from Zuora Quotes.   ## File Size Limitation  The maximum export file size is 2047MB. If you have large data requests that go over this limit, you will get the following 403 HTTP response code from Zuora: &#x60;security:max-object-size&gt;2047MB&lt;/security:max-object-size&gt;&#x60;  Submit a request at [Zuora Global Support](http://support.zuora.com/) if you require additional assistance.  We can work with you to determine if large file optimization is an option for you.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="request"></param>
        /// <returns>Task of POSTQuoteDocResponseType</returns>
        public async System.Threading.Tasks.Task <POSTQuoteDocResponseType> POSTQuoteDocAsync(POSTQuoteDocType request)
        {
            ApiResponse <POSTQuoteDocResponseType> localVarResponse = await POSTQuoteDocAsyncWithHttpInfo(request);

            return(localVarResponse.Data);
        }
        /// <summary>
        /// Generate quotes document The &#x60;document&#x60; call generates a quote document and returns the generated document URL. You can directly access the generated quote file through the returned URL.  The &#x60;document&#x60; call should be only used from Zuora Quotes.   ## File Size Limitation  The maximum export file size is 2047MB. If you have large data requests that go over this limit, you will get the following 403 HTTP response code from Zuora: &#x60;security:max-object-size&gt;2047MB&lt;/security:max-object-size&gt;&#x60;  Submit a request at [Zuora Global Support](http://support.zuora.com/) if you require additional assistance.  We can work with you to determine if large file optimization is an option for you.
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="request"></param>
        /// <returns>POSTQuoteDocResponseType</returns>
        public POSTQuoteDocResponseType POSTQuoteDoc(POSTQuoteDocType request)
        {
            ApiResponse <POSTQuoteDocResponseType> localVarResponse = POSTQuoteDocWithHttpInfo(request);

            return(localVarResponse.Data);
        }