samples/composed/client/petstore/csharp/SwaggerClientWithPropertyChanged/src/IO.Swagger/Api/StoreApi.cs
/// <summary>
/// Returns pet inventories by status Returns a map of status codes to quantities
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of Dictionary&lt;string, int?&gt;</returns>
Returns pet inventories by status Returns a map of status codes to quantities
Returns pet inventories by status Returns a map of status codes to quantities
public ApiResponse< Dictionary<string, int?> > GetInventoryWithHttpInfo ()
        {
            var localVarPath = "/store/inventory";
            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[] {
                "application/json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key")))
            {
                localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key");
            }
            IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
                Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                localVarPathParams, localVarHttpContentType);
            int localVarStatusCode = (int) localVarResponse.StatusCode;
            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("GetInventory", localVarResponse);
                if (exception != null) throw exception;
            }
            return new ApiResponse<Dictionary<string, int?>>(localVarStatusCode,
                localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                (Dictionary<string, int?>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary<string, int?>)));
        }
public ApiResponse < Dictionary < string , int ? > > GetInventoryWithHttpInfo ( ) { 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 ( ! String . IsNullOrEmpty ( this . Configuration . GetApiKeyWithPrefix ( " " ) ) ) { localVarHeaderParams [ " " ] = this . Configuration . GetApiKeyWithPrefix ( " " ) ; } IRestResponse localVarResponse = ( IRestResponse ) this . Configuration . ApiClient . CallApi ( localVarPath , Method . GET , 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 < Dictionary < string , int ? > > ( localVarStatusCode , localVarResponse . Headers . ToDictionary ( x => x . Name , x => string . Join ( " " , x . Value ) ) , ( Dictionary < string , int ? > ) this . Configuration . ApiClient . Deserialize ( localVarResponse , typeof ( Dictionary < string , int ? > ) ) ) ; }
Returns pet inventories by status Returns a map of status codes to quantities
Returns pet inventories by status Returns a map of status codes to quantities
// to determine the Content-Type header // to determine the Accept header // authentication (api_key) required // make the HTTP request
ApiResponse of Dictionary
ApiResponse of Dictionary
Thrown when fails to make API call
Thrown when fails to make API call