mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-02-10 09:46:19 +08:00
feat(wxapi): 新增微信小店查看订单真实号审核状态接口
This commit is contained in:
@@ -4565,6 +4565,30 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECOrderMerchantNotesUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/freshinspect/submit 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/order/fresh_inspect_submit.html ]]> <br/>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/order/fresh_inspect_submit.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECOrderFreshInspectSubmitResponse> ExecuteChannelsECOrderFreshInspectSubmitAsync(this WechatApiClient client, Models.ChannelsECOrderFreshInspectSubmitRequest 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", "order", "freshinspect", "submit")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECOrderFreshInspectSubmitResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/presentnote/add 接口。</para>
|
||||
/// <para>
|
||||
@@ -4730,27 +4754,26 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/freshinspect/submit 接口。</para>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/realnumberviewaudit/get 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/order/fresh_inspect_submit.html ]]> <br/>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/order/fresh_inspect_submit.html ]]>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/channels-shop-order/api_getrealnumberviewaudit.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECOrderFreshInspectSubmitResponse> ExecuteChannelsECOrderFreshInspectSubmitAsync(this WechatApiClient client, Models.ChannelsECOrderFreshInspectSubmitRequest request, CancellationToken cancellationToken = default)
|
||||
public static async Task<Models.ChannelsECOrderRealNumberViewAuditGetResponse> ExecuteChannelsECOrderRealNumberViewAuditGetAsync(this WechatApiClient client, Models.ChannelsECOrderRealNumberViewAuditGetRequest 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", "order", "freshinspect", "submit")
|
||||
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "order", "realnumberviewaudit", "get")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECOrderFreshInspectSubmitResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECOrderRealNumberViewAuditGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
#region ECOrder/Address
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_id")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))]
|
||||
public string TaskId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/realnumberviewaudit/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderRealNumberViewAuditGetRequest : WechatApiRequest, IInferable<ChannelsECOrderRealNumberViewAuditGetRequest, ChannelsECOrderRealNumberViewAuditGetResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public string OrderId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/realnumberviewaudit/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderRealNumberViewAuditGetResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置申请 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_id")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))]
|
||||
public string TaskId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置审核状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_state")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_state")]
|
||||
public int AuditState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置申请原因。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("apply_reason")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("apply_reason")]
|
||||
public string ApplyReason { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置申请时间毫秒级时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("apply_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("apply_time")]
|
||||
public long ApplyTimeMilliseconds { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"order_id": "3731553180548477952"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"apply_time": 1760359848697,
|
||||
"audit_state": 3,
|
||||
"apply_reason": "111111",
|
||||
"task_id": 7678483884
|
||||
}
|
||||
Reference in New Issue
Block a user