feat(wxapi): 新增第三方平台申请开通物流退货组件接口

This commit is contained in:
Fu Diwei 2022-05-01 21:57:02 +08:00
parent e31c04bf8a
commit ffd12be7d7
3 changed files with 38 additions and 0 deletions

View File

@ -735,6 +735,26 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
return await client.SendRequestWithJsonAsync<Models.CgibinExpressDeliveryOpenMessageUpdateFollowWaybillGoodsResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /cgi-bin/express/delivery/return/open_return 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/Business/express/open_return.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.CgibinExpressDeliveryReturnOpenReturnResponse> ExecuteCgibinExpressDeliveryReturnOpenReturnAsync(this WechatApiClient client, Models.CgibinExpressDeliveryReturnOpenReturnRequest 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
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "express", "delivery", "return", "open_return")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.CgibinExpressDeliveryReturnOpenReturnResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/return/open_return 接口的请求。</para>
/// </summary>
public class CgibinExpressDeliveryReturnOpenReturnRequest : WechatApiRequest, IInferable<CgibinExpressDeliveryReturnOpenReturnRequest, CgibinExpressDeliveryReturnOpenReturnResponse>
{
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/return/open_return 接口的响应。</para>
/// </summary>
public class CgibinExpressDeliveryReturnOpenReturnResponse : WechatApiResponse
{
}
}