feat(wxapi): 新增视频号小店同意或拒绝用户修改收货地址等接口

This commit is contained in:
Fu Diwei
2024-04-29 20:12:41 +08:00
parent 669d83b64f
commit 292dd1ad18
13 changed files with 2463 additions and 2227 deletions

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/order/addressmodify/accept 接口的请求。</para>
/// </summary>
public class ChannelsECOrderAddressModifyAcceptRequest : WechatApiRequest, IInferable<ChannelsECOrderAddressModifyAcceptRequest, ChannelsECOrderAddressModifyAcceptResponse>
{
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_id")]
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
public string OrderId { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/order/addressmodify/accept 接口的响应。</para>
/// </summary>
public class ChannelsECOrderAddressModifyAcceptResponse : WechatApiResponse
{
}
}

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/order/addressmodify/reject 接口的请求。</para>
/// </summary>
public class ChannelsECOrderAddressModifyRejectRequest : WechatApiRequest, IInferable<ChannelsECOrderAddressModifyRejectRequest, ChannelsECOrderAddressModifyRejectResponse>
{
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_id")]
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
public string OrderId { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/order/addressmodify/reject 接口的响应。</para>
/// </summary>
public class ChannelsECOrderAddressModifyRejectResponse : WechatApiResponse
{
}
}

View File

@@ -0,0 +1,85 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/order/deliveryinfo/update 接口的请求。</para>
/// </summary>
public class ChannelsECOrderDeliveryInfoUpdateRequest : WechatApiRequest, IInferable<ChannelsECOrderDeliveryInfoUpdateRequest, ChannelsECOrderDeliveryInfoUpdateResponse>
{
public static class Types
{
public class Delivery
{
public static class Types
{
public class Product
{
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
public long SKUId { get; set; }
/// <summary>
/// 获取或设置商品数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_cnt")]
[System.Text.Json.Serialization.JsonPropertyName("product_cnt")]
public int Count { get; set; }
}
}
/// <summary>
/// 获取或设置快递公司 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_id")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
public string DeliveryId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置快递单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("waybill_id")]
[System.Text.Json.Serialization.JsonPropertyName("waybill_id")]
public string? WaybillId { get; set; }
/// <summary>
/// 获取或设置发货方式。
/// </summary>
[Newtonsoft.Json.JsonProperty("deliver_type")]
[System.Text.Json.Serialization.JsonPropertyName("deliver_type")]
public int DeliverType { get; set; }
/// <summary>
/// 获取或设置商品列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_infos")]
[System.Text.Json.Serialization.JsonPropertyName("product_infos")]
public IList<Types.Product> ProductList { get; set; } = new List<Types.Product>();
}
}
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_id")]
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
public string OrderId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置快递列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_list")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_list")]
public IList<Types.Delivery> DeliveryList { get; set; } = new List<Types.Delivery>();
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/order/deliveryinfo/update 接口的响应。</para>
/// </summary>
public class ChannelsECOrderDeliveryInfoUpdateResponse : WechatApiResponse
{
}
}

View File

@@ -0,0 +1,17 @@
{
"order_id": "12345",
"delivery_list": [
{
"delivery_id": "EMS",
"waybill_id": "1234",
"deliver_type": 1,
"product_infos": [
{
"product_cnt": 1,
"product_id": "112233",
"sku_id": "445566"
}
]
}
]
}