/// <summary> /// Count Counts the number of items in the database as restricted by the given filter. /// </summary> /// <exception cref="Customweb.Wallee.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="spaceId"></param> /// <param name="filter">The filter which restricts the entities which are used to calculate the count. (optional)</param> /// <returns>Task of ApiResponse (long?)</returns> public async System.Threading.Tasks.Task<ApiResponse<long?>> CountAsyncWithHttpInfo (long? spaceId, EntityQueryFilter filter = null) { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new ApiException(400, "Missing required parameter 'spaceId' when calling SubscriptionMetricUsageService->Count"); } var localVarPath = "/subscription-metric-usage/count"; var localVarPathParams = new Dictionary<String, String>(); var localVarQueryParams = new Dictionary<String, String>(); var localVarHeaderParams = new Dictionary<String, String>(); 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;charset=utf-8" }; String localVarHttpContentType = ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json;charset=utf-8" }; String localVarHttpHeaderAccept = ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (spaceId != null) localVarQueryParams.Add("spaceId", ApiClient.ParameterToString(spaceId)); // query parameter if (filter != null && filter.GetType() != typeof(byte[])) { localVarPostBody = ApiClient.Serialize(filter); // http body (model) parameter } else { localVarPostBody = filter; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse) await ApiClient.CallApiAsync(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("Count", localVarResponse); if (exception != null) throw exception; } return new ApiResponse<long?>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (long?) ApiClient.Deserialize(localVarResponse, typeof(long?))); }
/// <summary> /// Count Counts the number of items in the database as restricted by the given filter. /// </summary> /// <exception cref="TrustPayments.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="filter">The filter which restricts the entities which are used to calculate the count. (optional)</param> /// <returns>ApiResponse of long?</returns> public ApiResponse <long?> CountWithHttpInfo(EntityQueryFilter filter = null) { var localVarPath = "/space/count"; 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; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json;charset=utf-8" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json;charset=utf-8" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (filter != null && filter.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(filter); // http body (model) parameter } else { localVarPostBody = filter; // byte array } this.Configuration.ApiClient.ResetTimeout(); // make the HTTP request IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("Count", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <long?>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (long?)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(long?)))); }
/// <summary> /// Count Counts the number of items in the database as restricted by the given filter. /// </summary> /// <exception cref="Wallee.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="spaceId"></param> /// <param name="filter">The filter which restricts the entities which are used to calculate the count. (optional)</param> /// <returns>ApiResponse of long?</returns> public ApiResponse <long?> CountWithHttpInfo(long?spaceId, EntityQueryFilter filter = null) { // verify the required parameter 'spaceId' is set if (spaceId == null) { throw new ApiException(400, "Missing required parameter 'spaceId' when calling ChargeFlowLevelPaymentLinkService->Count"); } var localVarPath = "/charge-flow-level-payment-link/count"; 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; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json;charset=utf-8" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json;charset=utf-8" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (spaceId != null) { localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "spaceId", spaceId)); // query parameter } if (filter != null && filter.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(filter); // http body (model) parameter } else { localVarPostBody = filter; // byte array } this.Configuration.ApiClient.ResetTimeout(); // make the HTTP request IRestResponse localVarResponse = (IRestResponse)this.Configuration.ApiClient.CallApi(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("Count", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <long?>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (long?)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(long?)))); }