525 lines
26 KiB
C#
525 lines
26 KiB
C#
|
/*
|
||
|
* 后台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 ILxmServiceApi : IApiAccessor
|
||
|
{
|
||
|
#region Synchronous Operations
|
||
|
/// <summary>
|
||
|
/// 根据编码得到非套餐服务列表
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>List<LxmServiceResp></returns>
|
||
|
List<LxmServiceResp> LxmServiceGetTopLxmServiceList (string code, string authorization);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据编码得到非套餐服务列表
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>ApiResponse of List<LxmServiceResp></returns>
|
||
|
ApiResponse<List<LxmServiceResp>> LxmServiceGetTopLxmServiceListWithHttpInfo (string code, string authorization);
|
||
|
/// <summary>
|
||
|
/// 得到前10条套装商品
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>List<NcSuiteGoodsResp></returns>
|
||
|
List<NcSuiteGoodsResp> LxmServiceGetTopNcSuiteServiceList (string code, string authorization);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 得到前10条套装商品
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>ApiResponse of List<NcSuiteGoodsResp></returns>
|
||
|
ApiResponse<List<NcSuiteGoodsResp>> LxmServiceGetTopNcSuiteServiceListWithHttpInfo (string code, 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="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>Task of List<LxmServiceResp></returns>
|
||
|
System.Threading.Tasks.Task<List<LxmServiceResp>> LxmServiceGetTopLxmServiceListAsync (string code, string authorization);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据编码得到非套餐服务列表
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>Task of ApiResponse (List<LxmServiceResp>)</returns>
|
||
|
System.Threading.Tasks.Task<ApiResponse<List<LxmServiceResp>>> LxmServiceGetTopLxmServiceListAsyncWithHttpInfo (string code, string authorization);
|
||
|
/// <summary>
|
||
|
/// 得到前10条套装商品
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>Task of List<NcSuiteGoodsResp></returns>
|
||
|
System.Threading.Tasks.Task<List<NcSuiteGoodsResp>> LxmServiceGetTopNcSuiteServiceListAsync (string code, string authorization);
|
||
|
|
||
|
/// <summary>
|
||
|
/// 得到前10条套装商品
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
///
|
||
|
/// </remarks>
|
||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>Task of ApiResponse (List<NcSuiteGoodsResp>)</returns>
|
||
|
System.Threading.Tasks.Task<ApiResponse<List<NcSuiteGoodsResp>>> LxmServiceGetTopNcSuiteServiceListAsyncWithHttpInfo (string code, string authorization);
|
||
|
#endregion Asynchronous Operations
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// Represents a collection of functions to interact with the API endpoints
|
||
|
/// </summary>
|
||
|
public partial class LxmServiceApi : ILxmServiceApi
|
||
|
{
|
||
|
private IO.Swagger.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Initializes a new instance of the <see cref="LxmServiceApi"/> class.
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
public LxmServiceApi(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="LxmServiceApi"/> class
|
||
|
/// using Configuration object
|
||
|
/// </summary>
|
||
|
/// <param name="configuration">An instance of Configuration</param>
|
||
|
/// <returns></returns>
|
||
|
public LxmServiceApi(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="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>List<LxmServiceResp></returns>
|
||
|
public List<LxmServiceResp> LxmServiceGetTopLxmServiceList (string code, string authorization)
|
||
|
{
|
||
|
ApiResponse<List<LxmServiceResp>> localVarResponse = LxmServiceGetTopLxmServiceListWithHttpInfo(code, authorization);
|
||
|
return localVarResponse.Data;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据编码得到非套餐服务列表
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>ApiResponse of List<LxmServiceResp></returns>
|
||
|
public ApiResponse< List<LxmServiceResp> > LxmServiceGetTopLxmServiceListWithHttpInfo (string code, string authorization)
|
||
|
{
|
||
|
// verify the required parameter 'code' is set
|
||
|
if (code == null)
|
||
|
throw new ApiException(400, "Missing required parameter 'code' when calling LxmServiceApi->LxmServiceGetTopLxmServiceList");
|
||
|
// verify the required parameter 'authorization' is set
|
||
|
if (authorization == null)
|
||
|
throw new ApiException(400, "Missing required parameter 'authorization' when calling LxmServiceApi->LxmServiceGetTopLxmServiceList");
|
||
|
|
||
|
var localVarPath = "/api/Admin/LxmService/GetTopLxmServiceList";
|
||
|
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 (code != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "code", code)); // 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("LxmServiceGetTopLxmServiceList", localVarResponse);
|
||
|
if (exception != null) throw exception;
|
||
|
}
|
||
|
|
||
|
return new ApiResponse<List<LxmServiceResp>>(localVarStatusCode,
|
||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||
|
(List<LxmServiceResp>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<LxmServiceResp>)));
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据编码得到非套餐服务列表
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>Task of List<LxmServiceResp></returns>
|
||
|
public async System.Threading.Tasks.Task<List<LxmServiceResp>> LxmServiceGetTopLxmServiceListAsync (string code, string authorization)
|
||
|
{
|
||
|
ApiResponse<List<LxmServiceResp>> localVarResponse = await LxmServiceGetTopLxmServiceListAsyncWithHttpInfo(code, authorization);
|
||
|
return localVarResponse.Data;
|
||
|
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据编码得到非套餐服务列表
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>Task of ApiResponse (List<LxmServiceResp>)</returns>
|
||
|
public async System.Threading.Tasks.Task<ApiResponse<List<LxmServiceResp>>> LxmServiceGetTopLxmServiceListAsyncWithHttpInfo (string code, string authorization)
|
||
|
{
|
||
|
// verify the required parameter 'code' is set
|
||
|
if (code == null)
|
||
|
throw new ApiException(400, "Missing required parameter 'code' when calling LxmServiceApi->LxmServiceGetTopLxmServiceList");
|
||
|
// verify the required parameter 'authorization' is set
|
||
|
if (authorization == null)
|
||
|
throw new ApiException(400, "Missing required parameter 'authorization' when calling LxmServiceApi->LxmServiceGetTopLxmServiceList");
|
||
|
|
||
|
var localVarPath = "/api/Admin/LxmService/GetTopLxmServiceList";
|
||
|
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 (code != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "code", code)); // 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("LxmServiceGetTopLxmServiceList", localVarResponse);
|
||
|
if (exception != null) throw exception;
|
||
|
}
|
||
|
|
||
|
return new ApiResponse<List<LxmServiceResp>>(localVarStatusCode,
|
||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||
|
(List<LxmServiceResp>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<LxmServiceResp>)));
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 得到前10条套装商品
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>List<NcSuiteGoodsResp></returns>
|
||
|
public List<NcSuiteGoodsResp> LxmServiceGetTopNcSuiteServiceList (string code, string authorization)
|
||
|
{
|
||
|
ApiResponse<List<NcSuiteGoodsResp>> localVarResponse = LxmServiceGetTopNcSuiteServiceListWithHttpInfo(code, authorization);
|
||
|
return localVarResponse.Data;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 得到前10条套装商品
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>ApiResponse of List<NcSuiteGoodsResp></returns>
|
||
|
public ApiResponse< List<NcSuiteGoodsResp> > LxmServiceGetTopNcSuiteServiceListWithHttpInfo (string code, string authorization)
|
||
|
{
|
||
|
// verify the required parameter 'code' is set
|
||
|
if (code == null)
|
||
|
throw new ApiException(400, "Missing required parameter 'code' when calling LxmServiceApi->LxmServiceGetTopNcSuiteServiceList");
|
||
|
// verify the required parameter 'authorization' is set
|
||
|
if (authorization == null)
|
||
|
throw new ApiException(400, "Missing required parameter 'authorization' when calling LxmServiceApi->LxmServiceGetTopNcSuiteServiceList");
|
||
|
|
||
|
var localVarPath = "/api/Admin/LxmService/GetTopNcSuiteServiceList";
|
||
|
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 (code != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "code", code)); // 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("LxmServiceGetTopNcSuiteServiceList", localVarResponse);
|
||
|
if (exception != null) throw exception;
|
||
|
}
|
||
|
|
||
|
return new ApiResponse<List<NcSuiteGoodsResp>>(localVarStatusCode,
|
||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||
|
(List<NcSuiteGoodsResp>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<NcSuiteGoodsResp>)));
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 得到前10条套装商品
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>Task of List<NcSuiteGoodsResp></returns>
|
||
|
public async System.Threading.Tasks.Task<List<NcSuiteGoodsResp>> LxmServiceGetTopNcSuiteServiceListAsync (string code, string authorization)
|
||
|
{
|
||
|
ApiResponse<List<NcSuiteGoodsResp>> localVarResponse = await LxmServiceGetTopNcSuiteServiceListAsyncWithHttpInfo(code, authorization);
|
||
|
return localVarResponse.Data;
|
||
|
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 得到前10条套装商品
|
||
|
/// </summary>
|
||
|
/// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
|
||
|
/// <param name="code">编码</param>
|
||
|
/// <param name="authorization">访问令牌</param>
|
||
|
/// <returns>Task of ApiResponse (List<NcSuiteGoodsResp>)</returns>
|
||
|
public async System.Threading.Tasks.Task<ApiResponse<List<NcSuiteGoodsResp>>> LxmServiceGetTopNcSuiteServiceListAsyncWithHttpInfo (string code, string authorization)
|
||
|
{
|
||
|
// verify the required parameter 'code' is set
|
||
|
if (code == null)
|
||
|
throw new ApiException(400, "Missing required parameter 'code' when calling LxmServiceApi->LxmServiceGetTopNcSuiteServiceList");
|
||
|
// verify the required parameter 'authorization' is set
|
||
|
if (authorization == null)
|
||
|
throw new ApiException(400, "Missing required parameter 'authorization' when calling LxmServiceApi->LxmServiceGetTopNcSuiteServiceList");
|
||
|
|
||
|
var localVarPath = "/api/Admin/LxmService/GetTopNcSuiteServiceList";
|
||
|
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 (code != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "code", code)); // 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("LxmServiceGetTopNcSuiteServiceList", localVarResponse);
|
||
|
if (exception != null) throw exception;
|
||
|
}
|
||
|
|
||
|
return new ApiResponse<List<NcSuiteGoodsResp>>(localVarStatusCode,
|
||
|
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||
|
(List<NcSuiteGoodsResp>) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<NcSuiteGoodsResp>)));
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|