mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-03-10 00:13:36 +08:00
feat(wxapi): 新增小程序自定义交易组件售后开发测试接口
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -1036,6 +1036,26 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
|||||||
|
|
||||||
return await client.SendRequestWithJsonAsync<Models.ShopECAftersaleUploadCertificatesResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
return await client.SendRequestWithJsonAsync<Models.ShopECAftersaleUploadCertificatesResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /shop/ecaftersale/merchanttest 接口。</para>
|
||||||
|
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/ministore/minishopopencomponent2/API/aftersale/merchanttest.html </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.ShopECAftersaleMerchantTestResponse> ExecuteShopECAftersaleMerchantTestAsync(this WechatApiClient client, Models.ShopECAftersaleMerchantTestRequest 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, "shop", "ecaftersale", "merchanttest")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken);
|
||||||
|
|
||||||
|
return await client.SendRequestWithJsonAsync<Models.ShopECAftersaleMerchantTestResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Coupon
|
#region Coupon
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /shop/ecaftersale/merchanttest 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class ShopECAftersaleMerchantTestRequest : WechatApiRequest, IInferable<ShopECAftersaleMerchantTestRequest, ShopECAftersaleMerchantTestResponse>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置售后单号。与字段 <see cref="OutAftersaleOrderId"/> 二选一。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("aftersale_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("aftersale_id")]
|
||||||
|
public long? AftersaleOrderId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置商家自定义售后单号。与字段 <see cref="AftersaleOrderId"/> 二选一。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("out_aftersale_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("out_aftersale_id")]
|
||||||
|
public string? OutAftersaleOrderId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置操作类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("operation")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("operation")]
|
||||||
|
public string Operation { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /shop/ecaftersale/merchanttest 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class ShopECAftersaleMerchantTestResponse : WechatApiResponse
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"operation": "aftersale_merchant_confirm_receipt_overdue",
|
||||||
|
"out_aftersale_id": "xxxxxx"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user