feat(wxapi): 随官方更新视频号小店商品相关接口模型

This commit is contained in:
Fu Diwei 2024-04-29 20:07:54 +08:00
parent 9d5fa9b09f
commit 59a44f9d7a
52 changed files with 202 additions and 7 deletions

View File

@ -22,6 +22,16 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
[System.Xml.Serialization.XmlElement("after_sale_order_id")]
public long AftersaleOrderId { get; set; }
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_id")]
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("order_id")]
public long OrderId { get; set; }
/// <summary>
/// 获取或设置售后单状态。
/// </summary>

View File

@ -0,0 +1,44 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.channels_ec_order_ext_info_update 事件的数据。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/order/callback/channels_ec_order_ext_info.html ]]>
/// </para>
/// </summary>
public class ChannelsECOrderExtInfoUpdateEvent : WechatApiEvent
{
public static class Types
{
public class Order
{
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_id")]
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("order_id")]
public long OrderId { get; set; }
/// <summary>
/// 获取或设置取消类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("type")]
[System.Text.Json.Serialization.JsonPropertyName("type")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("type")]
public int Type { get; set; }
}
}
/// <summary>
/// 获取或设置订单信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_info")]
[System.Text.Json.Serialization.JsonPropertyName("order_info")]
[System.Xml.Serialization.XmlElement("order_info")]
public Types.Order Order { get; set; } = default!;
}
}

View File

@ -0,0 +1,41 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.product_order_status_update 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/order/callback/product_order_status_update.html </para>
/// </summary>
public class ChannelsECProductOrderStatusUpdateEvent : WechatApiEvent
{
public static class Types
{
public class Order
{
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_id")]
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("order_id")]
public long OrderId { get; set; }
/// <summary>
/// 获取或设置订单状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("status")]
public int Status { get; set; }
}
}
/// <summary>
/// 获取或设置订单信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("ProductOrderStatusUpdate")]
[System.Text.Json.Serialization.JsonPropertyName("ProductOrderStatusUpdate")]
[System.Xml.Serialization.XmlElement("ProductOrderStatusUpdate")]
public Types.Order Order { get; set; } = default!;
}
}

View File

@ -0,0 +1,41 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.product_spu_update 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/product/callback/ProductSpuUpdate.html </para>
/// </summary>
public class ChannelsECProductSPUUpdateEvent : WechatApiEvent
{
public static class Types
{
public class Product
{
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("product_id")]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置审核状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("status")]
public int Status { get; set; }
}
}
/// <summary>
/// 获取或设置商品信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("ProductSpuUpdate")]
[System.Text.Json.Serialization.JsonPropertyName("ProductSpuUpdate")]
[System.Xml.Serialization.XmlElement("ProductSpuUpdate")]
public Types.Product Product { get; set; } = default!;
}
}

View File

@ -0,0 +1,35 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.channels_ec_sharer_change 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/sharer/bindsharer.html </para>
/// </summary>
public class ChannelsECSharerChangeEvent : WechatApiEvent
{
/// <summary>
/// 获取或设置审核状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("bind_status")]
[System.Text.Json.Serialization.JsonPropertyName("bind_status")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("bind_status")]
public int BindStatus { get; set; }
/// <summary>
/// 获取或设置绑定分享员 OpenId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
[System.Xml.Serialization.XmlElement("openid")]
public string OpenId { get; set; } = default!;
/// <summary>
/// 获取或设置分享员类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("sharer_type")]
[System.Text.Json.Serialization.JsonPropertyName("sharer_type")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
[System.Xml.Serialization.XmlElement("sharer_type")]
public int SharerType { get; set; }
}
}

View File

@ -61,6 +61,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[Newtonsoft.Json.JsonProperty("template_id")]
[System.Text.Json.Serialization.JsonPropertyName("template_id")]
public long TemplateId { get; set; }
/// <summary>
/// 获取或设置商品重量(单位:克)。
/// </summary>
[Newtonsoft.Json.JsonProperty("weight")]
[System.Text.Json.Serialization.JsonPropertyName("weight")]
public int? Weight { get; set; }
}
public class SKU

View File

@ -65,6 +65,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("template_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long TemplateId { get; set; }
/// <summary>
/// 获取或设置商品重量(单位:克)。
/// </summary>
[Newtonsoft.Json.JsonProperty("weight")]
[System.Text.Json.Serialization.JsonPropertyName("weight")]
public int? Weight { get; set; }
}
public class SKU

View File

@ -32,7 +32,14 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
public long SKUId { get; set; }
public long? SKUId { get; set; }
/// <summary>
/// 获取或设置商家自定义 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("out_sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("out_sku_id")]
public string? OutSKUId { get; set; }
/// <summary>
/// 获取或设置缩略图 URL。

View File

@ -31,7 +31,8 @@
}
],
"express_info": {
"template_id": "47428464001"
"template_id": "47428464001",
"weight": 100
},
"skus": [
{
@ -61,11 +62,11 @@
],
"spu_code": "AABBCC",
"brand_id": 2100000000,
"qualifications": [ "123123" ],
"qualifications": ["123123"],
"extra_service": {
"seven_day_return": 1,
"pay_after_use": 1,
"freight_insurance": 0
"freight_insurance": 0
},
"listing": true,
"after_sale_info": {

View File

@ -36,7 +36,8 @@
}
],
"express_info": {
"template_id": "123456"
"template_id": "123456",
"weight": 100
},
"status": 5,
"edit_status": 2,

View File

@ -32,7 +32,8 @@
}
],
"express_info": {
"template_id": "47428464001"
"template_id": "47428464001",
"weight": 100
},
"skus": [
{
@ -87,7 +88,7 @@
],
"spu_code": "AABBCC",
"brand_id": 2100000000,
"qualifications": [ "123123" ],
"qualifications": ["123123"],
"extra_service": {
"seven_day_return": 1,
"pay_after_use": 1,