feat(wxapi): 新增微信小店主页管理相关接口

This commit is contained in:
Fu Diwei 2024-11-05 10:59:04 +08:00
parent c209cc3d57
commit 60d80194ff
56 changed files with 1852 additions and 1 deletions

View File

@ -399,6 +399,194 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECBasicsMediaGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
#region ECBasics/HomepageBackground
/// <summary>
/// <para>异步调用 [POST] /channels/ec/basics/homepage/background/apply/submit 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/background/submit_background_apply.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECBasicsHomepageBackgroundApplySubmitResponse> ExecuteChannelsECBasicsHomepageBackgroundApplySubmitAsync(this WechatApiClient client, Models.ChannelsECBasicsHomepageBackgroundApplySubmitRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "basics", "homepage", "background", "apply", "submit")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECBasicsHomepageBackgroundApplySubmitResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/basics/homepage/background/apply/cancel 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/background/cancel_background_apply.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECBasicsHomepageBackgroundApplyCancelResponse> ExecuteChannelsECBasicsHomepageBackgroundApplyCancelAsync(this WechatApiClient client, Models.ChannelsECBasicsHomepageBackgroundApplyCancelRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "basics", "homepage", "background", "apply", "cancel")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECBasicsHomepageBackgroundApplyCancelResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/basics/homepage/background/get 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/background/get_background.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECBasicsHomepageBackgroundGetResponse> ExecuteChannelsECBasicsHomepageBackgroundGetAsync(this WechatApiClient client, Models.ChannelsECBasicsHomepageBackgroundGetRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "basics", "homepage", "background", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECBasicsHomepageBackgroundGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/basics/homepage/background/remove 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/background/remove_background.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECBasicsHomepageBackgroundRemoveResponse> ExecuteChannelsECBasicsHomepageBackgroundRemoveAsync(this WechatApiClient client, Models.ChannelsECBasicsHomepageBackgroundRemoveRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "basics", "homepage", "background", "remove")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECBasicsHomepageBackgroundRemoveResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
#endregion
#region ECBasics/HomepageBanner
/// <summary>
/// <para>异步调用 [POST] /channels/ec/basics/homepage/banner/apply/submit 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/banner/submit_banner_apply.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECBasicsHomepageBannerApplySubmitResponse> ExecuteChannelsECBasicsHomepageBannerApplySubmitAsync(this WechatApiClient client, Models.ChannelsECBasicsHomepageBannerApplySubmitRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "basics", "homepage", "banner", "apply", "submit")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECBasicsHomepageBannerApplySubmitResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/basics/homepage/banner/apply/cancel 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/banner/cancel_banner_apply.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECBasicsHomepageBannerApplyCancelResponse> ExecuteChannelsECBasicsHomepageBannerApplyCancelAsync(this WechatApiClient client, Models.ChannelsECBasicsHomepageBannerApplyCancelRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "basics", "homepage", "banner", "apply", "cancel")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECBasicsHomepageBannerApplyCancelResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/basics/homepage/banner/get 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/banner/get_banner.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECBasicsHomepageBannerGetResponse> ExecuteChannelsECBasicsHomepageBannerGetAsync(this WechatApiClient client, Models.ChannelsECBasicsHomepageBannerGetRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "basics", "homepage", "banner", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECBasicsHomepageBannerGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/basics/homepage/banner/remove 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/banner/remove_banner.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECBasicsHomepageBannerRemoveResponse> ExecuteChannelsECBasicsHomepageBannerRemoveAsync(this WechatApiClient client, Models.ChannelsECBasicsHomepageBannerRemoveRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "basics", "homepage", "banner", "remove")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECBasicsHomepageBannerRemoveResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
#endregion
#endregion
#region ECBrand
@ -4360,6 +4548,219 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
}
#endregion
#region ECStore
#region ECStore/Classification
/// <summary>
/// <para>异步调用 [POST] /channels/ec/store/classification/tree/product/add 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/classification/addclassificationproduct.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECStoreClassificationTreeProductAddResponse> ExecuteChannelsECStoreClassificationTreeProductAddAsync(this WechatApiClient client, Models.ChannelsECStoreClassificationTreeProductAddRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "store", "classification", "tree", "product", "add")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECStoreClassificationTreeProductAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/store/classification/tree/product/del 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/classification/delclassificationproduct.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECStoreClassificationTreeProductDeleteResponse> ExecuteChannelsECStoreClassificationTreeProductDeleteAsync(this WechatApiClient client, Models.ChannelsECStoreClassificationTreeProductDeleteRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "store", "classification", "tree", "product", "del")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECStoreClassificationTreeProductDeleteResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/store/classification/tree/product/get 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/classification/getclassificationproductlist.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECStoreClassificationTreeProductGetResponse> ExecuteChannelsECStoreClassificationTreeProductGetAsync(this WechatApiClient client, Models.ChannelsECStoreClassificationTreeProductGetRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "store", "classification", "tree", "product", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECStoreClassificationTreeProductGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/store/classification/tree/set 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/classification/setclassificationtree.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECStoreClassificationTreeSetResponse> ExecuteChannelsECStoreClassificationTreeSetAsync(this WechatApiClient client, Models.ChannelsECStoreClassificationTreeSetRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "store", "classification", "tree", "set")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECStoreClassificationTreeSetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/store/classification/tree/get 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/classification/getclassificationtree.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECStoreClassificationTreeGetResponse> ExecuteChannelsECStoreClassificationTreeGetAsync(this WechatApiClient client, Models.ChannelsECStoreClassificationTreeGetRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "store", "classification", "tree", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECStoreClassificationTreeGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
#endregion
#region ECStore/Window
/// <summary>
/// <para>异步调用 [POST] /channels/ec/store/window/product/list/get 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/storewindow/list_get.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECStoreWindowProductListGetResponse> ExecuteChannelsECStoreWindowProductListGetAsync(this WechatApiClient client, Models.ChannelsECStoreWindowProductListGetRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "store", "window", "product", "list", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECStoreWindowProductListGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/store/window/product/reorder 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/storewindow/reorder.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECStoreWindowProductReorderResponse> ExecuteChannelsECStoreWindowProductReorderAsync(this WechatApiClient client, Models.ChannelsECStoreWindowProductReorderRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "store", "window", "product", "reorder")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECStoreWindowProductReorderResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/store/window/product/hide 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/storewindow/set_hide.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECStoreWindowProductHideResponse> ExecuteChannelsECStoreWindowProductHideAsync(this WechatApiClient client, Models.ChannelsECStoreWindowProductHideRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "store", "window", "product", "hide")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECStoreWindowProductHideResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/store/window/product/settop 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/API/homepage/storewindow/set_top.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECStoreWindowProductSetTopResponse> ExecuteChannelsECStoreWindowProductSetTopAsync(this WechatApiClient client, Models.ChannelsECStoreWindowProductSetTopRequest request, CancellationToken cancellationToken = default)
{
if (client is null) throw new ArgumentNullException(nameof(client));
if (request is null) throw new ArgumentNullException(nameof(request));
IFlurlRequest flurlReq = client
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "store", "window", "product", "settop")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECStoreWindowProductSetTopResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
#endregion
#endregion
#region ECVip
#region ECVip/ExperienceValue
/// <summary>

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/background/apply/cancel 接口的请求。</para>
/// </summary>
public class ChannelsECBasicsHomepageBackgroundApplyCancelRequest : WechatApiRequest, IInferable<ChannelsECBasicsHomepageBackgroundApplyCancelRequest, ChannelsECBasicsHomepageBackgroundApplyCancelResponse>
{
/// <summary>
/// 获取或设置申请 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("apply_id")]
[System.Text.Json.Serialization.JsonPropertyName("apply_id")]
public long ApplyId { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/background/apply/cancel 接口的响应。</para>
/// </summary>
public class ChannelsECBasicsHomepageBackgroundApplyCancelResponse : WechatApiResponse
{
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/background/apply/submit 接口的请求。</para>
/// </summary>
public class ChannelsECBasicsHomepageBackgroundApplySubmitRequest : WechatApiRequest, IInferable<ChannelsECBasicsHomepageBackgroundApplySubmitRequest, ChannelsECBasicsHomepageBackgroundApplySubmitResponse>
{
/// <summary>
/// 获取或设置图片 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("img_url")]
[System.Text.Json.Serialization.JsonPropertyName("img_url")]
public string ImageUrl { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,16 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/background/apply/submit 接口的响应。</para>
/// </summary>
public class ChannelsECBasicsHomepageBackgroundApplySubmitResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置申请 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("apply_id")]
[System.Text.Json.Serialization.JsonPropertyName("apply_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long ApplyId { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/background/get 接口的请求。</para>
/// </summary>
public class ChannelsECBasicsHomepageBackgroundGetRequest : WechatApiRequest, IInferable<ChannelsECBasicsHomepageBackgroundGetRequest, ChannelsECBasicsHomepageBackgroundGetResponse>
{
}
}

View File

@ -0,0 +1,57 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/background/get 接口的响应。</para>
/// </summary>
public class ChannelsECBasicsHomepageBackgroundGetResponse : WechatApiResponse
{
public static class Types
{
public class Apply
{
/// <summary>
/// 获取或设置图片 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("img_url")]
[System.Text.Json.Serialization.JsonPropertyName("img_url")]
public string ImageUrl { get; set; } = default!;
/// <summary>
/// 获取或设置申请 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("apply_id")]
[System.Text.Json.Serialization.JsonPropertyName("apply_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long ApplyId { get; set; }
/// <summary>
/// 获取或设置申请状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("state")]
[System.Text.Json.Serialization.JsonPropertyName("state")]
public int State { get; set; }
/// <summary>
/// 获取或设置审核结果描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("audit_desc")]
[System.Text.Json.Serialization.JsonPropertyName("audit_desc")]
public string? AuditDescription { get; set; }
}
}
/// <summary>
/// 获取或设置当前生效的图片 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("img_url")]
[System.Text.Json.Serialization.JsonPropertyName("img_url")]
public string ImageUrl { get; set; } = default!;
/// <summary>
/// 获取或设置最近一次申请信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("apply")]
[System.Text.Json.Serialization.JsonPropertyName("apply")]
public Types.Apply? Apply { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/background/remove 接口的请求。</para>
/// </summary>
public class ChannelsECBasicsHomepageBackgroundRemoveRequest : WechatApiRequest, IInferable<ChannelsECBasicsHomepageBackgroundRemoveRequest, ChannelsECBasicsHomepageBackgroundRemoveResponse>
{
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/background/remove 接口的响应。</para>
/// </summary>
public class ChannelsECBasicsHomepageBackgroundRemoveResponse : WechatApiResponse
{
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/banner/apply/cancel 接口的请求。</para>
/// </summary>
public class ChannelsECBasicsHomepageBannerApplyCancelRequest : WechatApiRequest, IInferable<ChannelsECBasicsHomepageBannerApplyCancelRequest, ChannelsECBasicsHomepageBannerApplyCancelResponse>
{
/// <summary>
/// 获取或设置申请 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("apply_id")]
[System.Text.Json.Serialization.JsonPropertyName("apply_id")]
public long ApplyId { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/banner/apply/cancel 接口的响应。</para>
/// </summary>
public class ChannelsECBasicsHomepageBannerApplyCancelResponse : WechatApiResponse
{
}
}

View File

@ -0,0 +1,139 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/banner/apply/submit 接口的请求。</para>
/// </summary>
public class ChannelsECBasicsHomepageBannerApplySubmitRequest : WechatApiRequest, IInferable<ChannelsECBasicsHomepageBannerApplySubmitRequest, ChannelsECBasicsHomepageBannerApplySubmitResponse>
{
public static class Types
{
public class BannerList
{
/// <summary>
/// 获取或设置展示样式。
/// </summary>
[Newtonsoft.Json.JsonProperty("scale")]
[System.Text.Json.Serialization.JsonPropertyName("scale")]
public int Scale { get; set; }
/// <summary>
/// 获取或设置展示位列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("banner")]
[System.Text.Json.Serialization.JsonPropertyName("banner")]
public IList<BannerItem> Items { get; set; } = new List<BannerItem>();
}
public class BannerItem
{
public static class Types
{
public class Banner
{
/// <summary>
/// 获取或设置图片 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("img_url")]
[System.Text.Json.Serialization.JsonPropertyName("img_url")]
public string ImageUrl { get; set; } = string.Empty;
/// <summary>
/// 获取或设置标题。
/// </summary>
[Newtonsoft.Json.JsonProperty("title")]
[System.Text.Json.Serialization.JsonPropertyName("title")]
public string? Title { get; set; }
/// <summary>
/// 获取或设置描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("description")]
[System.Text.Json.Serialization.JsonPropertyName("description")]
public string? Description { get; set; }
}
public class Product
{
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
}
public class Finder
{
/// <summary>
/// 获取或设置视频号 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("finder_user_name")]
[System.Text.Json.Serialization.JsonPropertyName("finder_user_name")]
public string? FinderUsername { get; set; }
/// <summary>
/// 获取或设置视频 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("feed_id")]
[System.Text.Json.Serialization.JsonPropertyName("feed_id")]
public string? FeedId { get; set; }
}
public class OfficialAccount
{
/// <summary>
/// 获取或设置公众号文章链接。
/// </summary>
[Newtonsoft.Json.JsonProperty("url")]
[System.Text.Json.Serialization.JsonPropertyName("url")]
public string? Url { get; set; }
}
}
/// <summary>
/// 获取或设置展示位类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("type")]
[System.Text.Json.Serialization.JsonPropertyName("type")]
public int Type { get; set; }
/// <summary>
/// 获取或设置展示位信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("banner")]
[System.Text.Json.Serialization.JsonPropertyName("banner")]
public Types.Banner Banner { get; set; } = new Types.Banner();
/// <summary>
/// 获取或设置商品信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("product")]
[System.Text.Json.Serialization.JsonPropertyName("product")]
public Types.Product? Product { get; set; }
/// <summary>
/// 获取或设置视频号信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("finder")]
[System.Text.Json.Serialization.JsonPropertyName("finder")]
public Types.Finder? Finder { get; set; }
/// <summary>
/// 获取或设置公众号信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("official_account")]
[System.Text.Json.Serialization.JsonPropertyName("official_account")]
public Types.OfficialAccount? OfficialAccount { get; set; }
}
}
/// <summary>
/// 获取或设置展示位列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("banner")]
[System.Text.Json.Serialization.JsonPropertyName("banner")]
public Types.BannerList BannerList { get; set; } = new Types.BannerList();
}
}

View File

@ -0,0 +1,16 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/banner/apply/submit 接口的响应。</para>
/// </summary>
public class ChannelsECBasicsHomepageBannerApplySubmitResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置申请 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("apply_id")]
[System.Text.Json.Serialization.JsonPropertyName("apply_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long ApplyId { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/banner/get 接口的请求。</para>
/// </summary>
public class ChannelsECBasicsHomepageBannerGetRequest : WechatApiRequest, IInferable<ChannelsECBasicsHomepageBannerGetRequest, ChannelsECBasicsHomepageBannerGetResponse>
{
}
}

View File

@ -0,0 +1,155 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/banner/get 接口的响应。</para>
/// </summary>
public class ChannelsECBasicsHomepageBannerGetResponse : WechatApiResponse
{
public static class Types
{
public class Apply
{
/// <summary>
/// 获取或设置申请 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("apply_id")]
[System.Text.Json.Serialization.JsonPropertyName("apply_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long ApplyId { get; set; }
/// <summary>
/// 获取或设置申请状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("state")]
[System.Text.Json.Serialization.JsonPropertyName("state")]
public int State { get; set; }
/// <summary>
/// 获取或设置展示样式。
/// </summary>
[Newtonsoft.Json.JsonProperty("scale")]
[System.Text.Json.Serialization.JsonPropertyName("scale")]
public int Scale { get; set; }
/// <summary>
/// 获取或设置展示位列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("banner")]
[System.Text.Json.Serialization.JsonPropertyName("banner")]
public ApplyBanner[] BannerList { get; set; } = default!;
}
public class ApplyBanner
{
/// <summary>
/// 获取或设置审核状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("audit_state")]
[System.Text.Json.Serialization.JsonPropertyName("audit_state")]
public int AuditState { get; set; }
/// <summary>
/// 获取或设置审核结果描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("audit_desc")]
[System.Text.Json.Serialization.JsonPropertyName("audit_desc")]
public string? AuditDescription { get; set; }
/// <summary>
/// 获取或设置展示位信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("banner")]
[System.Text.Json.Serialization.JsonPropertyName("banner")]
public BannerItem Banner { get; set; } = default!;
}
public class BannerList
{
/// <summary>
/// 获取或设置展示样式。
/// </summary>
[Newtonsoft.Json.JsonProperty("scale")]
[System.Text.Json.Serialization.JsonPropertyName("scale")]
public int Scale { get; set; }
/// <summary>
/// 获取或设置展示位列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("banner")]
[System.Text.Json.Serialization.JsonPropertyName("banner")]
public BannerItem[] Items { get; set; } = default!;
}
public class BannerItem
{
public static class Types
{
public class Banner : ChannelsECBasicsHomepageBannerApplySubmitRequest.Types.BannerItem.Types.Banner
{
}
public class Product : ChannelsECBasicsHomepageBannerApplySubmitRequest.Types.BannerItem.Types.Product
{
}
public class Finder : ChannelsECBasicsHomepageBannerApplySubmitRequest.Types.BannerItem.Types.Finder
{
}
public class OfficialAccount : ChannelsECBasicsHomepageBannerApplySubmitRequest.Types.BannerItem.Types.OfficialAccount
{
}
}
/// <summary>
/// 获取或设置展示位类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("type")]
[System.Text.Json.Serialization.JsonPropertyName("type")]
public int Type { get; set; }
/// <summary>
/// 获取或设置展示位信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("banner")]
[System.Text.Json.Serialization.JsonPropertyName("banner")]
public Types.Banner Banner { get; set; } = default!;
/// <summary>
/// 获取或设置商品信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("product")]
[System.Text.Json.Serialization.JsonPropertyName("product")]
public Types.Product? Product { get; set; }
/// <summary>
/// 获取或设置视频号信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("finder")]
[System.Text.Json.Serialization.JsonPropertyName("finder")]
public Types.Finder? Finder { get; set; }
/// <summary>
/// 获取或设置公众号信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("official_account")]
[System.Text.Json.Serialization.JsonPropertyName("official_account")]
public Types.OfficialAccount? OfficialAccount { get; set; }
}
}
/// <summary>
/// 获取或设置当前生效的展示位列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("banner")]
[System.Text.Json.Serialization.JsonPropertyName("banner")]
public Types.BannerList BannerList { get; set; } = default!;
/// <summary>
/// 获取或设置最近一次申请信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("apply")]
[System.Text.Json.Serialization.JsonPropertyName("apply")]
public Types.Apply? Apply { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/banner/remove 接口的请求。</para>
/// </summary>
public class ChannelsECBasicsHomepageBannerRemoveRequest : WechatApiRequest, IInferable<ChannelsECBasicsHomepageBannerRemoveRequest, ChannelsECBasicsHomepageBannerRemoveResponse>
{
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/basics/homepage/banner/remove 接口的响应。</para>
/// </summary>
public class ChannelsECBasicsHomepageBannerRemoveResponse : WechatApiResponse
{
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/classification/tree/get 接口的请求。</para>
/// </summary>
public class ChannelsECStoreClassificationTreeGetRequest : WechatApiRequest, IInferable<ChannelsECStoreClassificationTreeGetRequest, ChannelsECStoreClassificationTreeGetResponse>
{
}
}

View File

@ -0,0 +1,88 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/classification/tree/get 接口的响应。</para>
/// </summary>
public class ChannelsECStoreClassificationTreeGetResponse : WechatApiResponse
{
public static class Types
{
public class Data
{
public static class Types
{
public class ClassificationTree
{
/// <summary>
/// 获取或设置一级分类节点信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("level_1")]
[System.Text.Json.Serialization.JsonPropertyName("level_1")]
public Level1ClassificationTreeNode[] Level1Nodes { get; set; } = default!;
}
public abstract class ClassificationTreeNode
{
/// <summary>
/// 获取或设置分类 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public long Id { get; set; }
/// <summary>
/// 获取或设置分类名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("name")]
[System.Text.Json.Serialization.JsonPropertyName("name")]
public string Name { get; set; } = default!;
/// <summary>
/// 获取或设置是否在用户端展示。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_displayed")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("is_displayed")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool IsDisplayed { get; set; }
}
public class Level1ClassificationTreeNode : ClassificationTreeNode
{
/// <summary>
/// 获取或设置二级分类节点信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("level_2")]
[System.Text.Json.Serialization.JsonPropertyName("level_2")]
public Level2ClassificationTreeNode[] Level2Nodes { get; set; } = default!;
}
public class Level2ClassificationTreeNode : ClassificationTreeNode
{
}
}
/// <summary>
/// 获取或设置版本号。
/// </summary>
[Newtonsoft.Json.JsonProperty("version")]
[System.Text.Json.Serialization.JsonPropertyName("version")]
public int Version { get; set; }
/// <summary>
/// 获取或设置分类树形结构数据。
/// </summary>
[Newtonsoft.Json.JsonProperty("tree")]
[System.Text.Json.Serialization.JsonPropertyName("tree")]
public Types.ClassificationTree ClassificationTree { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置响应数据。
/// </summary>
[Newtonsoft.Json.JsonProperty("resp")]
[System.Text.Json.Serialization.JsonPropertyName("resp")]
public Types.Data Data { get; set; } = default!;
}
}

View File

@ -0,0 +1,44 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/classification/tree/product/add 接口的请求。</para>
/// </summary>
public class ChannelsECStoreClassificationTreeProductAddRequest : WechatApiRequest, IInferable<ChannelsECStoreClassificationTreeProductAddRequest, ChannelsECStoreClassificationTreeProductAddResponse>
{
public static class Types
{
public class Data
{
/// <summary>
/// 获取或设置一级分类 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("level_1_id")]
[System.Text.Json.Serialization.JsonPropertyName("level_1_id")]
public long Level1ClassificationId { get; set; }
/// <summary>
/// 获取或设置二级分类 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("level_2_id")]
[System.Text.Json.Serialization.JsonPropertyName("level_2_id")]
public long Level2ClassificationId { get; set; }
/// <summary>
/// 获取或设置商品 ID 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_ids")]
[System.Text.Json.Serialization.JsonPropertyName("product_ids")]
public IList<long> ProductIdList { get; set; } = new List<long>();
}
}
/// <summary>
/// 获取或设置请求数据。
/// </summary>
[Newtonsoft.Json.JsonProperty("req")]
[System.Text.Json.Serialization.JsonPropertyName("req")]
public Types.Data Data { get; set; } = new Types.Data();
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/classification/tree/product/add 接口的响应。</para>
/// </summary>
public class ChannelsECStoreClassificationTreeProductAddResponse : WechatApiResponse
{
}
}

View File

@ -0,0 +1,24 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/classification/tree/product/del 接口的请求。</para>
/// </summary>
public class ChannelsECStoreClassificationTreeProductDeleteRequest : WechatApiRequest, IInferable<ChannelsECStoreClassificationTreeProductDeleteRequest, ChannelsECStoreClassificationTreeProductDeleteResponse>
{
public static class Types
{
public class Data : ChannelsECStoreClassificationTreeProductAddRequest.Types.Data
{
}
}
/// <summary>
/// 获取或设置请求数据。
/// </summary>
[Newtonsoft.Json.JsonProperty("req")]
[System.Text.Json.Serialization.JsonPropertyName("req")]
public Types.Data Data { get; set; } = new Types.Data();
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/classification/tree/product/del 接口的响应。</para>
/// </summary>
public class ChannelsECStoreClassificationTreeProductDeleteResponse : WechatApiResponse
{
}
}

View File

@ -0,0 +1,50 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/classification/tree/product/get 接口的请求。</para>
/// </summary>
public class ChannelsECStoreClassificationTreeProductGetRequest : WechatApiRequest, IInferable<ChannelsECStoreClassificationTreeProductGetRequest, ChannelsECStoreClassificationTreeProductGetResponse>
{
public static class Types
{
public class Data
{
/// <summary>
/// 获取或设置一级分类 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("level_1_id")]
[System.Text.Json.Serialization.JsonPropertyName("level_1_id")]
public long Level1ClassificationId { get; set; }
/// <summary>
/// 获取或设置二级分类 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("level_2_id")]
[System.Text.Json.Serialization.JsonPropertyName("level_2_id")]
public long Level2ClassificationId { get; set; }
/// <summary>
/// 获取或设置分页每页数量。
/// <para>默认值10</para>
/// </summary>
[Newtonsoft.Json.JsonProperty("page_size")]
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
public int Limit { get; set; } = 10;
/// <summary>
/// 获取或设置分页游标。
/// </summary>
[Newtonsoft.Json.JsonProperty("page_context")]
[System.Text.Json.Serialization.JsonPropertyName("page_context")]
public string? Cursor { get; set; }
}
}
/// <summary>
/// 获取或设置请求数据。
/// </summary>
[Newtonsoft.Json.JsonProperty("req")]
[System.Text.Json.Serialization.JsonPropertyName("req")]
public Types.Data Data { get; set; } = new Types.Data();
}
}

View File

@ -0,0 +1,42 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/classification/tree/product/get 接口的响应。</para>
/// </summary>
public class ChannelsECStoreClassificationTreeProductGetResponse : WechatApiResponse
{
public static class Types
{
public class Data
{
/// <summary>
/// 获取或设置商品 ID 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_ids")]
[System.Text.Json.Serialization.JsonPropertyName("product_ids")]
public long[] ProductIdList { get; set; } = default!;
/// <summary>
/// 获取或设置总数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_count")]
[System.Text.Json.Serialization.JsonPropertyName("total_count")]
public int TotalCount { get; set; }
/// <summary>
/// 获取或设置下一页分页游标。
/// </summary>
[Newtonsoft.Json.JsonProperty("page_context")]
[System.Text.Json.Serialization.JsonPropertyName("page_context")]
public string? NextCursor { get; set; }
}
}
/// <summary>
/// 获取或设置响应数据。
/// </summary>
[Newtonsoft.Json.JsonProperty("resp")]
[System.Text.Json.Serialization.JsonPropertyName("resp")]
public Types.Data Data { get; set; } = default!;
}
}

View File

@ -0,0 +1,97 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/classification/tree/set 接口的请求。</para>
/// </summary>
public class ChannelsECStoreClassificationTreeSetRequest : WechatApiRequest, IInferable<ChannelsECStoreClassificationTreeSetRequest, ChannelsECStoreClassificationTreeSetResponse>
{
public static class Types
{
public class Data
{
public static class Types
{
public class ClassificationTree
{
/// <summary>
/// 获取或设置一级分类节点信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("level_1")]
[System.Text.Json.Serialization.JsonPropertyName("level_1")]
public IList<Level1ClassificationTreeNode> Level1Nodes { get; set; } = new List<Level1ClassificationTreeNode>();
}
public abstract class ClassificationTreeNode
{
/// <summary>
/// 获取或设置分类 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public long Id { get; set; }
/// <summary>
/// 获取或设置分类名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("name")]
[System.Text.Json.Serialization.JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
/// <summary>
/// 获取或设置是否在用户端展示。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_displayed")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("is_displayed")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool IsDisplayed { get; set; }
}
public class Level1ClassificationTreeNode : ClassificationTreeNode
{
/// <summary>
/// 获取或设置二级分类节点信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("level_2")]
[System.Text.Json.Serialization.JsonPropertyName("level_2")]
public IList<Level2ClassificationTreeNode> Level2Nodes { get; set; } = new List<Level2ClassificationTreeNode>();
}
public class Level2ClassificationTreeNode : ClassificationTreeNode
{
}
}
/// <summary>
/// 获取或设置版本号。
/// </summary>
[Newtonsoft.Json.JsonProperty("version")]
[System.Text.Json.Serialization.JsonPropertyName("version")]
public int Version { get; set; }
/// <summary>
/// 获取或设置分类树形结构数据。
/// </summary>
[Newtonsoft.Json.JsonProperty("tree")]
[System.Text.Json.Serialization.JsonPropertyName("tree")]
public Types.ClassificationTree ClassificationTree { get; set; } = new Types.ClassificationTree();
/// <summary>
/// 获取或设置清空关联的分类 ID 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("classification_id_deleted")]
[System.Text.Json.Serialization.JsonPropertyName("classification_id_deleted")]
public IList<string> DeletedClassificationIdList { get; set; } = new List<string>();
}
}
/// <summary>
/// 获取或设置请求数据。
/// </summary>
[Newtonsoft.Json.JsonProperty("req")]
[System.Text.Json.Serialization.JsonPropertyName("req")]
public Types.Data Data { get; set; } = new Types.Data();
}
}

View File

@ -0,0 +1,55 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/classification/tree/set 接口的响应。</para>
/// </summary>
public class ChannelsECStoreClassificationTreeSetResponse : WechatApiResponse
{
public static class Types
{
public class Data
{
public static class Types
{
public class AuditResult
{
/// <summary>
/// 获取或设置分类 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("level_id")]
[System.Text.Json.Serialization.JsonPropertyName("level_id")]
public long ClassificationId { get; set; }
/// <summary>
/// 获取或设置审核结果。
/// </summary>
[Newtonsoft.Json.JsonProperty("result_code")]
[System.Text.Json.Serialization.JsonPropertyName("result_code")]
public int ResultCode { get; set; }
}
}
/// <summary>
/// 获取或设置版本号。
/// </summary>
[Newtonsoft.Json.JsonProperty("version")]
[System.Text.Json.Serialization.JsonPropertyName("version")]
public int Version { get; set; }
/// <summary>
/// 获取或设置审核结果列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("audit_results")]
[System.Text.Json.Serialization.JsonPropertyName("audit_results")]
public Types.AuditResult[] AuditResultList { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置响应数据。
/// </summary>
[Newtonsoft.Json.JsonProperty("resp")]
[System.Text.Json.Serialization.JsonPropertyName("resp")]
public Types.Data Data { get; set; } = default!;
}
}

View File

@ -0,0 +1,24 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/window/product/hide 接口的请求。</para>
/// </summary>
public class ChannelsECStoreWindowProductHideRequest : WechatApiRequest, IInferable<ChannelsECStoreWindowProductHideRequest, ChannelsECStoreWindowProductHideResponse>
{
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置是否隐藏。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_set_hide")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("is_set_hide")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool IsSetHide { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/window/product/hide 接口的响应。</para>
/// </summary>
public class ChannelsECStoreWindowProductHideResponse : WechatApiResponse
{
}
}

View File

@ -0,0 +1,23 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/window/product/list/get 接口的请求。</para>
/// </summary>
public class ChannelsECStoreWindowProductListGetRequest : WechatApiRequest, IInferable<ChannelsECStoreWindowProductListGetRequest, ChannelsECStoreWindowProductListGetResponse>
{
/// <summary>
/// 获取或设置分页每页数量。
/// <para>默认值10</para>
/// </summary>
[Newtonsoft.Json.JsonProperty("page_size")]
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
public int Limit { get; set; } = 10;
/// <summary>
/// 获取或设置分页游标。
/// </summary>
[Newtonsoft.Json.JsonProperty("next_key")]
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
public string? Cursor { get; set; }
}
}

View File

@ -0,0 +1,61 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/window/product/list/get 接口的响应。</para>
/// </summary>
public class ChannelsECStoreWindowProductListGetResponse : WechatApiResponse
{
public static class Types
{
public class Product
{
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置是否隐藏。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_set_hide")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("is_set_hide")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool IsSetHide { get; set; }
/// <summary>
/// 获取或设置是否置顶。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_set_top")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("is_set_top")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool IsSetTop { get; set; }
}
}
/// <summary>
/// 获取或设置商品列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("products")]
[System.Text.Json.Serialization.JsonPropertyName("products")]
public Types.Product[] ProductList { get; set; } = default!;
/// <summary>
/// 获取或设置总数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_num")]
[System.Text.Json.Serialization.JsonPropertyName("total_num")]
public int TotalCount { get; set; }
/// <summary>
/// 获取或设置下一页分页游标。
/// </summary>
[Newtonsoft.Json.JsonProperty("next_key")]
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
public string? NextCursor { get; set; }
}
}

View File

@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/window/product/reorder 接口的请求。</para>
/// </summary>
public class ChannelsECStoreWindowProductReorderRequest : WechatApiRequest, IInferable<ChannelsECStoreWindowProductReorderRequest, ChannelsECStoreWindowProductReorderResponse>
{
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置商品序号。
/// </summary>
[Newtonsoft.Json.JsonProperty("index_num")]
[System.Text.Json.Serialization.JsonPropertyName("index_num")]
public int IndexNumber { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/window/product/reorder 接口的响应。</para>
/// </summary>
public class ChannelsECStoreWindowProductReorderResponse : WechatApiResponse
{
}
}

View File

@ -0,0 +1,24 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/window/product/settop 接口的请求。</para>
/// </summary>
public class ChannelsECStoreWindowProductSetTopRequest : WechatApiRequest, IInferable<ChannelsECStoreWindowProductSetTopRequest, ChannelsECStoreWindowProductSetTopResponse>
{
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置是否置顶。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_set_top")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("is_set_top")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
public bool IsSetTop { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/store/window/product/settop 接口的响应。</para>
/// </summary>
public class ChannelsECStoreWindowProductSetTopResponse : WechatApiResponse
{
}
}

View File

@ -15,7 +15,7 @@
<PackageProjectUrl>https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat</PackageProjectUrl>
<PackageTags>Flurl.Http Wechat Weixin MicroMessage MiniProgram MiniGame MiniStore 微信 公众号 服务号 订阅号 小程序 小游戏 小商店 视频号 公众平台 开放平台 微信公众号 微信服务号 微信订阅号 微信小程序 微信小游戏 微信小商店 微信视频号 微信公众平台 微信开放平台</PackageTags>
<Version>3.5.0</Version>
<Description>基于 Flurl.Http 的微信 API 客户端支持公众平台订阅号、服务号、小程序、小游戏、小商店、视频号、开放平台等平台支持基础服务、模板消息、订阅消息、客服消息、动态消息、菜单管理、素材管理、留言管理、用户管理、账号管理、草稿箱、发布能力、数据统计、微信门店、微信小店、视频号小店、智能接口、一物一码、微信发票、微信非税缴费、插件管理、附近的小程序、小程序码、小程序搜索、URL Scheme、URL Link、即时配送、物流助手、直播、生物认证、虚拟支付、开放数据、对局匹配、帧同步、内容安全、安全风控、交易组件、小程序联盟、第三方平台、服务平台、视频号小店等功能。</Description>
<Description>基于 Flurl.Http 的微信 API 客户端支持公众平台订阅号、服务号、小程序、小游戏、小商店、视频号、开放平台等平台支持基础服务、模板消息、订阅消息、客服消息、动态消息、菜单管理、素材管理、留言管理、用户管理、账号管理、草稿箱、发布能力、数据统计、微信门店、微信小店、视频号小店、智能接口、一物一码、微信发票、微信非税缴费、插件管理、附近的小程序、小程序码、小程序搜索、URL Scheme、URL Link、即时配送、物流助手、直播、生物认证、虚拟支付、开放数据、对局匹配、帧同步、内容安全、安全风控、交易组件、小程序联盟、第三方平台、服务平台等功能。</Description>
<Authors>Fu Diwei</Authors>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git</RepositoryUrl>

View File

@ -0,0 +1,11 @@
{
"errcode": 0,
"errmsg": "ok",
"img_url": "https://mmecimage.cn/p/abc",
"apply": {
"apply_id": 123,
"state": 2,
"audit_desc": "图片不合规",
"img_url": "https://mmecimage.cn/p/xyz"
}
}

View File

@ -0,0 +1,41 @@
{
"banner": {
"scale": 2,
"banner": [
{
"type": 1,
"product": {
"product_id": 123
},
"banner": {
"description": "测试商品精品展示位描述",
"img_url": "https://store.mp.video.tencent-cloud.com/abc",
"title": "测试商品精品展示位标题"
}
},
{
"type": 3,
"finder": {
"feed_id": "export/abc",
"finder_user_name": "sphabc"
},
"banner": {
"description": "测试视频号视频精品展示位描述",
"img_url": "https://store.mp.video.tencent-cloud.com/abc",
"title": "测试视频号视频精品展示位标题"
}
},
{
"type": 4,
"official_account": {
"url": "https://mp.weixin.qq.com/abc"
},
"banner": {
"description": "测试公众号文章精品展示位描述",
"img_url": "https://store.mp.video.tencent-cloud.com/abc",
"title": "测试公众号文章精品展示位标题"
}
}
]
}
}

View File

@ -0,0 +1,96 @@
{
"errcode": 0,
"errmsg": "ok",
"banner": {
"scale": 2,
"banner": [
{
"type": 1,
"product": {
"product_id": 123
},
"banner": {
"img_url": "https://store.mp.video.tencent-cloud.com/abc",
"title": "测试商品展示位标题",
"description": "测试商品展示位描述"
}
},
{
"type": 3,
"finder": {
"finder_user_name": "sphabc",
"feed_id": "export/abc"
},
"banner": {
"img_url": "https://store.mp.video.tencent-cloud.com/bcd",
"title": "测试视频号视频展示位标题",
"description": "测试视频号视频展示位描述"
}
},
{
"type": 4,
"official_account": {
"url": "http://mp.weixin.qq.com/abc"
},
"banner": {
"img_url": "https://store.mp.video.tencent-cloud.com/cde",
"title": "测试公众号文章展示位标题",
"description": "测试公众号文章展示位描述"
}
}
]
},
"apply": {
"apply_id": 123,
"state": 2,
"scale": 2,
"banner": [
{
"audit_state": 1,
"audit_desc": "图片不合规",
"banner": {
"type": 1,
"product": {
"product_id": 456
},
"banner": {
"img_url": "https://store.mp.video.tencent-cloud.com/xyz",
"title": "测试商品展示位标题",
"description": "测试商品展示位描述"
}
}
},
{
"audit_state": 1,
"audit_desc": "图片不合规",
"banner": {
"type": 4,
"official_account": {
"url": "http://mp.weixin.qq.com/xyz"
},
"banner": {
"img_url": "https://store.mp.video.tencent-cloud.com/wxy",
"title": "测试公众号文章展示位标题",
"description": "测试公众号文章展示位描述"
}
}
},
{
"audit_state": 1,
"audit_desc": "图片不合规",
"banner": {
"type": 3,
"finder": {
"finder_user_name": "sphxyz",
"feed_id": "export/xyz"
},
"banner": {
"img_url": "https://store.mp.video.tencent-cloud.com/vwx",
"title": "测试视频号视频标题",
"description": "测试视频号视频描述"
}
}
}
]
}
}

View File

@ -0,0 +1,40 @@
{
"errcode": 0,
"errmsg": "ok",
"resp": {
"tree": {
"level_1": [
{
"id": 4,
"name": "测试7",
"level_2": [
{
"id": 5,
"name": "1",
"is_displayed": true
}
],
"is_displayed": true
},
{
"id": 6,
"name": "测试8",
"level_2": [
{
"id": 7,
"name": "1",
"is_displayed": true
},
{
"id": 8,
"name": "2",
"is_displayed": true
}
],
"is_displayed": true
}
]
},
"version": 122
}
}

View File

@ -0,0 +1,7 @@
{
"req": {
"level_1_id": 1,
"level_2_id": 0,
"product_ids": []
}
}

View File

@ -0,0 +1,7 @@
{
"req": {
"level_1_id": 1,
"level_2_id": 0,
"product_ids": []
}
}

View File

@ -0,0 +1,8 @@
{
"req": {
"level_1_id": 1,
"level_2_id": 0,
"page_size": 5,
"page_context": ""
}
}

View File

@ -0,0 +1,9 @@
{
"errcode": 0,
"errmsg": "ok",
"resp": {
"product_ids": [],
"total_count": 0,
"page_context": ""
}
}

View File

@ -0,0 +1,41 @@
{
"req": {
"version": 121,
"classification_id_deleted": [
"1.2"
],
"tree": {
"level_1": [
{
"id": 4,
"name": "测试7",
"level_2": [
{
"id": 5,
"name": "1",
"is_displayed": 1
}
],
"is_displayed": 1
},
{
"id": 6,
"name": "测试8",
"level_2": [
{
"id": 7,
"name": "1",
"is_displayed": 1
},
{
"id": 8,
"name": "2",
"is_displayed": 1
}
],
"is_displayed": 1
}
]
}
}
}

View File

@ -0,0 +1,29 @@
{
"errcode": 0,
"errmsg": "ok",
"resp": {
"version": 123,
"audit_results": [
{
"level_id": 4,
"result_code": 2
},
{
"level_id": 5,
"result_code": 2
},
{
"level_id": 6,
"result_code": 2
},
{
"level_id": 7,
"result_code": 2
},
{
"level_id": 8,
"result_code": 2
}
]
}
}

View File

@ -0,0 +1,4 @@
{
"product_id": "1234567002",
"is_set_hide": 1
}

View File

@ -0,0 +1,4 @@
{
"page_size": 10,
"next_key": "THE_NEXT_KEY"
}

View File

@ -0,0 +1,18 @@
{
"errcode": 0,
"errmsg": "ok",
"products": [
{
"product_id": "1234567001",
"is_set_hide": 0,
"is_set_top": 0
},
{
"product_id": "1234567002",
"is_set_hide": 0,
"is_set_top": 0
}
],
"next_key": "THE_NEXT_KEY_NEW",
"total_num": 100
}

View File

@ -0,0 +1,4 @@
{
"product_id": "1234567002",
"index_num": 1
}

View File

@ -0,0 +1,4 @@
{
"product_id": "1234567002",
"is_set_top": 1
}