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" +}