/// <summary> /// Export Exports the human users into a CSV file. The file will contain the properties defined in the request. /// </summary> /// <exception cref="PostFinanceCheckout.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="request">The request controls the entries which are exported.</param> /// <returns>ApiResponse of byte[]</returns> public ApiResponse <byte[]> ExportWithHttpInfo(EntityExportRequest request) { // verify the required parameter 'request' is set if (request == null) { throw new ApiException(400, "Missing required parameter 'request' when calling HumanUserService->Export"); } var localVarPath = "/human-user/export"; 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", "text/csv" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (request != null && request.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(request); // http body (model) parameter } else { localVarPostBody = request; // 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("Export", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <byte[]>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (byte[])this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[])))); }
/// <summary> /// Export Exports the human users into a CSV file. The file will contain the properties defined in the request. /// </summary> /// <exception cref="PostFinanceCheckout.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="request">The request controls the entries which are exported.</param> /// <returns>byte[]</returns> public byte[] Export(EntityExportRequest request) { ApiResponse <byte[]> localVarResponse = ExportWithHttpInfo(request); return(localVarResponse.Data); }