mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-15 14:04:32 +08:00
feat(wxapi): 新增微信小店获取礼物单的子单列表接口
This commit is contained in:
parent
e59c5a5c1f
commit
398f535a65
@ -3916,6 +3916,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECOrderPresentNoteAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/presentsuborder/get 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/order/get_by_presentid.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECOrderPresentSubOrderGetResponse> ExecuteChannelsECOrderPresentSubOrderGetAsync(this WechatApiClient client, Models.ChannelsECOrderPresentSubOrderGetRequest 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", "presentsuborder", "get")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECOrderPresentSubOrderGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/sensitiveinfo/decode 接口。</para>
|
||||
/// <para>
|
||||
|
@ -1,5 +1,3 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/presentsuborder/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderPresentSubOrderGetRequest : WechatApiRequest, IInferable<ChannelsECOrderPresentSubOrderGetRequest, ChannelsECOrderPresentSubOrderGetResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置礼物订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("present_order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("present_order_id")]
|
||||
public string PresetOrderId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/presentsuborder/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderPresentSubOrderGetResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_ids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_ids")]
|
||||
public string[] OrderIdList { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"present_order_id": "42123565565655798"
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"order_ids": [
|
||||
"3704612354559743232",
|
||||
"3704849110714209536"
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user