From 3ca53d803b6062c298277e52f5f1518bf8bdd6fb Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Thu, 5 Feb 2026 17:53:57 +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=8E=B7=E5=8F=96=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=8F=90=E5=AE=A1=E9=99=90=E9=A2=9D=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...echatApiClientExecuteChannelsExtensions.cs | 25 +++++++++++ .../ChannelsECProductGetAuditQuotaRequest.cs | 9 ++++ .../ChannelsECProductGetAuditQuotaResponse.cs | 42 +++++++++++++++++++ ...hannelsECProductGetAuditQuotaResponse.json | 9 ++++ 4 files changed, 85 insertions(+) create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/AuditQuota/ChannelsECProductGetAuditQuotaRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/AuditQuota/ChannelsECProductGetAuditQuotaResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProduct/AuditQuota/ChannelsECProductGetAuditQuotaResponse.json diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs index 494e6e83..a276e996 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs @@ -5767,6 +5767,31 @@ namespace SKIT.FlurlHttpClient.Wechat.Api } #endregion + #region ECProduct/AuditQuota + /// + /// 异步调用 [POST] /channels/ec/product/getauditquota 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteChannelsECProductGetAuditQuotaAsync(this WechatApiClient client, Models.ChannelsECProductGetAuditQuotaRequest 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", "product", "getauditquota") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + #region ECProduct/AuditStrategy /// /// 异步调用 [POST] /channels/ec/product/auditstrategy/get 接口。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/AuditQuota/ChannelsECProductGetAuditQuotaRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/AuditQuota/ChannelsECProductGetAuditQuotaRequest.cs new file mode 100644 index 00000000..2a54d2c3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/AuditQuota/ChannelsECProductGetAuditQuotaRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/product/getauditquota 接口的请求。 + /// + public class ChannelsECProductGetAuditQuotaRequest : WechatApiRequest, IInferable + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/AuditQuota/ChannelsECProductGetAuditQuotaResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/AuditQuota/ChannelsECProductGetAuditQuotaResponse.cs new file mode 100644 index 00000000..d29151d6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/AuditQuota/ChannelsECProductGetAuditQuotaResponse.cs @@ -0,0 +1,42 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/product/getauditquota 接口的响应。 + /// + public class ChannelsECProductGetAuditQuotaResponse : WechatApiResponse + { + public static class Types + { + public class AuditQuota + { + /// + /// 获取或设置是否已被限制。 + /// + [Newtonsoft.Json.JsonProperty("block_status")] + [System.Text.Json.Serialization.JsonPropertyName("block_status")] + public bool IsBlocked { get; set; } + + /// + /// 获取或设置可用配额。 + /// + [Newtonsoft.Json.JsonProperty("avail_quota")] + [System.Text.Json.Serialization.JsonPropertyName("avail_quota")] + public int AvailableQuota { get; set; } + + /// + /// 获取或设置总配额。 + /// + [Newtonsoft.Json.JsonProperty("total_quota")] + [System.Text.Json.Serialization.JsonPropertyName("total_quota")] + public int TotalQuota { get; set; } + } + } + + /// + /// 获取或设置审核限额信息。 + /// + [Newtonsoft.Json.JsonProperty("audit_quota")] + [System.Text.Json.Serialization.JsonPropertyName("audit_quota")] + public Types.AuditQuota AuditQuota { get; set; } = default!; + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProduct/AuditQuota/ChannelsECProductGetAuditQuotaResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProduct/AuditQuota/ChannelsECProductGetAuditQuotaResponse.json new file mode 100644 index 00000000..df6b9849 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECProduct/AuditQuota/ChannelsECProductGetAuditQuotaResponse.json @@ -0,0 +1,9 @@ +{ + "errcode": 0, + "errmsg": "ok", + "audit_quota": { + "block_status": false, + "avail_quota": 1000, + "total_quota": 4000 + } +}