/* * 后台API * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: Admin * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; namespace IO.Swagger.Api { /// /// Represents a collection of functions to interact with the API endpoints /// public interface IOrderApi : IApiAccessor { #region Synchronous Operations /// /// 创建退货订单 /// /// /// /// /// Thrown when fails to make API call /// 请求参数 /// 访问令牌 /// string string OrderCreateRefundOrder (CreateRefundOrderAct act, string authorization); /// /// 创建退货订单 /// /// /// /// /// Thrown when fails to make API call /// 请求参数 /// 访问令牌 /// ApiResponse of string ApiResponse OrderCreateRefundOrderWithHttpInfo (CreateRefundOrderAct act, string authorization); /// /// 创建补货订单-如果是直营店,则直接转换成转库单;返回为NC的单号,有可能为多个,因为目前有拆单需求 /// /// /// /// /// Thrown when fails to make API call /// /// 访问令牌 /// List<string> List OrderCreateSalesOrder (CreateOrderAct act, string authorization); /// /// 创建补货订单-如果是直营店,则直接转换成转库单;返回为NC的单号,有可能为多个,因为目前有拆单需求 /// /// /// /// /// Thrown when fails to make API call /// /// 访问令牌 /// ApiResponse of List<string> ApiResponse> OrderCreateSalesOrderWithHttpInfo (CreateOrderAct act, string authorization); /// /// 得到退货单状态 /// /// /// /// /// Thrown when fails to make API call /// 单据号 /// 访问令牌 /// RefundOrderStatusResp RefundOrderStatusResp OrderGetRefundOrderStatus (string orderno, string authorization); /// /// 得到退货单状态 /// /// /// /// /// Thrown when fails to make API call /// 单据号 /// 访问令牌 /// ApiResponse of RefundOrderStatusResp ApiResponse OrderGetRefundOrderStatusWithHttpInfo (string orderno, string authorization); /// /// 获取订单状态 /// /// /// /// /// Thrown when fails to make API call /// 订单号 /// 访问令牌 /// OrderResp OrderResp OrderGetSalesOrderStatus (string orderno, string authorization); /// /// 获取订单状态 /// /// /// /// /// Thrown when fails to make API call /// 订单号 /// 访问令牌 /// ApiResponse of OrderResp ApiResponse OrderGetSalesOrderStatusWithHttpInfo (string orderno, string authorization); #endregion Synchronous Operations #region Asynchronous Operations /// /// 创建退货订单 /// /// /// /// /// Thrown when fails to make API call /// 请求参数 /// 访问令牌 /// Task of string System.Threading.Tasks.Task OrderCreateRefundOrderAsync (CreateRefundOrderAct act, string authorization); /// /// 创建退货订单 /// /// /// /// /// Thrown when fails to make API call /// 请求参数 /// 访问令牌 /// Task of ApiResponse (string) System.Threading.Tasks.Task> OrderCreateRefundOrderAsyncWithHttpInfo (CreateRefundOrderAct act, string authorization); /// /// 创建补货订单-如果是直营店,则直接转换成转库单;返回为NC的单号,有可能为多个,因为目前有拆单需求 /// /// /// /// /// Thrown when fails to make API call /// /// 访问令牌 /// Task of List<string> System.Threading.Tasks.Task> OrderCreateSalesOrderAsync (CreateOrderAct act, string authorization); /// /// 创建补货订单-如果是直营店,则直接转换成转库单;返回为NC的单号,有可能为多个,因为目前有拆单需求 /// /// /// /// /// Thrown when fails to make API call /// /// 访问令牌 /// Task of ApiResponse (List<string>) System.Threading.Tasks.Task>> OrderCreateSalesOrderAsyncWithHttpInfo (CreateOrderAct act, string authorization); /// /// 得到退货单状态 /// /// /// /// /// Thrown when fails to make API call /// 单据号 /// 访问令牌 /// Task of RefundOrderStatusResp System.Threading.Tasks.Task OrderGetRefundOrderStatusAsync (string orderno, string authorization); /// /// 得到退货单状态 /// /// /// /// /// Thrown when fails to make API call /// 单据号 /// 访问令牌 /// Task of ApiResponse (RefundOrderStatusResp) System.Threading.Tasks.Task> OrderGetRefundOrderStatusAsyncWithHttpInfo (string orderno, string authorization); /// /// 获取订单状态 /// /// /// /// /// Thrown when fails to make API call /// 订单号 /// 访问令牌 /// Task of OrderResp System.Threading.Tasks.Task OrderGetSalesOrderStatusAsync (string orderno, string authorization); /// /// 获取订单状态 /// /// /// /// /// Thrown when fails to make API call /// 订单号 /// 访问令牌 /// Task of ApiResponse (OrderResp) System.Threading.Tasks.Task> OrderGetSalesOrderStatusAsyncWithHttpInfo (string orderno, string authorization); #endregion Asynchronous Operations } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class OrderApi : IOrderApi { private IO.Swagger.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class. /// /// public OrderApi(String basePath) { this.Configuration = new IO.Swagger.Client.Configuration { BasePath = basePath }; ExceptionFactory = IO.Swagger.Client.Configuration.DefaultExceptionFactory; } /// /// Initializes a new instance of the class /// using Configuration object /// /// An instance of Configuration /// public OrderApi(IO.Swagger.Client.Configuration configuration = null) { if (configuration == null) // use the default one in Configuration this.Configuration = IO.Swagger.Client.Configuration.Default; else this.Configuration = configuration; ExceptionFactory = IO.Swagger.Client.Configuration.DefaultExceptionFactory; } /// /// Gets the base path of the API client. /// /// The base path public String GetBasePath() { return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); } /// /// Sets the base path of the API client. /// /// The base path [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { // do nothing } /// /// Gets or sets the configuration object /// /// An instance of the Configuration public IO.Swagger.Client.Configuration Configuration {get; set;} /// /// Provides a factory method hook for the creation of exceptions. /// public IO.Swagger.Client.ExceptionFactory ExceptionFactory { get { if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) { throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); } return _exceptionFactory; } set { _exceptionFactory = value; } } /// /// Gets the default header. /// /// Dictionary of HTTP header [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] public IDictionary DefaultHeader() { return new ReadOnlyDictionary(this.Configuration.DefaultHeader); } /// /// Add default header. /// /// Header field name. /// Header field value. /// [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] public void AddDefaultHeader(string key, string value) { this.Configuration.AddDefaultHeader(key, value); } /// /// 创建退货订单 /// /// Thrown when fails to make API call /// 请求参数 /// 访问令牌 /// string public string OrderCreateRefundOrder (CreateRefundOrderAct act, string authorization) { ApiResponse localVarResponse = OrderCreateRefundOrderWithHttpInfo(act, authorization); return localVarResponse.Data; } /// /// 创建退货订单 /// /// Thrown when fails to make API call /// 请求参数 /// 访问令牌 /// ApiResponse of string public ApiResponse< string > OrderCreateRefundOrderWithHttpInfo (CreateRefundOrderAct act, string authorization) { // verify the required parameter 'act' is set if (act == null) throw new ApiException(400, "Missing required parameter 'act' when calling OrderApi->OrderCreateRefundOrder"); // verify the required parameter 'authorization' is set if (authorization == null) throw new ApiException(400, "Missing required parameter 'authorization' when calling OrderApi->OrderCreateRefundOrder"); var localVarPath = "/api/Admin/Order/CreateRefundOrder"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (authorization != null) localVarHeaderParams.Add("Authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header parameter if (act != null && act.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(act); // http body (model) parameter } else { localVarPostBody = act; // byte array } // 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("OrderCreateRefundOrder", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); } /// /// 创建退货订单 /// /// Thrown when fails to make API call /// 请求参数 /// 访问令牌 /// Task of string public async System.Threading.Tasks.Task OrderCreateRefundOrderAsync (CreateRefundOrderAct act, string authorization) { ApiResponse localVarResponse = await OrderCreateRefundOrderAsyncWithHttpInfo(act, authorization); return localVarResponse.Data; } /// /// 创建退货订单 /// /// Thrown when fails to make API call /// 请求参数 /// 访问令牌 /// Task of ApiResponse (string) public async System.Threading.Tasks.Task> OrderCreateRefundOrderAsyncWithHttpInfo (CreateRefundOrderAct act, string authorization) { // verify the required parameter 'act' is set if (act == null) throw new ApiException(400, "Missing required parameter 'act' when calling OrderApi->OrderCreateRefundOrder"); // verify the required parameter 'authorization' is set if (authorization == null) throw new ApiException(400, "Missing required parameter 'authorization' when calling OrderApi->OrderCreateRefundOrder"); var localVarPath = "/api/Admin/Order/CreateRefundOrder"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (authorization != null) localVarHeaderParams.Add("Authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header parameter if (act != null && act.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(act); // http body (model) parameter } else { localVarPostBody = act; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("OrderCreateRefundOrder", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); } /// /// 创建补货订单-如果是直营店,则直接转换成转库单;返回为NC的单号,有可能为多个,因为目前有拆单需求 /// /// Thrown when fails to make API call /// /// 访问令牌 /// List<string> public List OrderCreateSalesOrder (CreateOrderAct act, string authorization) { ApiResponse> localVarResponse = OrderCreateSalesOrderWithHttpInfo(act, authorization); return localVarResponse.Data; } /// /// 创建补货订单-如果是直营店,则直接转换成转库单;返回为NC的单号,有可能为多个,因为目前有拆单需求 /// /// Thrown when fails to make API call /// /// 访问令牌 /// ApiResponse of List<string> public ApiResponse< List > OrderCreateSalesOrderWithHttpInfo (CreateOrderAct act, string authorization) { // verify the required parameter 'act' is set if (act == null) throw new ApiException(400, "Missing required parameter 'act' when calling OrderApi->OrderCreateSalesOrder"); // verify the required parameter 'authorization' is set if (authorization == null) throw new ApiException(400, "Missing required parameter 'authorization' when calling OrderApi->OrderCreateSalesOrder"); var localVarPath = "/api/Admin/Order/CreateSalesOrder"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (authorization != null) localVarHeaderParams.Add("Authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header parameter if (act != null && act.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(act); // http body (model) parameter } else { localVarPostBody = act; // byte array } // 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("OrderCreateSalesOrder", localVarResponse); if (exception != null) throw exception; } return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// /// 创建补货订单-如果是直营店,则直接转换成转库单;返回为NC的单号,有可能为多个,因为目前有拆单需求 /// /// Thrown when fails to make API call /// /// 访问令牌 /// Task of List<string> public async System.Threading.Tasks.Task> OrderCreateSalesOrderAsync (CreateOrderAct act, string authorization) { ApiResponse> localVarResponse = await OrderCreateSalesOrderAsyncWithHttpInfo(act, authorization); return localVarResponse.Data; } /// /// 创建补货订单-如果是直营店,则直接转换成转库单;返回为NC的单号,有可能为多个,因为目前有拆单需求 /// /// Thrown when fails to make API call /// /// 访问令牌 /// Task of ApiResponse (List<string>) public async System.Threading.Tasks.Task>> OrderCreateSalesOrderAsyncWithHttpInfo (CreateOrderAct act, string authorization) { // verify the required parameter 'act' is set if (act == null) throw new ApiException(400, "Missing required parameter 'act' when calling OrderApi->OrderCreateSalesOrder"); // verify the required parameter 'authorization' is set if (authorization == null) throw new ApiException(400, "Missing required parameter 'authorization' when calling OrderApi->OrderCreateSalesOrder"); var localVarPath = "/api/Admin/Order/CreateSalesOrder"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (authorization != null) localVarHeaderParams.Add("Authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header parameter if (act != null && act.GetType() != typeof(byte[])) { localVarPostBody = this.Configuration.ApiClient.Serialize(act); // http body (model) parameter } else { localVarPostBody = act; // byte array } // make the HTTP request IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("OrderCreateSalesOrder", localVarResponse); if (exception != null) throw exception; } return new ApiResponse>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); } /// /// 得到退货单状态 /// /// Thrown when fails to make API call /// 单据号 /// 访问令牌 /// RefundOrderStatusResp public RefundOrderStatusResp OrderGetRefundOrderStatus (string orderno, string authorization) { ApiResponse localVarResponse = OrderGetRefundOrderStatusWithHttpInfo(orderno, authorization); return localVarResponse.Data; } /// /// 得到退货单状态 /// /// Thrown when fails to make API call /// 单据号 /// 访问令牌 /// ApiResponse of RefundOrderStatusResp public ApiResponse< RefundOrderStatusResp > OrderGetRefundOrderStatusWithHttpInfo (string orderno, string authorization) { // verify the required parameter 'orderno' is set if (orderno == null) throw new ApiException(400, "Missing required parameter 'orderno' when calling OrderApi->OrderGetRefundOrderStatus"); // verify the required parameter 'authorization' is set if (authorization == null) throw new ApiException(400, "Missing required parameter 'authorization' when calling OrderApi->OrderGetRefundOrderStatus"); var localVarPath = "/api/Admin/Order/GetRefundOrderStatus"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (orderno != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "orderno", orderno)); // query parameter if (authorization != null) localVarHeaderParams.Add("Authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header parameter // make the HTTP request 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("OrderGetRefundOrderStatus", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (RefundOrderStatusResp) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RefundOrderStatusResp))); } /// /// 得到退货单状态 /// /// Thrown when fails to make API call /// 单据号 /// 访问令牌 /// Task of RefundOrderStatusResp public async System.Threading.Tasks.Task OrderGetRefundOrderStatusAsync (string orderno, string authorization) { ApiResponse localVarResponse = await OrderGetRefundOrderStatusAsyncWithHttpInfo(orderno, authorization); return localVarResponse.Data; } /// /// 得到退货单状态 /// /// Thrown when fails to make API call /// 单据号 /// 访问令牌 /// Task of ApiResponse (RefundOrderStatusResp) public async System.Threading.Tasks.Task> OrderGetRefundOrderStatusAsyncWithHttpInfo (string orderno, string authorization) { // verify the required parameter 'orderno' is set if (orderno == null) throw new ApiException(400, "Missing required parameter 'orderno' when calling OrderApi->OrderGetRefundOrderStatus"); // verify the required parameter 'authorization' is set if (authorization == null) throw new ApiException(400, "Missing required parameter 'authorization' when calling OrderApi->OrderGetRefundOrderStatus"); var localVarPath = "/api/Admin/Order/GetRefundOrderStatus"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (orderno != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "orderno", orderno)); // query parameter if (authorization != null) localVarHeaderParams.Add("Authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header parameter // make the HTTP request IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("OrderGetRefundOrderStatus", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (RefundOrderStatusResp) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RefundOrderStatusResp))); } /// /// 获取订单状态 /// /// Thrown when fails to make API call /// 订单号 /// 访问令牌 /// OrderResp public OrderResp OrderGetSalesOrderStatus (string orderno, string authorization) { ApiResponse localVarResponse = OrderGetSalesOrderStatusWithHttpInfo(orderno, authorization); return localVarResponse.Data; } /// /// 获取订单状态 /// /// Thrown when fails to make API call /// 订单号 /// 访问令牌 /// ApiResponse of OrderResp public ApiResponse< OrderResp > OrderGetSalesOrderStatusWithHttpInfo (string orderno, string authorization) { // verify the required parameter 'orderno' is set if (orderno == null) throw new ApiException(400, "Missing required parameter 'orderno' when calling OrderApi->OrderGetSalesOrderStatus"); // verify the required parameter 'authorization' is set if (authorization == null) throw new ApiException(400, "Missing required parameter 'authorization' when calling OrderApi->OrderGetSalesOrderStatus"); var localVarPath = "/api/Admin/Order/GetSalesOrderStatus"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (orderno != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "orderno", orderno)); // query parameter if (authorization != null) localVarHeaderParams.Add("Authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header parameter // make the HTTP request 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("OrderGetSalesOrderStatus", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (OrderResp) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OrderResp))); } /// /// 获取订单状态 /// /// Thrown when fails to make API call /// 订单号 /// 访问令牌 /// Task of OrderResp public async System.Threading.Tasks.Task OrderGetSalesOrderStatusAsync (string orderno, string authorization) { ApiResponse localVarResponse = await OrderGetSalesOrderStatusAsyncWithHttpInfo(orderno, authorization); return localVarResponse.Data; } /// /// 获取订单状态 /// /// Thrown when fails to make API call /// 订单号 /// 访问令牌 /// Task of ApiResponse (OrderResp) public async System.Threading.Tasks.Task> OrderGetSalesOrderStatusAsyncWithHttpInfo (string orderno, string authorization) { // verify the required parameter 'orderno' is set if (orderno == null) throw new ApiException(400, "Missing required parameter 'orderno' when calling OrderApi->OrderGetSalesOrderStatus"); // verify the required parameter 'authorization' is set if (authorization == null) throw new ApiException(400, "Missing required parameter 'authorization' when calling OrderApi->OrderGetSalesOrderStatus"); var localVarPath = "/api/Admin/Order/GetSalesOrderStatus"; var localVarPathParams = new Dictionary(); var localVarQueryParams = new List>(); var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); var localVarFileParams = new Dictionary(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (orderno != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "orderno", orderno)); // query parameter if (authorization != null) localVarHeaderParams.Add("Authorization", this.Configuration.ApiClient.ParameterToString(authorization)); // header parameter // make the HTTP request IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("OrderGetSalesOrderStatus", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (OrderResp) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OrderResp))); } } }