feat(wxapi): 新增微信小店带货助手相关接口

This commit is contained in:
Fu Diwei 2025-05-06 21:01:51 +08:00
parent 9fbfcdc8c4
commit 4e20bc9515
21 changed files with 756 additions and 5 deletions

View File

@ -18,7 +18,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
/// <![CDATA[ https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/access-token/auth.getAccessToken.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/basics/getaccesstoken.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/windowproduct/getaccesstoken.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/basics/getaccesstoken.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/basics/getaccesstoken.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/talent/openapi/basics/getaccesstoken.html ]]> <br/>
/// <![CDATA[ https://dev.weixin.qq.com/docs/framework/dev/openapi/getaccesstoken.html ]]>
/// </para>
/// </summary>
@ -47,7 +48,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
/// <![CDATA[ https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/getStableAccessToken.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/mp-access-token/getStableAccessToken.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/access-token/auth.getStableAccessToken.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/basics/getStableAccessToken.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/basics/getStableAccessToken.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/basics/getStableAccessToken.html ]]>
/// </para>
/// </summary>

View File

@ -17,7 +17,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
/// <![CDATA[ https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/openapi/clearQuota.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/openApi-mgnt/clearQuota.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/apimgnt/clearQuota.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/apimgnt/clearQuota.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/apimgnt/clearQuota.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/talent/openapi/apimgnt/clearQuota.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
@ -45,7 +46,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/offiaccount/openApi/clearQuotaByAppSecret.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/apimgnt/clearQuotaByAppSecret.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/apimgnt/clearQuotaByAppSecret.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/apimgnt/clearQuotaByAppSecret.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/talent/openapi/apimgnt/clearQuotaByAppSecret.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
@ -79,7 +81,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
/// <![CDATA[ https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/openapi/getApiQuota.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/openApi-mgnt/getApiQuota.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/apimgnt/getApiQuota.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/apimgnt/getApiQuota.html ]]>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/apimgnt/getApiQuota.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/talent/openapi/apimgnt/getApiQuota.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
@ -98,6 +101,32 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
return await client.SendFlurlRequestAsJsonAsync<Models.CgibinOpenApiQuotaGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /cgi-bin/openapi/quota/clear 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/apimgnt/clearApiQuota.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/apimgnt/clearApiQuota.html ]]> <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/talent/openapi/apimgnt/clearApiQuota.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.CgibinOpenApiQuotaClearResponse> ExecuteCgibinOpenApiQuotaClearAsync(this WechatApiClient client, Models.CgibinOpenApiQuotaClearRequest 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, "cgi-bin", "openapi", "quota", "clear")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.CgibinOpenApiQuotaClearResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /cgi-bin/openapi/rid/get 接口。</para>
/// <para>

View File

@ -5856,6 +5856,104 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
#endregion
#endregion
#region ECTalent
#region ECTalent/Order
/// <summary>
/// <para>异步调用 [POST] /channels/ec/talent/get_order_list 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/talent/openapi/order/get_order_list.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECTalentGetOrderListResponse> ExecuteChannelsECTalentGetOrderListAsync(this WechatApiClient client, Models.ChannelsECTalentGetOrderListRequest 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", "talent", "get_order_list")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECTalentGetOrderListResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/talent/get_order_detail 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/talent/openapi/order/get_order_detail.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECTalentGetOrderDetailResponse> ExecuteChannelsECTalentGetOrderDetailAsync(this WechatApiClient client, Models.ChannelsECTalentGetOrderDetailRequest 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", "talent", "get_order_detail")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECTalentGetOrderDetailResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
#endregion
#region ECTalent/Window
/// <summary>
/// <para>异步调用 [POST] /channels/ec/talent/window/product/list/get 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/talent/openapi/window/get_product_list.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECTalentWindowProductListGetResponse> ExecuteChannelsECTalentWindowProductListGetAsync(this WechatApiClient client, Models.ChannelsECTalentWindowProductListGetRequest 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", "talent", "window", "product", "list", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECTalentWindowProductListGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/talent/window/product/get 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/talent/openapi/window/get_product_detail.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECTalentWindowProductGetResponse> ExecuteChannelsECTalentWindowProductGetAsync(this WechatApiClient client, Models.ChannelsECTalentWindowProductGetRequest 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", "talent", "window", "product", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECTalentWindowProductGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
#endregion
#endregion
#region ECVoucher
#region ECVoucher/Bill
/// <summary>

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/openapi/quota/clear 接口的请求。</para>
/// </summary>
public class CgibinOpenApiQuotaClearRequest : WechatApiRequest, IInferable<CgibinOpenApiQuotaClearRequest, CgibinOpenApiQuotaClearResponse>
{
/// <summary>
/// 获取或设置 API 请求地址。
/// </summary>
[Newtonsoft.Json.JsonProperty("cgi_path")]
[System.Text.Json.Serialization.JsonPropertyName("cgi_path")]
public string CgiPath { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/openapi/quota/clear 接口的响应。</para>
/// </summary>
public class CgibinOpenApiQuotaClearResponse : WechatApiResponse
{
}
}

View File

@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/talent/get_order_detail 接口的请求。</para>
/// </summary>
public class ChannelsECTalentGetOrderDetailRequest : WechatApiRequest, IInferable<ChannelsECTalentGetOrderDetailRequest, ChannelsECTalentGetOrderDetailResponse>
{
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_id")]
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
public string OrderId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
public long SKUId { get; set; }
}
}

View File

@ -0,0 +1,182 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/talent/get_order_detail 接口的响应。</para>
/// </summary>
public class ChannelsECTalentGetOrderDetailResponse : WechatApiResponse
{
public static class Types
{
public class BaseInfo
{
public static class Types
{
public class BuyerInfo
{
/// <summary>
/// 获取或设置用户 OpenId。
/// </summary>
[Newtonsoft.Json.JsonProperty("open_id")]
[System.Text.Json.Serialization.JsonPropertyName("open_id")]
public string OpenId { get; set; } = default!;
/// <summary>
/// 获取或设置用户 UnionId。
/// </summary>
[Newtonsoft.Json.JsonProperty("union_id")]
[System.Text.Json.Serialization.JsonPropertyName("union_id")]
public string? UnionId { get; set; }
}
}
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_id")]
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
public string OrderId { get; set; } = default!;
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("spu_id")]
[System.Text.Json.Serialization.JsonPropertyName("spu_id")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
public long SKUId { get; set; }
/// <summary>
/// 获取或设置订单状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_status")]
[System.Text.Json.Serialization.JsonPropertyName("order_status")]
public int OrderStatus { get; set; }
/// <summary>
/// 获取或设置实际支付金额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("actual_payment")]
[System.Text.Json.Serialization.JsonPropertyName("actual_payment")]
public string ActualPayment { get; set; } = default!;
/// <summary>
/// 获取或设置订单创建时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_create_time")]
[System.Text.Json.Serialization.JsonPropertyName("order_create_time")]
public long OrderCreateTimestamp { get; set; }
/// <summary>
/// 获取或设置订单更新时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_update_time")]
[System.Text.Json.Serialization.JsonPropertyName("order_update_time")]
public long OrderUpdateTimestamp { get; set; }
/// <summary>
/// 获取或设置买家信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("buyer_info")]
[System.Text.Json.Serialization.JsonPropertyName("buyer_info")]
public Types.BuyerInfo BuyerInfo { get; set; } = default!;
}
public class CommissionInfo
{
/// <summary>
/// 获取或设置佣金单状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("state")]
[System.Text.Json.Serialization.JsonPropertyName("state")]
public int State { get; set; }
/// <summary>
/// 获取或设置佣金费率(单位:万分数)。
/// </summary>
[Newtonsoft.Json.JsonProperty("ratio")]
[System.Text.Json.Serialization.JsonPropertyName("ratio")]
public string Ratio { get; set; } = default!;
/// <summary>
/// 获取或设置预计结算时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("expect_settle_time")]
[System.Text.Json.Serialization.JsonPropertyName("expect_settle_time")]
public long ExpectedSettleTimestamp { get; set; }
/// <summary>
/// 获取或设置预计结算金额(单位:元)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expect_settlement")]
[System.Text.Json.Serialization.JsonPropertyName("expect_settlement")]
public string ExpectedSettlementString { get; set; } = default!;
/// <summary>
/// 获取或设置实际结算时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("actual_settle_time")]
[System.Text.Json.Serialization.JsonPropertyName("actual_settle_time")]
public long? ActualSettleTimestamp { get; set; }
/// <summary>
/// 获取或设置实际结算金额(单位:元)。
/// </summary>
[Newtonsoft.Json.JsonProperty("actual_settlement")]
[System.Text.Json.Serialization.JsonPropertyName("actual_settlement")]
public string? ActualSettlementString { get; set; }
}
public class ChannelInfo
{
/// <summary>
/// 获取或设置渠道类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("channel_type")]
[System.Text.Json.Serialization.JsonPropertyName("channel_type")]
public int ChannelType { get; set; }
/// <summary>
/// 获取或设置渠道 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("channel_id")]
[System.Text.Json.Serialization.JsonPropertyName("channel_id")]
public string AppId { get; set; } = default!;
/// <summary>
/// 获取或设置渠道名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("channel_name")]
[System.Text.Json.Serialization.JsonPropertyName("channel_name")]
public string Name { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置基础信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("base_info")]
[System.Text.Json.Serialization.JsonPropertyName("base_info")]
public Types.BaseInfo BaseInfo { get; set; } = default!;
/// <summary>
/// 获取或设置佣金信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("commission_info")]
[System.Text.Json.Serialization.JsonPropertyName("commission_info")]
public Types.CommissionInfo CommissionInfo { get; set; } = default!;
/// <summary>
/// 获取或设置视频号信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("channel_info")]
[System.Text.Json.Serialization.JsonPropertyName("channel_info")]
public Types.ChannelInfo ChannelInfo { get; set; } = default!;
}
}

View File

@ -0,0 +1,44 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/talent/get_order_list 接口的请求。</para>
/// </summary>
public class ChannelsECTalentGetOrderListRequest : WechatApiRequest, IInferable<ChannelsECTalentGetOrderListRequest, ChannelsECTalentGetOrderListResponse>
{
/// <summary>
/// 获取或设置佣金单创建时间范围的开始时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("create_time_gt")]
[System.Text.Json.Serialization.JsonPropertyName("create_time_gt")]
public long? StartCreateTimestamp { get; set; }
/// <summary>
/// 获取或设置佣金单创建时间范围的结束时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("create_time_lt")]
[System.Text.Json.Serialization.JsonPropertyName("create_time_lt")]
public long? EndCreateTimestamp { get; set; }
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_id")]
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
public string? OrderId { 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("next_key")]
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
public string? Cursor { get; set; }
}
}

View File

@ -0,0 +1,51 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/talent/get_order_list 接口的响应。</para>
/// </summary>
public class ChannelsECTalentGetOrderListResponse : WechatApiResponse
{
public static class Types
{
public class Order
{
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_id")]
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))]
public string OrderId { get; set; } = default!;
/// <summary>
/// 获取或设置 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
public long SKUId { get; set; }
}
}
/// <summary>
/// 获取或设置订单列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_list")]
[System.Text.Json.Serialization.JsonPropertyName("order_list")]
public Types.Order[] OrderList { get; set; } = default!;
/// <summary>
/// 获取或设置是否还有更多。
/// </summary>
[Newtonsoft.Json.JsonProperty("has_more")]
[System.Text.Json.Serialization.JsonPropertyName("has_more")]
public bool HasMore { 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,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/talent/window/product/get 接口的请求。</para>
/// </summary>
public class ChannelsECTalentWindowProductGetRequest : WechatApiRequest, IInferable<ChannelsECTalentWindowProductGetRequest, ChannelsECTalentWindowProductGetResponse>
{
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
}
}

View File

@ -0,0 +1,107 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/talent/window/product/get 接口的响应。</para>
/// </summary>
public class ChannelsECTalentWindowProductGetResponse : 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.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置店铺 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public string? AppId { get; set; }
/// <summary>
/// 获取或设置商家自定义商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("out_product_id")]
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
public string? OutProductId { get; set; }
/// <summary>
/// 获取或设置商品标题。
/// </summary>
[Newtonsoft.Json.JsonProperty("title")]
[System.Text.Json.Serialization.JsonPropertyName("title")]
public string Title { get; set; } = default!;
/// <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("leaf_category_id")]
[System.Text.Json.Serialization.JsonPropertyName("leaf_category_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long CategoryId { get; set; }
/// <summary>
/// 获取或设置商品状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
public int Status { get; set; }
/// <summary>
/// 获取或设置售价(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("selling_price")]
[System.Text.Json.Serialization.JsonPropertyName("selling_price")]
public int SellingPrice { get; set; }
/// <summary>
/// 获取或设置库存。
/// </summary>
[Newtonsoft.Json.JsonProperty("stock")]
[System.Text.Json.Serialization.JsonPropertyName("stock")]
public int Stock { get; set; }
/// <summary>
/// 获取或设置销量。
/// </summary>
[Newtonsoft.Json.JsonProperty("sales")]
[System.Text.Json.Serialization.JsonPropertyName("sales")]
public int Sales { get; set; }
/// <summary>
/// 获取或设置是否隐藏。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_hide")]
[System.Text.Json.Serialization.JsonPropertyName("is_hide")]
public bool IsHidden { get; set; }
/// <summary>
/// 获取或设置商品小程序跳转小店场景添加商品时传递的跟佣信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_promotion_link")]
[System.Text.Json.Serialization.JsonPropertyName("product_promotion_link")]
public string? ProductPromotionLink { get; set; }
}
}
/// <summary>
/// 获取或设置商品信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("product")]
[System.Text.Json.Serialization.JsonPropertyName("product")]
public Types.Product Product { get; set; } = default!;
}
}

View File

@ -0,0 +1,30 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/talent/window/product/list/get 接口的请求。</para>
/// </summary>
public class ChannelsECTalentWindowProductListGetRequest : WechatApiRequest, IInferable<ChannelsECTalentWindowProductListGetRequest, ChannelsECTalentWindowProductListGetResponse>
{
/// <summary>
/// 获取或设置分页页数。与字段 <see cref="Cursor"/> 二选一。
/// </summary>
[Newtonsoft.Json.JsonProperty("page_index")]
[System.Text.Json.Serialization.JsonPropertyName("page_index")]
public int? Page { 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>
/// 获取或设置翻页标记。与字段 <see cref="Page"/> 二选一。
/// </summary>
[Newtonsoft.Json.JsonProperty("last_buffer")]
[System.Text.Json.Serialization.JsonPropertyName("last_buffer")]
public string? Cursor { get; set; }
}
}

View File

@ -0,0 +1,57 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/talent/window/product/list/get 接口的响应。</para>
/// </summary>
public class ChannelsECTalentWindowProductListGetResponse : 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.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置商品来源。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_source")]
[System.Text.Json.Serialization.JsonPropertyName("product_source")]
public int ProductSource { get; set; }
/// <summary>
/// 获取或设置店铺 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("appid")]
[System.Text.Json.Serialization.JsonPropertyName("appid")]
public string? AppId { get; set; }
/// <summary>
/// 获取或设置商家自定义商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("out_product_id")]
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
public string? OutProductId { 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("last_buffer")]
[System.Text.Json.Serialization.JsonPropertyName("last_buffer")]
public string? NextCursor { get; set; }
}
}

View File

@ -0,0 +1,30 @@
{
"errcode": "0",
"errmsg": "ok",
"base_info": {
"order_id": "202402260001",
"spu_id": "123456",
"sku_id": "987654",
"order_status": 2,
"actual_payment": "99.99",
"order_create_time": 1700000000,
"order_update_time": 1700003600,
"buyer_info": {
"open_id": "o1234567890abcdef",
"union_id": "u1234567890abcdef"
}
},
"commission_info": {
"state": 1,
"ratio": "0",
"expect_settle_time": 1701000000,
"expect_settlement": "9.99",
"actual_settle_time": 1702000000,
"actual_settlement": "9.99"
},
"channel_info": {
"channel_type": 2,
"channel_id": "channel_12345",
"channel_name": "某视频号"
}
}

View File

@ -0,0 +1,11 @@
{
"errcode": 0,
"errmsg": "ok",
"order_list": [
{
"order_id": "123",
"sku_id": "1234"
}
],
"has_more": true
}

View File

@ -0,0 +1,18 @@
{
"errcode": 0,
"errmsg": "ok",
"product": {
"product_id": "1000000000000",
"appid": "wxee9f94a33abcdefg",
"out_product_id": "",
"title": "api测试商品",
"img_url": "https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ",
"leaf_category_id": 6091,
"status": 1,
"selling_price": 999,
"stock": 1,
"sales": 123,
"is_hide": false,
"product_promotion_link": "v1=HAOHK025pGFF8tBx69zbwNpU473uiTNa5MOHrs_Hknqa_-Cjk9IbBHMHeKh5rSnIrQ"
}
}

View File

@ -0,0 +1,5 @@
{
"page_size": 1,
"page_index": 1,
"last_buffer": "abcdefg"
}

View File

@ -0,0 +1,17 @@
{
"errcode": 0,
"errmsg": "ok",
"products": [
{
"product_id": "1000000000000",
"appid": "wxee9f94a33abcdefg",
"product_source": 1
},
{
"product_id": "14000000000000",
"out_product_id": "100000012356",
"product_source": 2
}
],
"last_buffer": "EB4YAg="
}