/// <summary>
        /// To test class name in snake case To test class name in snake case
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body">client model</param>
        /// <returns>Task of ApiResponse (ModelClient)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <ModelClient> > TestClassnameAsyncWithHttpInfo(ModelClient body)
        {
            // verify the required parameter 'body' is set
            if (body == null)
            {
                throw new ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname");
            }

            var localVarPath = "/fake_classname_test";

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json"
            };
            var requestParameters = new RequestParameters(Configuration, contentTypes: localVarHttpContentTypes, accepts: localVarHttpHeaderAccepts);

            requestParameters.AddBody(body);

            // authentication (api_key_query) required
            requestParameters.AddAuthKeyInQuery("api_key_query");

            // make the HTTP request
            var localVarResponse = await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                   new HttpMethod("PATCH"), requestParameters);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

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

            return(new ApiResponse <ModelClient>(localVarStatusCode,
                                                 localVarResponse.ToHeaders(),
                                                 this.Configuration.ApiClient.Deserialize <ModelClient>(localVarResponse)));
        }
Esempio n. 2
0
        /// <summary>
        /// Place an order for a pet
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body">order placed for purchasing the pet</param>
        /// <returns>Task of ApiResponse (Order)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <Order> > PlaceOrderAsyncWithHttpInfo(Order body)
        {
            // verify the required parameter 'body' is set
            if (body == null)
            {
                throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder");
            }

            var localVarPath = "./store/order";

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/xml",
                "application/json"
            };
            var requestParameters = new RequestParameters(Configuration, contentTypes: localVarHttpContentTypes, accepts: localVarHttpHeaderAccepts);

            requestParameters.AddBody(body);


            // make the HTTP request
            var localVarResponse = await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                   new HttpMethod("POST"), requestParameters);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

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

            return(new ApiResponse <Order>(localVarStatusCode,
                                           localVarResponse.ToHeaders(),
                                           this.Configuration.ApiClient.Deserialize <Order>(localVarResponse)));
        }
        /// <summary>
        /// To test special tags To test special tags
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body">client model</param>
        /// <returns>ApiResponse of ModelClient</returns>
        public ApiResponse <ModelClient> TestSpecialTagsWithHttpInfo(ModelClient body)
        {
            // verify the required parameter 'body' is set
            if (body == null)
            {
                throw new ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->TestSpecialTags");
            }

            var localVarPath = "/another-fake/dummy";

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json"
            };
            var requestParameters = new RequestParameters(Configuration, contentTypes: localVarHttpContentTypes, accepts: localVarHttpHeaderAccepts);

            requestParameters.AddBody(body); // body parameter


            // make the HTTP request
            var localVarResponse = this.Configuration.ApiClient.CallApi(localVarPath,
                                                                        new HttpMethod("PATCH"), requestParameters);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

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

            return(new ApiResponse <ModelClient>(localVarStatusCode,
                                                 localVarResponse.ToHeaders(),
                                                 this.Configuration.ApiClient.Deserialize <ModelClient>(localVarResponse)));
        }