967 lines
47 KiB
C#
Raw Normal View History

2025-04-21 14:10:27 +08:00
/*
* 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
{
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public interface IOrderApi : IApiAccessor
{
#region Synchronous Operations
/// <summary>
/// 创建退货订单
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act">请求参数</param>
/// <param name="authorization">访问令牌</param>
/// <returns>string</returns>
string OrderCreateRefundOrder (CreateRefundOrderAct act, string authorization);
/// <summary>
/// 创建退货订单
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act">请求参数</param>
/// <param name="authorization">访问令牌</param>
/// <returns>ApiResponse of string</returns>
ApiResponse<string> OrderCreateRefundOrderWithHttpInfo (CreateRefundOrderAct act, string authorization);
/// <summary>
/// 创建补货订单-如果是直营店则直接转换成转库单返回为NC的单号有可能为多个因为目前有拆单需求
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act"></param>
/// <param name="authorization">访问令牌</param>
/// <returns>List&lt;string&gt;</returns>
List<string> OrderCreateSalesOrder (CreateOrderAct act, string authorization);
/// <summary>
/// 创建补货订单-如果是直营店则直接转换成转库单返回为NC的单号有可能为多个因为目前有拆单需求
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act"></param>
/// <param name="authorization">访问令牌</param>
/// <returns>ApiResponse of List&lt;string&gt;</returns>
ApiResponse<List<string>> OrderCreateSalesOrderWithHttpInfo (CreateOrderAct act, string authorization);
/// <summary>
/// 得到退货单状态
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">单据号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>RefundOrderStatusResp</returns>
RefundOrderStatusResp OrderGetRefundOrderStatus (string orderno, string authorization);
/// <summary>
/// 得到退货单状态
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">单据号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>ApiResponse of RefundOrderStatusResp</returns>
ApiResponse<RefundOrderStatusResp> OrderGetRefundOrderStatusWithHttpInfo (string orderno, string authorization);
/// <summary>
/// 获取订单状态
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">订单号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>OrderResp</returns>
OrderResp OrderGetSalesOrderStatus (string orderno, string authorization);
/// <summary>
/// 获取订单状态
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">订单号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>ApiResponse of OrderResp</returns>
ApiResponse<OrderResp> OrderGetSalesOrderStatusWithHttpInfo (string orderno, string authorization);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
/// 创建退货订单
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act">请求参数</param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of string</returns>
System.Threading.Tasks.Task<string> OrderCreateRefundOrderAsync (CreateRefundOrderAct act, string authorization);
/// <summary>
/// 创建退货订单
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act">请求参数</param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of ApiResponse (string)</returns>
System.Threading.Tasks.Task<ApiResponse<string>> OrderCreateRefundOrderAsyncWithHttpInfo (CreateRefundOrderAct act, string authorization);
/// <summary>
/// 创建补货订单-如果是直营店则直接转换成转库单返回为NC的单号有可能为多个因为目前有拆单需求
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act"></param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of List&lt;string&gt;</returns>
System.Threading.Tasks.Task<List<string>> OrderCreateSalesOrderAsync (CreateOrderAct act, string authorization);
/// <summary>
/// 创建补货订单-如果是直营店则直接转换成转库单返回为NC的单号有可能为多个因为目前有拆单需求
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act"></param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of ApiResponse (List&lt;string&gt;)</returns>
System.Threading.Tasks.Task<ApiResponse<List<string>>> OrderCreateSalesOrderAsyncWithHttpInfo (CreateOrderAct act, string authorization);
/// <summary>
/// 得到退货单状态
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">单据号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of RefundOrderStatusResp</returns>
System.Threading.Tasks.Task<RefundOrderStatusResp> OrderGetRefundOrderStatusAsync (string orderno, string authorization);
/// <summary>
/// 得到退货单状态
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">单据号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of ApiResponse (RefundOrderStatusResp)</returns>
System.Threading.Tasks.Task<ApiResponse<RefundOrderStatusResp>> OrderGetRefundOrderStatusAsyncWithHttpInfo (string orderno, string authorization);
/// <summary>
/// 获取订单状态
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">订单号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of OrderResp</returns>
System.Threading.Tasks.Task<OrderResp> OrderGetSalesOrderStatusAsync (string orderno, string authorization);
/// <summary>
/// 获取订单状态
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">订单号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of ApiResponse (OrderResp)</returns>
System.Threading.Tasks.Task<ApiResponse<OrderResp>> OrderGetSalesOrderStatusAsyncWithHttpInfo (string orderno, string authorization);
#endregion Asynchronous Operations
}
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public partial class OrderApi : IOrderApi
{
private IO.Swagger.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="OrderApi"/> class.
/// </summary>
/// <returns></returns>
public OrderApi(String basePath)
{
this.Configuration = new IO.Swagger.Client.Configuration { BasePath = basePath };
ExceptionFactory = IO.Swagger.Client.Configuration.DefaultExceptionFactory;
}
/// <summary>
/// Initializes a new instance of the <see cref="OrderApi"/> class
/// using Configuration object
/// </summary>
/// <param name="configuration">An instance of Configuration</param>
/// <returns></returns>
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;
}
/// <summary>
/// Gets the base path of the API client.
/// </summary>
/// <value>The base path</value>
public String GetBasePath()
{
return this.Configuration.ApiClient.RestClient.BaseUrl.ToString();
}
/// <summary>
/// Sets the base path of the API client.
/// </summary>
/// <value>The base path</value>
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
public void SetBasePath(String basePath)
{
// do nothing
}
/// <summary>
/// Gets or sets the configuration object
/// </summary>
/// <value>An instance of the Configuration</value>
public IO.Swagger.Client.Configuration Configuration {get; set;}
/// <summary>
/// Provides a factory method hook for the creation of exceptions.
/// </summary>
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; }
}
/// <summary>
/// Gets the default header.
/// </summary>
/// <returns>Dictionary of HTTP header</returns>
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
public IDictionary<String, String> DefaultHeader()
{
return new ReadOnlyDictionary<string, string>(this.Configuration.DefaultHeader);
}
/// <summary>
/// Add default header.
/// </summary>
/// <param name="key">Header field name.</param>
/// <param name="value">Header field value.</param>
/// <returns></returns>
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
public void AddDefaultHeader(string key, string value)
{
this.Configuration.AddDefaultHeader(key, value);
}
/// <summary>
/// 创建退货订单
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act">请求参数</param>
/// <param name="authorization">访问令牌</param>
/// <returns>string</returns>
public string OrderCreateRefundOrder (CreateRefundOrderAct act, string authorization)
{
ApiResponse<string> localVarResponse = OrderCreateRefundOrderWithHttpInfo(act, authorization);
return localVarResponse.Data;
}
/// <summary>
/// 创建退货订单
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act">请求参数</param>
/// <param name="authorization">访问令牌</param>
/// <returns>ApiResponse of string</returns>
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<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",
"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<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// 创建退货订单
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act">请求参数</param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of string</returns>
public async System.Threading.Tasks.Task<string> OrderCreateRefundOrderAsync (CreateRefundOrderAct act, string authorization)
{
ApiResponse<string> localVarResponse = await OrderCreateRefundOrderAsyncWithHttpInfo(act, authorization);
return localVarResponse.Data;
}
/// <summary>
/// 创建退货订单
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act">请求参数</param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of ApiResponse (string)</returns>
public async System.Threading.Tasks.Task<ApiResponse<string>> 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<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",
"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<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// 创建补货订单-如果是直营店则直接转换成转库单返回为NC的单号有可能为多个因为目前有拆单需求
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act"></param>
/// <param name="authorization">访问令牌</param>
/// <returns>List&lt;string&gt;</returns>
public List<string> OrderCreateSalesOrder (CreateOrderAct act, string authorization)
{
ApiResponse<List<string>> localVarResponse = OrderCreateSalesOrderWithHttpInfo(act, authorization);
return localVarResponse.Data;
}
/// <summary>
/// 创建补货订单-如果是直营店则直接转换成转库单返回为NC的单号有可能为多个因为目前有拆单需求
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act"></param>
/// <param name="authorization">访问令牌</param>
/// <returns>ApiResponse of List&lt;string&gt;</returns>
public ApiResponse< List<string> > 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<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",
"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<List<string>>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(List<string>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<string>)));
}
/// <summary>
/// 创建补货订单-如果是直营店则直接转换成转库单返回为NC的单号有可能为多个因为目前有拆单需求
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act"></param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of List&lt;string&gt;</returns>
public async System.Threading.Tasks.Task<List<string>> OrderCreateSalesOrderAsync (CreateOrderAct act, string authorization)
{
ApiResponse<List<string>> localVarResponse = await OrderCreateSalesOrderAsyncWithHttpInfo(act, authorization);
return localVarResponse.Data;
}
/// <summary>
/// 创建补货订单-如果是直营店则直接转换成转库单返回为NC的单号有可能为多个因为目前有拆单需求
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="act"></param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of ApiResponse (List&lt;string&gt;)</returns>
public async System.Threading.Tasks.Task<ApiResponse<List<string>>> 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<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",
"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<List<string>>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(List<string>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<string>)));
}
/// <summary>
/// 得到退货单状态
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">单据号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>RefundOrderStatusResp</returns>
public RefundOrderStatusResp OrderGetRefundOrderStatus (string orderno, string authorization)
{
ApiResponse<RefundOrderStatusResp> localVarResponse = OrderGetRefundOrderStatusWithHttpInfo(orderno, authorization);
return localVarResponse.Data;
}
/// <summary>
/// 得到退货单状态
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">单据号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>ApiResponse of RefundOrderStatusResp</returns>
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<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[] {
};
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<RefundOrderStatusResp>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(RefundOrderStatusResp) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RefundOrderStatusResp)));
}
/// <summary>
/// 得到退货单状态
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">单据号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of RefundOrderStatusResp</returns>
public async System.Threading.Tasks.Task<RefundOrderStatusResp> OrderGetRefundOrderStatusAsync (string orderno, string authorization)
{
ApiResponse<RefundOrderStatusResp> localVarResponse = await OrderGetRefundOrderStatusAsyncWithHttpInfo(orderno, authorization);
return localVarResponse.Data;
}
/// <summary>
/// 得到退货单状态
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">单据号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of ApiResponse (RefundOrderStatusResp)</returns>
public async System.Threading.Tasks.Task<ApiResponse<RefundOrderStatusResp>> 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<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[] {
};
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<RefundOrderStatusResp>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(RefundOrderStatusResp) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(RefundOrderStatusResp)));
}
/// <summary>
/// 获取订单状态
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">订单号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>OrderResp</returns>
public OrderResp OrderGetSalesOrderStatus (string orderno, string authorization)
{
ApiResponse<OrderResp> localVarResponse = OrderGetSalesOrderStatusWithHttpInfo(orderno, authorization);
return localVarResponse.Data;
}
/// <summary>
/// 获取订单状态
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">订单号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>ApiResponse of OrderResp</returns>
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<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[] {
};
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<OrderResp>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(OrderResp) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OrderResp)));
}
/// <summary>
/// 获取订单状态
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">订单号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of OrderResp</returns>
public async System.Threading.Tasks.Task<OrderResp> OrderGetSalesOrderStatusAsync (string orderno, string authorization)
{
ApiResponse<OrderResp> localVarResponse = await OrderGetSalesOrderStatusAsyncWithHttpInfo(orderno, authorization);
return localVarResponse.Data;
}
/// <summary>
/// 获取订单状态
/// </summary>
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="orderno">订单号</param>
/// <param name="authorization">访问令牌</param>
/// <returns>Task of ApiResponse (OrderResp)</returns>
public async System.Threading.Tasks.Task<ApiResponse<OrderResp>> 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<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[] {
};
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<OrderResp>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(OrderResp) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OrderResp)));
}
}
}