mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-15 23:13:32 +08:00
feat(wxapi): 新增微信小店礼物订单新增备注信息接口
This commit is contained in:
parent
97cc657825
commit
6a68c2d253
@ -3497,6 +3497,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECOrderMerchantNotesUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/presentnote/add 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/order/present_note_add.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECOrderPresentNoteAddResponse> ExecuteChannelsECOrderPresentNoteAddAsync(this WechatApiClient client, Models.ChannelsECOrderPresentNoteAddRequest 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", "presentnote", "add")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECOrderPresentNoteAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/sensitiveinfo/decode 接口。</para>
|
||||
/// <para>
|
||||
|
@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/presentnote/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderPresentNoteAddRequest : WechatApiRequest, IInferable<ChannelsECOrderPresentNoteAddRequest, ChannelsECOrderPresentNoteAddResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置礼物订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("present_order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("present_order_id")]
|
||||
public string PresetOrderId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置礼物订单备注信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("notes")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("notes")]
|
||||
public string Notes { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/presentnote/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderPresentNoteAddResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"present_order_id": "123456",
|
||||
"notes": "微信小店"
|
||||
}
|
Loading…
Reference in New Issue
Block a user