mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-12-29 01:44:42 +08:00
feat(wxapi): 新增微信小店代用户发起退差价接口
This commit is contained in:
@@ -271,6 +271,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECAftersaleUploadRefundCertificateResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/aftersale/refundpricediff 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/channels-shop-aftersale/api_refundpricediff.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECAftersaleRefundPriceDiffResponse> ExecuteChannelsECAftersaleRefundPriceDiffAsync(this WechatApiClient client, Models.ChannelsECAftersaleRefundPriceDiffRequest 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", "aftersale", "refundpricediff")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECAftersaleRefundPriceDiffResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
#region ECAftersale/Complaint
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/aftersale/addcomplaintmaterial 接口。</para>
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/aftersale/refundpricediff 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECAftersaleRefundPriceDiffRequest : WechatApiRequest, IInferable<ChannelsECAftersaleRefundPriceDiffRequest, ChannelsECAftersaleRefundPriceDiffResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置请求唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("request_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("request_id")]
|
||||
public string? RequestId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public string OrderId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_id")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberConverter))]
|
||||
public long ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sku_id")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberConverter))]
|
||||
public long SKUId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售后退款金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("amount")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("amount")]
|
||||
public int Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售后原因。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("reason")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("reason")]
|
||||
public string ReasonType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置代发起售后补充说明。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc")]
|
||||
public string? Description { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/aftersale/refundpricediff 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECAftersaleRefundPriceDiffResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置售后单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("after_sale_order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("after_sale_order_id")]
|
||||
public string AftersaleOrderId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -91,6 +91,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置团长头像 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("head_img")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("head_img")]
|
||||
public string HeadImageUrl { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class CooperativeInfo
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"request_id": "req_20240101120000_1234511",
|
||||
"order_id": "3732100665787132600",
|
||||
"product_id": "10000239001116",
|
||||
"sku_id": "3516044037",
|
||||
"amount": 10,
|
||||
"reason": "10001338",
|
||||
"desc": "商品价格差异退款申请,原价100元,现价90元,申请退还10元差价"
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"after_sale_order_id": "2082648273412"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user