From 4320c26e53d02b6c43e09f2fbcff83526ebae195 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Thu, 27 Nov 2025 15:36:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(wxapi):=20=E6=96=B0=E5=A2=9E=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=B0=8F=E5=BA=97=E8=81=94=E7=9B=9F=E5=B8=A6=E8=B4=A7?= =?UTF-8?q?=E6=9C=BA=E6=9E=84=E8=A7=A3=E7=BB=91=E6=8E=A8=E5=AE=A2=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...echatApiClientExecuteChannelsExtensions.cs | 23 +++++++++++++++++++ ...omoterHeadSupplierUnbindPromoterRequest.cs | 15 ++++++++++++ ...moterHeadSupplierUnbindPromoterResponse.cs | 9 ++++++++ ...oterHeadSupplierUnbindPromoterRequest.json | 3 +++ 4 files changed, 50 insertions(+) create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECPromoter/Sharer/ChannelsECPromoterHeadSupplierUnbindPromoterRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECPromoter/Sharer/ChannelsECPromoterHeadSupplierUnbindPromoterResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECPromoter/Sharer/ChannelsECPromoterHeadSupplierUnbindPromoterRequest.json diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs index 00fbfa17..b8126f1f 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs @@ -6913,6 +6913,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); } + + /// + /// 异步调用 [POST] /channels/ec/promoter/headsupplier_unbind_promoter 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECPromoterHeadSupplierUnbindPromoterAsync(this WechatApiClient client, Models.ChannelsECPromoterHeadSupplierUnbindPromoterRequest 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", "promoter", "headsupplier_unbind_promoter") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } #endregion #endregion diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECPromoter/Sharer/ChannelsECPromoterHeadSupplierUnbindPromoterRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECPromoter/Sharer/ChannelsECPromoterHeadSupplierUnbindPromoterRequest.cs new file mode 100644 index 00000000..d373c52b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECPromoter/Sharer/ChannelsECPromoterHeadSupplierUnbindPromoterRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/promoter/headsupplier_unbind_promoter 接口的请求。 + /// + public class ChannelsECPromoterHeadSupplierUnbindPromoterRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置推客的微信电商平台注册的身份标识。 + /// + [Newtonsoft.Json.JsonProperty("sharer_appid")] + [System.Text.Json.Serialization.JsonPropertyName("sharer_appid")] + public string SharerAppId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECPromoter/Sharer/ChannelsECPromoterHeadSupplierUnbindPromoterResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECPromoter/Sharer/ChannelsECPromoterHeadSupplierUnbindPromoterResponse.cs new file mode 100644 index 00000000..52dfae2e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECPromoter/Sharer/ChannelsECPromoterHeadSupplierUnbindPromoterResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/promoter/headsupplier_unbind_promoter 接口的响应。 + /// + public class ChannelsECPromoterHeadSupplierUnbindPromoterResponse : WechatApiResponse + { + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECPromoter/Sharer/ChannelsECPromoterHeadSupplierUnbindPromoterRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECPromoter/Sharer/ChannelsECPromoterHeadSupplierUnbindPromoterRequest.json new file mode 100644 index 00000000..7671b6c5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECPromoter/Sharer/ChannelsECPromoterHeadSupplierUnbindPromoterRequest.json @@ -0,0 +1,3 @@ +{ + "sharer_appid": "wx123123123123" +}