/// <summary> /// Get members Get array of members satisfied search criteria. /// </summary> /// <param name="criteria">Search criteria</param> /// <returns>Task of VirtoCommerceCustomerModuleWebModelSearchResult</returns> public async System.Threading.Tasks.Task<VirtoCommerceCustomerModuleWebModelSearchResult> CustomerModuleSearchAsync (VirtoCommerceDomainCustomerModelSearchCriteria criteria) { ApiResponse<VirtoCommerceCustomerModuleWebModelSearchResult> response = await CustomerModuleSearchAsyncWithHttpInfo(criteria); return response.Data; }
/// <summary> /// Get members Get array of members satisfied search criteria. /// </summary> /// <param name="criteria">Search criteria</param> /// <returns>Task of ApiResponse (VirtoCommerceCustomerModuleWebModelSearchResult)</returns> public async System.Threading.Tasks.Task<ApiResponse<VirtoCommerceCustomerModuleWebModelSearchResult>> CustomerModuleSearchAsyncWithHttpInfo (VirtoCommerceDomainCustomerModelSearchCriteria criteria) { // verify the required parameter 'criteria' is set if (criteria == null) throw new ApiException(400, "Missing required parameter 'criteria' when calling CustomerModuleSearch"); var path_ = "/api/members"; var pathParams = new Dictionary<String, String>(); 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; // to determine the Accept header String[] http_header_accepts = new String[] { "application/json", "text/json" }; String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); postBody = Configuration.ApiClient.Serialize(criteria); // http body (model) parameter // make the HTTP request IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); int statusCode = (int) response.StatusCode; if (statusCode >= 400) throw new ApiException (statusCode, "Error calling CustomerModuleSearch: " + response.Content, response.Content); else if (statusCode == 0) throw new ApiException (statusCode, "Error calling CustomerModuleSearch: " + response.ErrorMessage, response.ErrorMessage); return new ApiResponse<VirtoCommerceCustomerModuleWebModelSearchResult>(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (VirtoCommerceCustomerModuleWebModelSearchResult) Configuration.ApiClient.Deserialize(response, typeof(VirtoCommerceCustomerModuleWebModelSearchResult))); }
/// <summary> /// Get members Get array of members satisfied search criteria. /// </summary> /// <param name="criteria">Search criteria</param> /// <returns>VirtoCommerceCustomerModuleWebModelSearchResult</returns> public VirtoCommerceCustomerModuleWebModelSearchResult CustomerModuleSearch (VirtoCommerceDomainCustomerModelSearchCriteria criteria) { ApiResponse<VirtoCommerceCustomerModuleWebModelSearchResult> response = CustomerModuleSearchWithHttpInfo(criteria); return response.Data; }