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
820bf185e3
commit
f89ca8a1fc
@ -4586,6 +4586,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECQICInspectSubmitResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/qic/inspect/register_logistics 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/qic/registerlogistics.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECQICInspectRegisterLogisticsResponse> ExecuteChannelsECQICInspectRegisterLogisticsAsync(this WechatApiClient client, Models.ChannelsECQICInspectRegisterLogisticsRequest 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", "qic", "inspect", "register_logistics")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECQICInspectRegisterLogisticsResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ECSharer
|
||||
|
@ -0,0 +1,58 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/qic/inspect/register_logistics 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECQICInspectRegisterLogisticsRequest : WechatApiRequest, IInferable<ChannelsECQICInspectRegisterLogisticsRequest, ChannelsECQICInspectRegisterLogisticsResponse>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class LogisticsInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置快递单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("waybill_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("waybill_id")]
|
||||
public string WaybillId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置发货方式。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_type")]
|
||||
public int DeliveryType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递公司 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
|
||||
public string? DeliveryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递公司名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_name")]
|
||||
public string? DeliveryName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递物流信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id_list")]
|
||||
public IList<string> OrderIdList { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("logistics_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("logistics_info")]
|
||||
public Types.LogisticsInfo LogisticsInfo { get; set; } = new Types.LogisticsInfo();
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/qic/inspect/register_logistics 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECQICInspectRegisterLogisticsResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"order_id_list": [
|
||||
"37423523451235145",
|
||||
"37423523451235146"
|
||||
],
|
||||
"logistics_info": {
|
||||
"waybill_id": "SF11111111",
|
||||
"delivery_id": "SF",
|
||||
"delivery_name": "顺丰快递",
|
||||
"delivery_type": 1
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user