feat(tenpayv3): 随官方更新获取平台证书接口请求模型

This commit is contained in:
Fu Diwei
2022-11-08 16:43:14 +08:00
parent dfdf413091
commit d2cc27f7f9
2 changed files with 11 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
@@ -34,6 +34,9 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
IFlurlRequest flurlReq = client
.CreateRequest(request, HttpMethod.Get, "certificates");
if (request.AlgorithmType != null)
flurlReq.SetQueryParam("algorithm_type", request.AlgorithmType);
return await client.SendRequestWithJsonAsync<Models.QueryCertificatesResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
}

View File

@@ -1,9 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [GET] /certificates 接口的请求。</para>
/// </summary>
public class QueryCertificatesRequest : WechatTenpayRequest
{
/// <summary>
/// 获取或设置算法类型。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? AlgorithmType { get; set; }
}
}