samples/composed/client/petstore/csharp/SwaggerClientNet35/src/IO.Swagger/Api/StoreApi.cs
/// <summary>
/// Delete purchase order by ID For valid response try integer IDs with positive integer value.\\ \\ Negative or non-integer values will generate API errors
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderId">ID of the order that needs to be deleted</param>
/// <returns>ApiResponse of Object(void)</returns>
Delete purchase order by ID For valid response try integer IDs with positive integer value.\\ \\ Negative or non-integer values will generate API errors
Delete purchase order by ID For valid response try integer IDs with positive integer value . \\ \\ Negative or non - integer values will generate API errors
public ApiResponse<Object> DeleteOrderWithHttpInfo (long? orderId)
        {
            if (orderId == null)
                throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder");
            var localVarPath = "/store/order/{orderId}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
            String[] localVarHttpHeaderAccepts = new String[] {
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            if (orderId != null) localVarPathParams.Add("orderId", this.Configuration.ApiClient.ParameterToString(orderId)); 
            IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
                Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                localVarPathParams, localVarHttpContentType);
            int localVarStatusCode = (int) localVarResponse.StatusCode;
            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("DeleteOrder", localVarResponse);
                if (exception != null) throw exception;
            }
            return new ApiResponse<Object>(localVarStatusCode,
                localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                null);
        }
public ApiResponse < Object > DeleteOrderWithHttpInfo ( long ? orderId ) { if ( orderId == null ) throw new ApiException ( 400 , " " ) ; var localVarPath = " " ; var localVarPathParams = new Dictionary < String , String > ( ) ; var localVarQueryParams = new List < KeyValuePair < String , String > > ( ) ; var localVarHeaderParams = new Dictionary < String , String > ( this . Configuration . DefaultHeader ) ; var localVarFormParams = new Dictionary < String , String > ( ) ; var localVarFileParams = new Dictionary < String , FileParameter > ( ) ; Object localVarPostBody = null ; String [ ] localVarHttpContentTypes = new String [ ] { } ; String localVarHttpContentType = this . Configuration . ApiClient . SelectHeaderContentType ( localVarHttpContentTypes ) ; String [ ] localVarHttpHeaderAccepts = new String [ ] { } ; String localVarHttpHeaderAccept = this . Configuration . ApiClient . SelectHeaderAccept ( localVarHttpHeaderAccepts ) ; if ( localVarHttpHeaderAccept != null ) localVarHeaderParams . Add ( " " , localVarHttpHeaderAccept ) ; if ( orderId != null ) localVarPathParams . Add ( " " , this . Configuration . ApiClient . ParameterToString ( orderId ) ) ; IRestResponse localVarResponse = ( IRestResponse ) this . Configuration . ApiClient . CallApi ( localVarPath , Method . DELETE , localVarQueryParams , localVarPostBody , localVarHeaderParams , localVarFormParams , localVarFileParams , localVarPathParams , localVarHttpContentType ) ; int localVarStatusCode = ( int ) localVarResponse . StatusCode ; if ( ExceptionFactory != null ) { Exception exception = ExceptionFactory ( " " , localVarResponse ) ; if ( exception != null ) throw exception ; } return new ApiResponse < Object > ( localVarStatusCode , localVarResponse . Headers . ToDictionary ( x => x . Name , x => string . Join ( " " , x . Value ) ) , null ) ; }
Delete purchase order by ID For valid response try integer IDs with positive integer value.\\ \\ Negative or non-integer values will generate API errors
Delete purchase order by ID For valid response try integer IDs with positive integer value . \\ \\ Negative or non - integer values will generate API errors
// verify the required parameter 'orderId' is set // to determine the Content-Type header // to determine the Accept header // path parameter // make the HTTP request
ApiResponse of Object(void)
ApiResponse of Object ( void )
Thrown when fails to make API call
Thrown when fails to make API call
orderId
long?
ID of the order that needs to be deleted
ID of the order that needs to be deleted