mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-15 14:04:32 +08:00
34 lines
1.4 KiB
C#
34 lines
1.4 KiB
C#
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>
|
|
/// <para>
|
|
/// REF: <br/>
|
|
/// <![CDATA[ https://pay.weixin.qq.com/doc/v2/merchant/4014326528 ]]>
|
|
/// </para>
|
|
/// </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
|
|
.CreateFlurlRequest(request, HttpMethod.Post, "billcommentsp", "batchquerycomment");
|
|
|
|
return await client.SendFlurlRequestAsXmlAsync<Models.BatchQueryBillCommentResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
|
}
|
|
}
|
|
}
|