2023-04-03 22:12:22 +08:00
|
|
|
using System;
|
|
|
|
using System.Net.Http;
|
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using Flurl.Http;
|
|
|
|
|
|
|
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
|
|
|
|
{
|
|
|
|
public static class WechatTenpayClientExecuteBillCommentExtensions
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// <para>异步调用 [POST] /billcommentsp/batchquerycomment 接口。</para>
|
2024-02-05 16:27:37 +08:00
|
|
|
/// <para>
|
|
|
|
/// REF: <br/>
|
2025-06-04 20:38:15 +08:00
|
|
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v2/merchant/4014326528 ]]>
|
2024-02-05 16:27:37 +08:00
|
|
|
/// </para>
|
2023-04-03 22:12:22 +08:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="client"></param>
|
|
|
|
/// <param name="request"></param>
|
|
|
|
/// <param name="cancellationToken"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
public static async Task<Models.BatchQueryBillCommentResponse> ExecuteBatchQueryBillCommentAsync(this WechatTenpayClient client, Models.BatchQueryBillCommentRequest 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
|
2024-01-30 23:01:06 +08:00
|
|
|
.CreateFlurlRequest(request, HttpMethod.Post, "billcommentsp", "batchquerycomment");
|
2023-04-03 22:12:22 +08:00
|
|
|
|
2024-02-05 21:24:16 +08:00
|
|
|
return await client.SendFlurlRequestAsXmlAsync<Models.BatchQueryBillCommentResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
2023-04-03 22:12:22 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|