feat(wxapi): 新增自定义交易组件分享员相关接口

This commit is contained in:
Fu Diwei 2022-04-10 20:54:44 +08:00
parent c847107057
commit a2eb8a2638
30 changed files with 777 additions and 0 deletions

View File

@ -1047,5 +1047,147 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
return await client.SendRequestWithJsonAsync<Models.ShopPromoterListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
#region Sharer
/// <summary>
/// <para>异步调用 [POST] /shop/sharer/bind 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/sharer/bind_sharer.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ShopSharerBindResponse> ExecuteShopSharerBindAsync(this WechatApiClient client, Models.ShopSharerBindRequest 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
.CreateRequest(request, HttpMethod.Post, "shop", "sharer", "bind")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ShopSharerBindResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /shop/sharer/get_sharer_data_summary 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/sharer/get_sharer_data_summary.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ShopSharerGetSharerDataSummaryResponse> ExecuteShopSharerGetSharerDataSummaryAsync(this WechatApiClient client, Models.ShopSharerGetSharerDataSummaryRequest 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
.CreateRequest(request, HttpMethod.Post, "shop", "sharer", "get_sharer_data_summary")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ShopSharerGetSharerDataSummaryResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /shop/sharer/get_sharer_list 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/sharer/get_sharer_list.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ShopSharerGetSharerListResponse> ExecuteShopSharerGetSharerListAsync(this WechatApiClient client, Models.ShopSharerGetSharerListRequest 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
.CreateRequest(request, HttpMethod.Post, "shop", "sharer", "get_sharer_list")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ShopSharerGetSharerListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /shop/sharer/get_sharer_live_order_list 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/sharer/get_sharer_live_order_list.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ShopSharerGetSharerLiveOrderListResponse> ExecuteShopSharerGetSharerLiveOrderListAsync(this WechatApiClient client, Models.ShopSharerGetSharerLiveOrderListRequest 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
.CreateRequest(request, HttpMethod.Post, "shop", "sharer", "get_sharer_live_order_list")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ShopSharerGetSharerLiveOrderListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /shop/sharer/get_sharer_live_summary_list 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/sharer/get_sharer_live_summary_list.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ShopSharerGetSharerLiveSummaryListResponse> ExecuteShopSharerGetSharerLiveSummaryListAsync(this WechatApiClient client, Models.ShopSharerGetSharerLiveSummaryListRequest 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
.CreateRequest(request, HttpMethod.Post, "shop", "sharer", "get_sharer_live_summary_list")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ShopSharerGetSharerLiveSummaryListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /shop/sharer/search_sharer 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/sharer/search_sharer.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ShopSharerSearchSharerResponse> ExecuteShopSharerSearchSharerAsync(this WechatApiClient client, Models.ShopSharerSearchSharerRequest 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
.CreateRequest(request, HttpMethod.Post, "shop", "sharer", "search_sharer")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ShopSharerSearchSharerResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /shop/sharer/unbind 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/sharer/unbind_sharer.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ShopSharerUnbindResponse> ExecuteShopSharerUnbindAsync(this WechatApiClient client, Models.ShopSharerUnbindRequest 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
.CreateRequest(request, HttpMethod.Post, "shop", "sharer", "unbind")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ShopSharerUnbindResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
}
}

View File

@ -239,6 +239,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("promoter_openid")]
public string? PromoterOpenId { get; set; }
/// <summary>
/// 获取或设置推广员用户名。
/// </summary>
[Newtonsoft.Json.JsonProperty("finder_username")]
[System.Text.Json.Serialization.JsonPropertyName("finder_username")]
public string? FinderUsername { get; set; }
/// <summary>
/// 获取或设置推广员昵称。
/// </summary>

View File

@ -0,0 +1,17 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /shop/sharer/bind 接口的请求。</para>
/// </summary>
public class ShopSharerBindRequest : WechatApiRequest, IInferable<ShopSharerBindRequest, ShopSharerBindResponse>
{
/// <summary>
/// 获取或设置分享员 OpenId 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("openids")]
[System.Text.Json.Serialization.JsonPropertyName("openids")]
public IList<string> OpenIdList { get; set; } = new List<string>();
}
}

View File

@ -0,0 +1,63 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /shop/sharer/bind 接口的响应。</para>
/// </summary>
public class ShopSharerBindResponse : WechatApiResponse
{
public static class Types
{
public class Result
{
/// <summary>
/// 获取或设置分享员 OpenId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = default!;
/// <summary>
/// 获取或设置邀请结果代码。
/// </summary>
[Newtonsoft.Json.JsonProperty("result_code")]
[System.Text.Json.Serialization.JsonPropertyName("result_code")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置邀请错误原因代码。
/// </summary>
[Newtonsoft.Json.JsonProperty("reason_code")]
[System.Text.Json.Serialization.JsonPropertyName("reason_code")]
public int ReasonCode { get; set; }
}
}
/// <summary>
/// 获取或设置绑定成功的分享员 OpenId 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("success_list")]
[System.Text.Json.Serialization.JsonPropertyName("success_list")]
public string[] SuccessOpenIdList { get; set; } = default!;
/// <summary>
/// 获取或设置绑定失败的分享员 OpenId 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("fail_list")]
[System.Text.Json.Serialization.JsonPropertyName("fail_list")]
public string[] FailOpenIdList { get; set; } = default!;
/// <summary>
/// 获取或设置绑定拒绝的分享员 OpenId 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("refuse_list")]
[System.Text.Json.Serialization.JsonPropertyName("refuse_list")]
public string[] RefuseOpenIdList { get; set; } = default!;
/// <summary>
/// 获取或设置绑定结果列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("result_list")]
[System.Text.Json.Serialization.JsonPropertyName("result_list")]
public Types.Result[] ResultList { get; set; } = default!;
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /shop/sharer/get_sharer_data_summary 接口的请求。</para>
/// </summary>
public class ShopSharerGetSharerDataSummaryRequest : WechatApiRequest, IInferable<ShopSharerGetSharerDataSummaryRequest, ShopSharerGetSharerDataSummaryResponse>
{
/// <summary>
/// 获取或设置分享员 OpenId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,29 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /shop/sharer/get_sharer_data_summary 接口的响应。</para>
/// </summary>
public class ShopSharerGetSharerDataSummaryResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置分享员有效带货额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("gmv")]
[System.Text.Json.Serialization.JsonPropertyName("gmv")]
public int GMV { get; set; }
/// <summary>
/// 获取或设置订单数。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_cnt")]
[System.Text.Json.Serialization.JsonPropertyName("order_cnt")]
public int OrderCount { get; set; }
/// <summary>
/// 获取或设置下单用户数。
/// </summary>
[Newtonsoft.Json.JsonProperty("user_cnt")]
[System.Text.Json.Serialization.JsonPropertyName("user_cnt")]
public int UserCount { get; set; }
}
}

View File

@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /shop/sharer/get_sharer_list 接口的请求。</para>
/// </summary>
public class ShopSharerGetSharerListRequest : WechatApiRequest, IInferable<ShopSharerGetSharerListRequest, ShopSharerGetSharerListResponse>
{
/// <summary>
/// 获取或设置分页页数(从 1 开始)。
/// </summary>
[Newtonsoft.Json.JsonProperty("page")]
[System.Text.Json.Serialization.JsonPropertyName("page")]
public int Page { get; set; } = 1;
/// <summary>
/// 获取或设置分页每页数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("page_size")]
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
public int Limit { get; set; } = 10;
}
}

View File

@ -0,0 +1,56 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /shop/sharer/get_sharer_list 接口的响应。</para>
/// </summary>
public class ShopSharerGetSharerListResponse : WechatApiResponse
{
public static class Types
{
public class Sharer
{
/// <summary>
/// 获取或设置分享员 OpenId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = default!;
/// <summary>
/// 获取或设置分享员昵称。
/// </summary>
[Newtonsoft.Json.JsonProperty("nickname")]
[System.Text.Json.Serialization.JsonPropertyName("nickname")]
public string Nickname { get; set; } = default!;
/// <summary>
/// 获取或设置邀请时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("invited_time")]
[System.Text.Json.Serialization.JsonPropertyName("invited_time")]
public long InviteTimestamp { get; set; }
/// <summary>
/// 获取或设置绑定时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("bind_time")]
[System.Text.Json.Serialization.JsonPropertyName("bind_time")]
public long BindTimestamp { get; set; }
}
}
/// <summary>
/// 获取或设置分享员列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("sharers")]
[System.Text.Json.Serialization.JsonPropertyName("sharers")]
public Types.Sharer[] SharerList { get; set; } = default!;
/// <summary>
/// 获取或设置总数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_num")]
[System.Text.Json.Serialization.JsonPropertyName("total_num")]
public int TotalCount { get; set; }
}
}

View File

@ -0,0 +1,36 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /shop/sharer/get_sharer_live_order_list 接口的请求。</para>
/// </summary>
public class ShopSharerGetSharerLiveOrderListRequest : WechatApiRequest, IInferable<ShopSharerGetSharerLiveOrderListRequest, ShopSharerGetSharerLiveOrderListResponse>
{
/// <summary>
/// 获取或设置分享员 OpenId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置直播间 ExportId。
/// </summary>
[Newtonsoft.Json.JsonProperty("live_export_id")]
[System.Text.Json.Serialization.JsonPropertyName("live_export_id")]
public string LiveExportId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置分页页数(从 1 开始)。
/// </summary>
[Newtonsoft.Json.JsonProperty("page")]
[System.Text.Json.Serialization.JsonPropertyName("page")]
public int Page { get; set; } = 1;
/// <summary>
/// 获取或设置分页每页数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("page_size")]
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
public int Limit { get; set; } = 10;
}
}

View File

@ -0,0 +1,29 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /shop/sharer/get_sharer_live_order_list 接口的响应。</para>
/// </summary>
public class ShopSharerGetSharerLiveOrderListResponse : WechatApiResponse
{
public static class Types
{
public class Order : ShopOrderGetListResponse.Types.Order
{
}
}
/// <summary>
/// 获取或设置订单列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("orders")]
[System.Text.Json.Serialization.JsonPropertyName("orders")]
public Types.Order[] OrderList { get; set; } = default!;
/// <summary>
/// 获取或设置总数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_num")]
[System.Text.Json.Serialization.JsonPropertyName("total_num")]
public int TotalCount { get; set; }
}
}

View File

@ -0,0 +1,29 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /shop/sharer/get_sharer_live_summary_list 接口的请求。</para>
/// </summary>
public class ShopSharerGetSharerLiveSummaryListRequest : WechatApiRequest, IInferable<ShopSharerGetSharerLiveSummaryListRequest, ShopSharerGetSharerLiveOrderListResponse>
{
/// <summary>
/// 获取或设置分享员 OpenId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置分页页数(从 1 开始)。
/// </summary>
[Newtonsoft.Json.JsonProperty("page")]
[System.Text.Json.Serialization.JsonPropertyName("page")]
public int Page { get; set; } = 1;
/// <summary>
/// 获取或设置分页每页数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("page_size")]
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
public int Limit { get; set; } = 10;
}
}

View File

@ -0,0 +1,84 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /shop/sharer/get_sharer_live_summary_list 接口的响应。</para>
/// </summary>
public class ShopSharerGetSharerLiveSummaryListResponse : WechatApiResponse
{
public static class Types
{
public class Live
{
/// <summary>
/// 获取或设置直播间 ExportId。
/// </summary>
[Newtonsoft.Json.JsonProperty("live_export_id")]
[System.Text.Json.Serialization.JsonPropertyName("live_export_id")]
public string LiveExportId { get; set; } = default!;
/// <summary>
/// 获取或设置直播间昵称。
/// </summary>
[Newtonsoft.Json.JsonProperty("live_nickname")]
[System.Text.Json.Serialization.JsonPropertyName("live_nickname")]
public string LiveNickname { get; set; } = default!;
/// <summary>
/// 获取或设置直播开始时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("live_start_time")]
[System.Text.Json.Serialization.JsonPropertyName("live_start_time")]
public long LiveStartTimestamp { get; set; }
/// <summary>
/// 获取或设置直播结束时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("live_end_time")]
[System.Text.Json.Serialization.JsonPropertyName("live_end_time")]
public long LiveEndTimestamp { get; set; }
/// <summary>
/// 获取或设置直播状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("live_status")]
[System.Text.Json.Serialization.JsonPropertyName("live_status")]
public int LiveStatus { get; set; }
/// <summary>
/// 获取或设置分享员有效带货额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("gmv")]
[System.Text.Json.Serialization.JsonPropertyName("gmv")]
public int GMV { get; set; }
/// <summary>
/// 获取或设置订单数。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_cnt")]
[System.Text.Json.Serialization.JsonPropertyName("order_cnt")]
public int OrderCount { get; set; }
/// <summary>
/// 获取或设置下单用户数。
/// </summary>
[Newtonsoft.Json.JsonProperty("user_cnt")]
[System.Text.Json.Serialization.JsonPropertyName("user_cnt")]
public int UserCount { get; set; }
}
}
/// <summary>
/// 获取或设置直播列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("lives")]
[System.Text.Json.Serialization.JsonPropertyName("lives")]
public Types.Live[] LiveList { get; set; } = default!;
/// <summary>
/// 获取或设置总数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_num")]
[System.Text.Json.Serialization.JsonPropertyName("total_num")]
public int TotalCount { get; set; }
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /shop/sharer/search_sharer 接口的请求。</para>
/// </summary>
public class ShopSharerSearchSharerRequest : WechatApiRequest, IInferable<ShopSharerSearchSharerRequest, ShopSharerSearchSharerResponse>
{
/// <summary>
/// 获取或设置分享员 OpenId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,36 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /shop/sharer/search_sharer 接口的响应。</para>
/// </summary>
public class ShopSharerSearchSharerResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置分享员昵称。
/// </summary>
[Newtonsoft.Json.JsonProperty("nickname")]
[System.Text.Json.Serialization.JsonPropertyName("nickname")]
public string Nickname { get; set; } = default!;
/// <summary>
/// 获取或设置邀请时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("invited_time")]
[System.Text.Json.Serialization.JsonPropertyName("invited_time")]
public long InviteTimestamp { get; set; }
/// <summary>
/// 获取或设置绑定状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("bind_status")]
[System.Text.Json.Serialization.JsonPropertyName("bind_status")]
public int BindStatus { get; set; }
/// <summary>
/// 获取或设置绑定时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("bind_time")]
[System.Text.Json.Serialization.JsonPropertyName("bind_time")]
public long? BindTimestamp { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /shop/sharer/unbind 接口的请求。</para>
/// </summary>
public class ShopSharerUnbindRequest : WechatApiRequest, IInferable<ShopSharerUnbindRequest, ShopSharerUnbindResponse>
{
/// <summary>
/// 获取或设置分享员 OpenId 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("openids")]
[System.Text.Json.Serialization.JsonPropertyName("openids")]
public IList<string> OpenIdList { get; set; } = new List<string>();
}
}

View File

@ -0,0 +1,29 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /shop/sharer/unbind 接口的响应。</para>
/// </summary>
public class ShopSharerUnbindResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置解绑成功的分享员 OpenId 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("success_list")]
[System.Text.Json.Serialization.JsonPropertyName("success_list")]
public string[] SuccessOpenIdList { get; set; } = default!;
/// <summary>
/// 获取或设置解绑失败的分享员 OpenId 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("fail_list")]
[System.Text.Json.Serialization.JsonPropertyName("fail_list")]
public string[] FailOpenIdList { get; set; } = default!;
/// <summary>
/// 获取或设置解绑拒绝的分享员 OpenId 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("refuse_list")]
[System.Text.Json.Serialization.JsonPropertyName("refuse_list")]
public string[] RefuseOpenIdList { get; set; } = default!;
}
}

View File

@ -0,0 +1,3 @@
{
"openids": [ "openid1", "openid2", "openid3" ]
}

View File

@ -0,0 +1,14 @@
{
"errcode": 0,
"errmsg": "ok",
"success_list": [ "openid1", "openid2", "openid3" ],
"fail_list": [],
"refuse_list": [],
"result_list": [
{
"openid": "OPENID",
"result_code": 0,
"reason_code": 0
}
]
}

View File

@ -0,0 +1,7 @@
{
"errcode": 0,
"errmsg": "ok",
"gmv": 12345,
"order_cnt": "9",
"user_cnt": 7
}

View File

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

View File

@ -0,0 +1,13 @@
{
"errcode": 0,
"errmsg": "ok",
"sharers": [
{
"openid": "OPENID",
"invited_time": "1624082055",
"bind_time": "1624082155",
"nickname": "NICKNAME"
}
],
"total_num": 20
}

View File

@ -0,0 +1,6 @@
{
"openid": "OPENID",
"live_export_id": "LIVE_EXPORT_ID",
"page": 1,
"page_size": 10
}

View File

@ -0,0 +1,58 @@
{
"errcode": 0,
"errmsg": "ok",
"orders": [
{
"order_id": 123455,
"out_order_id": "xxxxx",
"status": 20,
"path": "/pages/order.html?out_order_id=xxxxx",
"order_detail": {
"promotion_info": {
"finder_username": "FINDER_USERNAME",
"finder_nickname": "FINDER_NICKNAME",
"sharer_openid": "OPENID",
"live_start_time": "2020-04-25 12:05:25"
},
"product_infos": [
{
"out_product_id": "12345",
"out_sku_id": "23456",
"product_cnt": 10,
"sale_price": 200,
"path": "pages/productDetail/productDetail?productId=2176180",
"title": "标题",
"head_img": "http://img10.360buyimg.com/n1/s450x450_jfs/t1/85865/39/13611/488083/5e590a40E4bdf69c0/55c9bf645ea2b727.jpg",
"real_price": 200
}
],
"pay_info": {
"pay_method": "微信支付",
"prepay_id": "42526234625",
"prepay_time": "2020-03-25 14:04:25",
"transaction_id": "131456479687",
"pay_time": "2020-03-25 14:05:25",
"pay_method_type": 0
},
"price_info": {
"order_price": 1600,
"freight": 500,
"discounted_price": 1000,
"additional_price": 100,
"additional_remarks": "税费"
},
"delivery_detail": {
"delivery_type": 1,
"finish_all_delivery": 1,
"delivery_list": [
{
"waybill_id": "SFXXXX",
"delivery_id": "SF"
}
]
}
}
}
],
"total_num": 20
}

View File

@ -0,0 +1,5 @@
{
"openid": "xxxxx",
"page": 1,
"page_size": 10
}

View File

@ -0,0 +1,17 @@
{
"errcode": 0,
"errmsg": "ok",
"lives": [
{
"live_export_id": "LIVE_EXPORT_ID",
"live_nickname": "LIVE_NICKNAME",
"live_start_time": 2,
"live_end_time": 1,
"live_status": 1,
"gmv": 1000,
"order_cnt": 11,
"user_cnt": 10
}
],
"total_num": 20
}

View File

@ -0,0 +1,8 @@
{
"errcode": 0,
"errmsg": "ok",
"invited_time": "1624082055",
"bind_time": "1624082155",
"nickname": "NICKNAME",
"bind_status": "1"
}

View File

@ -0,0 +1,3 @@
{
"openids": [ "openid1", "openid2", "openid3" ]
}

View File

@ -0,0 +1,7 @@
{
"errcode": 0,
"errmsg": "ok",
"success_list": [ "openid1", "openid2", "openid3" ],
"fail_list": [],
"refuse_list": []
}