From 9fa7c11ec7893c0c3efa3d4b6b12e79be248e017 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Thu, 3 Nov 2022 20:25:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(wxapi):=20=E6=96=B0=E5=A2=9E=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=8F=B7=E5=B0=8F=E5=BA=97=E8=AE=A2=E5=8D=95=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChannelsEC/ChannelsECOrderCancelEvent.cs | 41 ++ .../ChannelsEC/ChannelsECOrderConfirmEvent.cs | 41 ++ .../ChannelsEC/ChannelsECOrderPayEvent.cs | 41 ++ .../ChannelsEC/ChannelsECOrderSettleEvent.cs | 41 ++ .../ChannelsECProductCategoryAuditEvent.cs | 7 +- .../ChannelsECProductSPUAuditEvent.cs | 7 +- .../ChannelsECProductSPUListingEvent.cs | 7 +- ...echatApiClientExecuteChannelsExtensions.cs | 160 ++++++ .../ChannelsECOrderAddressUpdateRequest.cs | 29 + .../ChannelsECOrderAddressUpdateResponse.cs | 9 + .../ECOrder/ChannelsECOrderGetRequest.cs | 15 + .../ECOrder/ChannelsECOrderGetResponse.cs | 494 ++++++++++++++++++ .../ECOrder/ChannelsECOrderListGetRequest.cs | 71 +++ .../ECOrder/ChannelsECOrderListGetResponse.cs | 30 ++ ...annelsECOrderMerchantNotesUpdateRequest.cs | 22 + ...nnelsECOrderMerchantNotesUpdateResponse.cs | 9 + .../ChannelsECOrderPriceUpdateRequest.cs | 65 +++ .../ChannelsECOrderPriceUpdateResponse.cs | 9 + .../ECOrder/ChannelsECOrderSearchRequest.cs | 85 +++ .../ECOrder/ChannelsECOrderSearchResponse.cs | 30 ++ .../ChannelsECOrderDeliverySendRequest.cs | 2 +- .../ECProduct/ChannelsECProductGetResponse.cs | 1 - ...roductLimitedDiscountTaskListGetRequest.cs | 2 +- .../ChannelsECWindowProductGetRequest.cs | 22 + .../ChannelsECWindowProductGetResponse.cs | 265 ++++++++++ .../ChannelsECWindowProductListGetRequest.cs | 54 ++ .../ChannelsECWindowProductListGetResponse.cs | 50 ++ .../ChannelsECOrderCancelEvent.json | 11 + .../ChannelsECOrderConfirmEvent.json | 11 + .../ChannelsEC/ChannelsECOrderPayEvent.json | 11 + .../ChannelsECOrderSettleEvent.json | 11 + .../ChannelsECOrderAddressUpdateRequest.json | 13 + .../ECOrder/ChannelsECOrderGetRequest.json | 3 + .../ECOrder/ChannelsECOrderGetResponse.json | 84 +++ .../ChannelsECOrderListGetRequest.json | 8 + .../ChannelsECOrderListGetResponse.json | 7 + ...nelsECOrderMerchantNotesUpdateRequest.json | 4 + .../ChannelsECOrderPriceUpdateRequest.json | 12 + .../ECOrder/ChannelsECOrderSearchRequest.json | 13 + .../ChannelsECOrderSearchResponse.json | 7 + .../ChannelsECWindowProductGetRequest.json | 4 + .../ChannelsECWindowProductGetResponse.json | 32 ++ ...ChannelsECWindowProductListGetRequest.json | 6 + ...hannelsECWindowProductListGetResponse.json | 12 + 44 files changed, 1846 insertions(+), 12 deletions(-) create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderCancelEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderConfirmEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderPayEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderSettleEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderAddressUpdateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderAddressUpdateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderListGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderListGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderMerchantNotesUpdateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderMerchantNotesUpdateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderPriceUpdateRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderPriceUpdateResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderSearchRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderSearchResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductGetResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductListGetRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductListGetResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderCancelEvent.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderConfirmEvent.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderPayEvent.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderSettleEvent.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderAddressUpdateRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderGetRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderGetResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderListGetRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderListGetResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderMerchantNotesUpdateRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderPriceUpdateRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderSearchRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderSearchResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductGetRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductGetResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductListGetRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductListGetResponse.json diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderCancelEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderCancelEvent.cs new file mode 100644 index 00000000..f18fb106 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderCancelEvent.cs @@ -0,0 +1,41 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.channels_ec_order_cancel 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/order/callback/channels_ec_order_cancel.html + /// + public class ChannelsECOrderCancelEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable + { + public static class Types + { + public class Order + { + /// + /// 获取或设置订单号。 + /// + [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; } + + /// + /// 获取或设置取消类型。 + /// + [Newtonsoft.Json.JsonProperty("cancel_type")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_type")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + [System.Xml.Serialization.XmlElement("cancel_type")] + public int CancelType { get; set; } + } + } + + /// + /// 获取或设置订单信息。 + /// + [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!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderConfirmEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderConfirmEvent.cs new file mode 100644 index 00000000..4a744e91 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderConfirmEvent.cs @@ -0,0 +1,41 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.channels_ec_order_confirm 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/order/callback/channels_ec_order_confirm.html + /// + public class ChannelsECOrderConfirmEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable + { + public static class Types + { + public class Order + { + /// + /// 获取或设置订单号。 + /// + [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; } + + /// + /// 获取或设置确认方式。 + /// + [Newtonsoft.Json.JsonProperty("confirm_type")] + [System.Text.Json.Serialization.JsonPropertyName("confirm_type")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + [System.Xml.Serialization.XmlElement("confirm_type")] + public int ConfirmType { get; set; } + } + } + + /// + /// 获取或设置订单信息。 + /// + [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!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderPayEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderPayEvent.cs new file mode 100644 index 00000000..b51dfad8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderPayEvent.cs @@ -0,0 +1,41 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.channels_ec_order_pay 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/order/callback/channels_ec_order_pay.html + /// + public class ChannelsECOrderPayEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable + { + public static class Types + { + public class Order + { + /// + /// 获取或设置订单号。 + /// + [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; } + + /// + /// 获取或设置支付时间戳。 + /// + [Newtonsoft.Json.JsonProperty("pay_time")] + [System.Text.Json.Serialization.JsonPropertyName("pay_time")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + [System.Xml.Serialization.XmlElement("pay_time")] + public long PayTimestamp { get; set; } + } + } + + /// + /// 获取或设置订单信息。 + /// + [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!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderSettleEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderSettleEvent.cs new file mode 100644 index 00000000..48aaea3b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECOrderSettleEvent.cs @@ -0,0 +1,41 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 EVENT.channels_ec_order_settle 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/order/callback/channels_ec_order_settle.html + /// + public class ChannelsECOrderSettleEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable + { + public static class Types + { + public class Order + { + /// + /// 获取或设置订单号。 + /// + [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; } + + /// + /// 获取或设置结算成功时间戳。 + /// + [Newtonsoft.Json.JsonProperty("settle_time")] + [System.Text.Json.Serialization.JsonPropertyName("settle_time")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + [System.Xml.Serialization.XmlElement("settle_time")] + public long SettleTimestamp { get; set; } + } + } + + /// + /// 获取或设置订单信息。 + /// + [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!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECProductCategoryAuditEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECProductCategoryAuditEvent.cs index c41993fc..a4b38750 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECProductCategoryAuditEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECProductCategoryAuditEvent.cs @@ -8,7 +8,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events { public static class Types { - public class EventData + public class Category { /// /// 获取或设置审核单 ID。 @@ -24,6 +24,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events /// [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; } @@ -38,11 +39,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events } /// - /// 获取或设置事件数据。 + /// 获取或设置分类信息。 /// [Newtonsoft.Json.JsonProperty("ProductCategoryAudit")] [System.Text.Json.Serialization.JsonPropertyName("ProductCategoryAudit")] [System.Xml.Serialization.XmlElement("ProductCategoryAudit")] - public Types.EventData EventData { get; set; } = default!; + public Types.Category Category { get; set; } = default!; } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECProductSPUAuditEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECProductSPUAuditEvent.cs index 02575b17..84c3322d 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECProductSPUAuditEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECProductSPUAuditEvent.cs @@ -8,7 +8,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events { public static class Types { - public class EventData + public class Product { /// /// 获取或设置商品 ID。 @@ -24,6 +24,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events /// [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; } @@ -38,11 +39,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events } /// - /// 获取或设置事件数据。 + /// 获取或设置商品信息。 /// [Newtonsoft.Json.JsonProperty("ProductSpuAudit")] [System.Text.Json.Serialization.JsonPropertyName("ProductSpuAudit")] [System.Xml.Serialization.XmlElement("ProductSpuAudit")] - public Types.EventData EventData { get; set; } = default!; + public Types.Product Product { get; set; } = default!; } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECProductSPUListingEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECProductSPUListingEvent.cs index 25d393c9..185de9da 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECProductSPUListingEvent.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/ChannelsEC/ChannelsECProductSPUListingEvent.cs @@ -8,7 +8,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events { public static class Types { - public class EventData + public class Product { /// /// 获取或设置商品 ID。 @@ -24,6 +24,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events /// [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; } @@ -38,11 +39,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events } /// - /// 获取或设置事件数据。 + /// 获取或设置商品信息。 /// [Newtonsoft.Json.JsonProperty("ProductSpuListing")] [System.Text.Json.Serialization.JsonPropertyName("ProductSpuListing")] [System.Xml.Serialization.XmlElement("ProductSpuListing")] - public Types.EventData EventData { get; set; } = default!; + public Types.Product Product { get; set; } = default!; } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs index 46f353ac..e11be0ee 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Extensions/WechatApiClientExecuteChannelsExtensions.cs @@ -568,6 +568,126 @@ namespace SKIT.FlurlHttpClient.Wechat.Api #endregion #region ECOrder + /// + /// 异步调用 [POST] /channels/ec/order/search 接口。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/order/search.html + /// + /// + /// + /// + /// + public static async Task ExecuteChannelsECOrderSearchAsync(this WechatApiClient client, Models.ChannelsECOrderSearchRequest 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, "channels", "ec", "order", "search") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /channels/ec/order/list/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/order/list_get.html + /// + /// + /// + /// + /// + public static async Task ExecuteChannelsECOrderListGetAsync(this WechatApiClient client, Models.ChannelsECOrderListGetRequest 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, "channels", "ec", "order", "list", "get") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /channels/ec/order/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/order/get.html + /// + /// + /// + /// + /// + public static async Task ExecuteChannelsECOrderGetAsync(this WechatApiClient client, Models.ChannelsECOrderGetRequest 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, "channels", "ec", "order", "get") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /channels/ec/order/price/update 接口。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/order/price_update.html + /// + /// + /// + /// + /// + public static async Task ExecuteChannelsECOrderPriceUpdateAsync(this WechatApiClient client, Models.ChannelsECOrderPriceUpdateRequest 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, "channels", "ec", "order", "price", "update") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /channels/ec/order/merchantnotes/update 接口。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/order/merchantnotes_update.html + /// + /// + /// + /// + /// + public static async Task ExecuteChannelsECOrderMerchantNotesUpdateAsync(this WechatApiClient client, Models.ChannelsECOrderMerchantNotesUpdateRequest 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, "channels", "ec", "order", "merchantnotes", "update") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /channels/ec/order/address/update 接口。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/order/address_update.html + /// + /// + /// + /// + /// + public static async Task ExecuteChannelsECOrderAddressUpdateAsync(this WechatApiClient client, Models.ChannelsECOrderAddressUpdateRequest 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, "channels", "ec", "order", "address", "update") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + #region ECOrder/Delivery /// /// 异步调用 [POST] /channels/ec/order/deliverycompanylist/get 接口。 @@ -651,6 +771,46 @@ namespace SKIT.FlurlHttpClient.Wechat.Api return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); } + + /// + /// 异步调用 [POST] /channels/ec/window/product/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/windowproduct/get.html + /// + /// + /// + /// + /// + public static async Task ExecuteChannelsECWindowProductGetAsync(this WechatApiClient client, Models.ChannelsECWindowProductGetRequest 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, "channels", "ec", "window", "product", "get") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } + + /// + /// 异步调用 [POST] /channels/ec/window/product/list/get 接口。 + /// REF: https://developers.weixin.qq.com/doc/channels/API/windowproduct/list_get.html + /// + /// + /// + /// + /// + public static async Task ExecuteChannelsECWindowProductListGetAsync(this WechatApiClient client, Models.ChannelsECWindowProductListGetRequest 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, "channels", "ec", "window", "product", "list", "get") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); + } #endregion } } diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderAddressUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderAddressUpdateRequest.cs new file mode 100644 index 00000000..1f4de10e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderAddressUpdateRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/order/address/update 接口的请求。 + /// + public class ChannelsECOrderAddressUpdateRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class Address : ChannelsECMerchantAddFreightTemplateRequest.Types.FreightTemplate.Types.Address + { + } + } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public long OrderId { get; set; } + + /// + /// 获取或设置新地址信息。 + /// + [Newtonsoft.Json.JsonProperty("user_address")] + [System.Text.Json.Serialization.JsonPropertyName("user_address")] + public Types.Address Address { get; set; } = new Types.Address(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderAddressUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderAddressUpdateResponse.cs new file mode 100644 index 00000000..0362ff7c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderAddressUpdateResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/order/address/update 接口的响应。 + /// + public class ChannelsECOrderAddressUpdateResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetRequest.cs new file mode 100644 index 00000000..6fa1a92d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/order/get 接口的请求。 + /// + public class ChannelsECOrderGetRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public long OrderId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetResponse.cs new file mode 100644 index 00000000..3331e9c7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderGetResponse.cs @@ -0,0 +1,494 @@ +using System; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/order/get 接口的响应。 + /// + public class ChannelsECOrderGetResponse : WechatApiResponse + { + public static class Types + { + public class Order + { + public static class Types + { + public class OrderDetail + { + public static class Types + { + public class Product + { + public static class Types + { + public class Attribute : ChannelsECProductGetResponse.Types.Product.Types.Attribute + { + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long ProductId { get; set; } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long SKUId { get; set; } + + /// + /// 获取或设置商品数量。 + /// + [Newtonsoft.Json.JsonProperty("sku_cnt")] + [System.Text.Json.Serialization.JsonPropertyName("sku_cnt")] + public int Count { get; set; } + + /// + /// 获取或设置正在售后流程中的商品数量。 + /// + [Newtonsoft.Json.JsonProperty("on_aftersale_sku_cnt")] + [System.Text.Json.Serialization.JsonPropertyName("on_aftersale_sku_cnt")] + public int OnAftersaleCount { get; set; } + + /// + /// 获取或设置已完成售后流程的商品数量。 + /// + [Newtonsoft.Json.JsonProperty("finish_aftersale_sku_cnt")] + [System.Text.Json.Serialization.JsonPropertyName("finish_aftersale_sku_cnt")] + public int FinishAftersaleCount { get; set; } + + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置商品缩略图 URL。 + /// + [Newtonsoft.Json.JsonProperty("thumb_img")] + [System.Text.Json.Serialization.JsonPropertyName("thumb_img")] + public string ThumbnailImageUrl { get; set; } = default!; + + /// + /// 获取或设置商品原价(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("market_price")] + [System.Text.Json.Serialization.JsonPropertyName("market_price")] + public int MarketPrice { get; set; } + + /// + /// 获取或设置商品售价(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("sale_price")] + [System.Text.Json.Serialization.JsonPropertyName("sale_price")] + public int SalePrice { get; set; } + + /// + /// 获取或设置商品实付价(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("real_price")] + [System.Text.Json.Serialization.JsonPropertyName("real_price")] + public int? RealPrice { get; set; } + + /// + /// 获取或设置商品属性列表。 + /// + [Newtonsoft.Json.JsonProperty("sku_attrs")] + [System.Text.Json.Serialization.JsonPropertyName("sku_attrs")] + public Types.Attribute[]? AttributeList { get; set; } + } + + public class Payment + { + /// + /// 获取或设置预支付单号。 + /// + [Newtonsoft.Json.JsonProperty("prepay_id")] + [System.Text.Json.Serialization.JsonPropertyName("prepay_id")] + public string PrepayId { get; set; } = default!; + + /// + /// 获取或设置预支付时间戳。 + /// + [Newtonsoft.Json.JsonProperty("prepay_time")] + [System.Text.Json.Serialization.JsonPropertyName("prepay_time")] + public long PrepayTimestamp { get; set; } + + /// + /// 获取或设置微信支付交易单号。 + /// + [Newtonsoft.Json.JsonProperty("transaction_id")] + [System.Text.Json.Serialization.JsonPropertyName("transaction_id")] + public string? TransactionId { get; set; } + + /// + /// 获取或设置付款时间戳。 + /// + [Newtonsoft.Json.JsonProperty("pay_time")] + [System.Text.Json.Serialization.JsonPropertyName("pay_time")] + public long? PayTimestamp { get; set; } + } + + public class Amount + { + /// + /// 获取或设置商品金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("product_price")] + [System.Text.Json.Serialization.JsonPropertyName("product_price")] + public int ProductPrice { get; set; } + + /// + /// 获取或设置订单金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("order_price")] + [System.Text.Json.Serialization.JsonPropertyName("order_price")] + public int OrderPrice { get; set; } + + /// + /// 获取或设置运费(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("freight")] + [System.Text.Json.Serialization.JsonPropertyName("freight")] + public int FreightPrice { get; set; } + + /// + /// 获取或设置优惠金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("discounted_price")] + [System.Text.Json.Serialization.JsonPropertyName("discounted_price")] + public int DiscountedPrice { get; set; } + + /// + /// 获取或设置是否有优惠。 + /// + [Newtonsoft.Json.JsonProperty("is_discounted")] + [System.Text.Json.Serialization.JsonPropertyName("is_discounted")] + public bool IsDiscounted { get; set; } + + /// + /// 获取或设置订单原始价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("original_order_price")] + [System.Text.Json.Serialization.JsonPropertyName("original_order_price")] + public int? OriginalOrderPrice { get; set; } + + /// + /// 获取或设置商品预估价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("estimate_product_price")] + [System.Text.Json.Serialization.JsonPropertyName("estimate_product_price")] + public int? EstimatedProductPrice { get; set; } + + /// + /// 获取或设置改价后降低金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("change_down_price")] + [System.Text.Json.Serialization.JsonPropertyName("change_down_price")] + public int? ChangedDownPrice { get; set; } + + /// + /// 获取或设置改价后运费(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("change_freight")] + [System.Text.Json.Serialization.JsonPropertyName("change_freight")] + public int? ChangedFreightPrice { get; set; } + + /// + /// 获取或设置是否修改运费。 + /// + [Newtonsoft.Json.JsonProperty("is_change_freight")] + [System.Text.Json.Serialization.JsonPropertyName("is_change_freight")] + public bool? IsFreightChanged { get; set; } + } + + public class Delivery + { + public static class Types + { + public class DeliveryProduct + { + public static class Types + { + public class Product + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long ProductId { get; set; } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long SKUId { get; set; } + + /// + /// 获取或设置商品数量。 + /// + [Newtonsoft.Json.JsonProperty("product_cnt")] + [System.Text.Json.Serialization.JsonPropertyName("product_cnt")] + public int Count { get; set; } + } + } + + /// + /// 获取或设置快递方式。 + /// + [Newtonsoft.Json.JsonProperty("deliver_type")] + [System.Text.Json.Serialization.JsonPropertyName("deliver_type")] + public int DeliverType { get; set; } + + /// + /// 获取或设置快递公司 ID。 + /// + [Newtonsoft.Json.JsonProperty("delivery_id")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_id")] + public string DeliveryId { get; set; } = default!; + + /// + /// 获取或设置快递单号。 + /// + [Newtonsoft.Json.JsonProperty("waybill_id")] + [System.Text.Json.Serialization.JsonPropertyName("waybill_id")] + public string WaybillId { get; set; } = default!; + + /// + /// 获取或设置发货时间戳。 + /// + [Newtonsoft.Json.JsonProperty("delivery_time")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_time")] + public long DeliveryTimestamp { get; set; } + + /// + /// 获取或设置商品列表。 + /// + [Newtonsoft.Json.JsonProperty("product_infos")] + [System.Text.Json.Serialization.JsonPropertyName("product_infos")] + public Types.Product[] ProductList { get; set; } = default!; + } + + public class Address : ChannelsECMerchantAddressGetResponse.Types.AddressDetail.Types.Address + { + /// + /// 获取或设置虚拟发货订单电话号码。 + /// + [Newtonsoft.Json.JsonProperty("virtual_order_tel_number")] + [System.Text.Json.Serialization.JsonPropertyName("virtual_order_tel_number")] + public string? VirtualOrderTeleNumber { get; set; } + } + } + + /// + /// 获取或设置发货方式。 + /// + [Newtonsoft.Json.JsonProperty("deliver_method")] + [System.Text.Json.Serialization.JsonPropertyName("deliver_method")] + public int DeliverMethod { get; set; } + + /// + /// 获取或设置地址信息。 + /// + [Newtonsoft.Json.JsonProperty("address_info")] + [System.Text.Json.Serialization.JsonPropertyName("address_info")] + public Types.Address? Address { get; set; } + + /// + /// 获取或设置发货商品信息。 + /// + [Newtonsoft.Json.JsonProperty("delivery_product_info")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_product_info")] + public Types.DeliveryProduct[] DeliveryProductList { get; set; } = default!; + + /// + /// 获取或设置配送完成时间戳。 + /// + [Newtonsoft.Json.JsonProperty("ship_done_time")] + [System.Text.Json.Serialization.JsonPropertyName("ship_done_time")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long? ShippingDoneTimestamp { get; set; } + } + + public class Coupon + { + /// + /// 获取或设置用户优惠券 ID。 + /// + [Newtonsoft.Json.JsonProperty("user_coupon_id")] + [System.Text.Json.Serialization.JsonPropertyName("user_coupon_id")] + public string? UserCouponId { get; set; } + } + + public class Extra + { + /// + /// 获取或设置用户备注。 + /// + [Newtonsoft.Json.JsonProperty("customer_notes")] + [System.Text.Json.Serialization.JsonPropertyName("customer_notes")] + public string? CustomerNotes { get; set; } + + /// + /// 获取或设置商家备注。 + /// + [Newtonsoft.Json.JsonProperty("merchant_notes")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_notes")] + public string? MerchantNotes { get; set; } + } + } + + /// + /// 获取或设置商品列表。 + /// + [Newtonsoft.Json.JsonProperty("product_infos")] + [System.Text.Json.Serialization.JsonPropertyName("product_infos")] + public Types.Product[] ProductList { get; set; } = default!; + + /// + /// 获取或设置支付信息。 + /// + [Newtonsoft.Json.JsonProperty("pay_info")] + [System.Text.Json.Serialization.JsonPropertyName("pay_info")] + public Types.Payment Payment { get; set; } = default!; + + /// + /// 获取或设置金额信息。 + /// + [Newtonsoft.Json.JsonProperty("price_info")] + [System.Text.Json.Serialization.JsonPropertyName("price_info")] + public Types.Amount Amount { get; set; } = default!; + + /// + /// 获取或设置快递信息。 + /// + [Newtonsoft.Json.JsonProperty("delivery_info")] + [System.Text.Json.Serialization.JsonPropertyName("delivery_info")] + public Types.Delivery? Delivery { get; set; } + + /// + /// 获取或设置优惠券信息。 + /// + [Newtonsoft.Json.JsonProperty("coupon_info")] + [System.Text.Json.Serialization.JsonPropertyName("coupon_info")] + public Types.Coupon? Coupon { get; set; } + + /// + /// 获取或设置扩展信息。 + /// + [Newtonsoft.Json.JsonProperty("ext_info")] + [System.Text.Json.Serialization.JsonPropertyName("ext_info")] + public Types.Extra? Extra { get; set; } + } + + public class AftersaleDetail + { + public static class Types + { + public class AftersaleOrder + { + /// + /// 获取或设置售后单 ID。 + /// + [Newtonsoft.Json.JsonProperty("aftersale_order_id")] + [System.Text.Json.Serialization.JsonPropertyName("aftersale_order_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long AftersaleOrderId { get; set; } + + /// + /// 获取或设置售后单状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + } + } + + /// + /// 获取或设置售后单列表。 + /// + [Newtonsoft.Json.JsonProperty("aftersale_order_list")] + [System.Text.Json.Serialization.JsonPropertyName("aftersale_order_list")] + public Types.AftersaleOrder[] AftersaleOrderList { get; set; } = default!; + + /// + /// 获取或设置正在售后流程中的售后单数。 + /// + [Newtonsoft.Json.JsonProperty("on_aftersale_order_cnt")] + [System.Text.Json.Serialization.JsonPropertyName("on_aftersale_order_cnt")] + public int OnAftersaleOrderCount { get; set; } + } + } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long OrderId { get; set; } + + /// + /// 获取或设置订单状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置订单详细信息。 + /// + [Newtonsoft.Json.JsonProperty("order_detail")] + [System.Text.Json.Serialization.JsonPropertyName("order_detail")] + public Types.OrderDetail OrderDetail { get; set; } = default!; + + /// + /// 获取或设置售后详细信息。 + /// + [Newtonsoft.Json.JsonProperty("aftersale_detail")] + [System.Text.Json.Serialization.JsonPropertyName("aftersale_detail")] + public Types.AftersaleDetail? AftersaleDetail { get; set; } + + /// + /// 获取或设置下单用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("update_time")] + [System.Text.Json.Serialization.JsonPropertyName("update_time")] + public long UpdateTimestamp { get; set; } + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置订单信息。 + /// + [Newtonsoft.Json.JsonProperty("order")] + [System.Text.Json.Serialization.JsonPropertyName("order")] + public Types.Order Order { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderListGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderListGetRequest.cs new file mode 100644 index 00000000..84118a8f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderListGetRequest.cs @@ -0,0 +1,71 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/order/list/get 接口的请求。 + /// + public class ChannelsECOrderListGetRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class TimeRange + { + /// + /// 获取或设置开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("start_time")] + [System.Text.Json.Serialization.JsonPropertyName("start_time")] + public long StartTimestamp { get; set; } + + /// + /// 获取或设置结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimestamp { get; set; } + } + } + + /// + /// 获取或设置创建订单时间范围。 + /// + [Newtonsoft.Json.JsonProperty("create_time_range")] + [System.Text.Json.Serialization.JsonPropertyName("create_time_range")] + public Types.TimeRange? CreateTimeRange { get; set; } + + /// + /// 获取或设置更新订单时间范围。 + /// + [Newtonsoft.Json.JsonProperty("update_time_range")] + [System.Text.Json.Serialization.JsonPropertyName("update_time_range")] + public Types.TimeRange? UpdateTimeRange { get; set; } + + /// + /// 获取或设置订单状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int? Status { get; set; } + + /// + /// 获取或设置下单用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? OpenId { get; set; } + + /// + /// 获取或设置翻页标记。 + /// + [Newtonsoft.Json.JsonProperty("next_key")] + [System.Text.Json.Serialization.JsonPropertyName("next_key")] + public string? Cursor { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonProperty("page_size")] + [System.Text.Json.Serialization.JsonPropertyName("page_size")] + public int Limit { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderListGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderListGetResponse.cs new file mode 100644 index 00000000..ca3e3492 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderListGetResponse.cs @@ -0,0 +1,30 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/order/list/get 接口的响应。 + /// + public class ChannelsECOrderListGetResponse : WechatApiResponse + { + /// + /// 获取或设置订单 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("order_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("order_id_list")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualLongArrayConverter))] + public long[] OrderIdList { get; set; } = default!; + + /// + /// 获取或设置翻页标记。 + /// + [Newtonsoft.Json.JsonProperty("next_key")] + [System.Text.Json.Serialization.JsonPropertyName("next_key")] + public string? NextCursor { get; set; } + + /// + /// 获取或设置是否还有更多。 + /// + [Newtonsoft.Json.JsonProperty("has_more")] + [System.Text.Json.Serialization.JsonPropertyName("has_more")] + public bool HasMore { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderMerchantNotesUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderMerchantNotesUpdateRequest.cs new file mode 100644 index 00000000..e1283df4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderMerchantNotesUpdateRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/order/merchantnotes/update 接口的请求。 + /// + public class ChannelsECOrderMerchantNotesUpdateRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public long OrderId { get; set; } + + /// + /// 获取或设置商家备注。 + /// + [Newtonsoft.Json.JsonProperty("merchant_notes")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_notes")] + public string MerchantNotes { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderMerchantNotesUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderMerchantNotesUpdateResponse.cs new file mode 100644 index 00000000..0684a6b4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderMerchantNotesUpdateResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/order/merchantnotes/update 接口的响应。 + /// + public class ChannelsECOrderMerchantNotesUpdateResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderPriceUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderPriceUpdateRequest.cs new file mode 100644 index 00000000..266d91a1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderPriceUpdateRequest.cs @@ -0,0 +1,65 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/order/price/update 接口的请求。 + /// + public class ChannelsECOrderPriceUpdateRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class Product + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public long ProductId { get; set; } + + /// + /// 获取或设置 SKU ID。 + /// + [Newtonsoft.Json.JsonProperty("sku_id")] + [System.Text.Json.Serialization.JsonPropertyName("sku_id")] + public long SKUId { get; set; } + + /// + /// 获取或设置修改后的总价(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("change_price")] + [System.Text.Json.Serialization.JsonPropertyName("change_price")] + public int TotalPrice { get; set; } + } + } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public long OrderId { get; set; } + + /// + /// 获取或设置是否修改运费。 + /// + [Newtonsoft.Json.JsonProperty("change_express")] + [System.Text.Json.Serialization.JsonPropertyName("change_express")] + public bool RequireChangeExpressFee { get; set; } + + /// + /// 获取或设置修改后的运费价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("express_fee")] + [System.Text.Json.Serialization.JsonPropertyName("express_fee")] + public int? ExpressFee { get; set; } + + /// + /// 获取或设置改价商品列表。 + /// + [Newtonsoft.Json.JsonProperty("change_order_infos")] + [System.Text.Json.Serialization.JsonPropertyName("change_order_infos")] + public IList? ProductList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderPriceUpdateResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderPriceUpdateResponse.cs new file mode 100644 index 00000000..01110582 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderPriceUpdateResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/order/price/update 接口的响应。 + /// + public class ChannelsECOrderPriceUpdateResponse : WechatApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderSearchRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderSearchRequest.cs new file mode 100644 index 00000000..cf345f33 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderSearchRequest.cs @@ -0,0 +1,85 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/order/search 接口的请求。 + /// + public class ChannelsECOrderSearchRequest : WechatApiRequest, IInferable + { + public static class Types + { + public class SearchCondition + { + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// 获取或设置商品编码。 + /// + [Newtonsoft.Json.JsonProperty("sku_code")] + [System.Text.Json.Serialization.JsonPropertyName("sku_code")] + public string? SKUCode { get; set; } + + /// + /// 获取或设置收件人姓名。 + /// + [Newtonsoft.Json.JsonProperty("user_name")] + [System.Text.Json.Serialization.JsonPropertyName("user_name")] + public string? UserName { get; set; } + + /// + /// 获取或设置收件人电话号码。 + /// + [Newtonsoft.Json.JsonProperty("tel_number")] + [System.Text.Json.Serialization.JsonPropertyName("tel_number")] + public string? TeleNumber { get; set; } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public long? OrderId { get; set; } + } + } + + /// + /// 获取或设置搜索条件。 + /// + [Newtonsoft.Json.JsonProperty("search_condition")] + [System.Text.Json.Serialization.JsonPropertyName("search_condition")] + public Types.SearchCondition SearchCondition { get; set; } = new Types.SearchCondition(); + + /// + /// 获取或设置订单状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int? Status { get; set; } + + /// + /// 获取或设置售后订单状态。 + /// + [Newtonsoft.Json.JsonProperty("on_aftersale_order_exist")] + [System.Text.Json.Serialization.JsonPropertyName("on_aftersale_order_exist")] + public int? OnAftersaleOrderStatus { get; set; } + + /// + /// 获取或设置翻页标记。 + /// + [Newtonsoft.Json.JsonProperty("next_key")] + [System.Text.Json.Serialization.JsonPropertyName("next_key")] + public string? Cursor { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonProperty("page_size")] + [System.Text.Json.Serialization.JsonPropertyName("page_size")] + public int Limit { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderSearchResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderSearchResponse.cs new file mode 100644 index 00000000..dbef4212 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/ChannelsECOrderSearchResponse.cs @@ -0,0 +1,30 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/order/search 接口的响应。 + /// + public class ChannelsECOrderSearchResponse : WechatApiResponse + { + /// + /// 获取或设置订单 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("orders")] + [System.Text.Json.Serialization.JsonPropertyName("orders")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualLongArrayConverter))] + public long[] OrderIdList { get; set; } = default!; + + /// + /// 获取或设置翻页标记。 + /// + [Newtonsoft.Json.JsonProperty("next_key")] + [System.Text.Json.Serialization.JsonPropertyName("next_key")] + public string? NextCursor { get; set; } + + /// + /// 获取或设置是否还有更多。 + /// + [Newtonsoft.Json.JsonProperty("has_more")] + [System.Text.Json.Serialization.JsonPropertyName("has_more")] + public bool HasMore { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/Delivery/ChannelsECOrderDeliverySendRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/Delivery/ChannelsECOrderDeliverySendRequest.cs index e73f5160..40854653 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/Delivery/ChannelsECOrderDeliverySendRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECOrder/Delivery/ChannelsECOrderDeliverySendRequest.cs @@ -57,7 +57,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models /// [Newtonsoft.Json.JsonProperty("deliver_type")] [System.Text.Json.Serialization.JsonPropertyName("deliver_type")] - public int DeliverMethod { get; set; } + public int DeliverType { get; set; } /// /// 获取或设置商品列表。 diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductGetResponse.cs index f0351707..c120f0ae 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/ChannelsECProductGetResponse.cs @@ -9,7 +9,6 @@ { public class Product { - public static class Types { public class Detail diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/LimitedDiscountTask/ChannelsECProductLimitedDiscountTaskListGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/LimitedDiscountTask/ChannelsECProductLimitedDiscountTaskListGetRequest.cs index 59c84000..8501fd04 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/LimitedDiscountTask/ChannelsECProductLimitedDiscountTaskListGetRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECProduct/LimitedDiscountTask/ChannelsECProductLimitedDiscountTaskListGetRequest.cs @@ -6,7 +6,7 @@ public class ChannelsECProductLimitedDiscountTaskListGetRequest : WechatApiRequest, IInferable { /// - /// 获取或设置指定抢购任务状态。 + /// 获取或设置抢购任务状态。 /// [Newtonsoft.Json.JsonProperty("status")] [System.Text.Json.Serialization.JsonPropertyName("status")] diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductGetRequest.cs new file mode 100644 index 00000000..96d6a552 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductGetRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/window/product/get 接口的请求。 + /// + public class ChannelsECWindowProductGetRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public long ProductId { get; set; } + + /// + /// 获取或设置商品来源店铺的 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductGetResponse.cs new file mode 100644 index 00000000..4addeca5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductGetResponse.cs @@ -0,0 +1,265 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/window/product/get 接口的响应。 + /// + public class ChannelsECWindowProductGetResponse : WechatApiResponse + { + public static class Types + { + public class Product + { + public static class Types + { + public class MiniProgramPagePath + { + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置半屏页面路径。 + /// + [Newtonsoft.Json.JsonProperty("half_page_path")] + [System.Text.Json.Serialization.JsonPropertyName("half_page_path")] + public string? HalfPagePath { get; set; } + + /// + /// 获取或设置全屏页面路径。 + /// + [Newtonsoft.Json.JsonProperty("full_page_path")] + [System.Text.Json.Serialization.JsonPropertyName("full_page_path")] + public string? FullPagePath { get; set; } + } + + public class BannedDetail + { + /// + /// 获取或设置仅售原因 ID。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public int ReasonId { get; set; } + + /// + /// 获取或设置需要申请的类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("need_apply_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("need_apply_category_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public int? RequiredCategoryId { get; set; } = default!; + + /// + /// 获取或设置需要申请的类目名称。 + /// + [Newtonsoft.Json.JsonProperty("need_apply_category_name")] + [System.Text.Json.Serialization.JsonPropertyName("need_apply_category_name")] + public string? RequiredCategoryName { get; set; } + } + + public class Branch + { + /// + /// 获取或设置分店 ID。 + /// + [Newtonsoft.Json.JsonProperty("branch_id")] + [System.Text.Json.Serialization.JsonPropertyName("branch_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long BranchId { get; set; } + + /// + /// 获取或设置分店名。 + /// + [Newtonsoft.Json.JsonProperty("branch_name")] + [System.Text.Json.Serialization.JsonPropertyName("branch_name")] + public string BranchName { get; set; } = default!; + + /// + /// 获取或设置分店状态。 + /// + [Newtonsoft.Json.JsonProperty("branch_status")] + [System.Text.Json.Serialization.JsonPropertyName("branch_status")] + public int BranchStatus { get; set; } + } + + public class LimitedDiscount + { + /// + /// 获取或设置是否有生效中的抢购活动。 + /// + [Newtonsoft.Json.JsonProperty("is_effect")] + [System.Text.Json.Serialization.JsonPropertyName("is_effect")] + public bool IsEffective { get; set; } + + /// + /// 获取或设置抢购价(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("discount_price")] + [System.Text.Json.Serialization.JsonPropertyName("discount_price")] + public int DiscountPrice { get; set; } + + /// + /// 获取或设置剩余库存。 + /// + [Newtonsoft.Json.JsonProperty("stock")] + [System.Text.Json.Serialization.JsonPropertyName("stock")] + public int Stock { get; set; } + + /// + /// 获取或设置活动结束时间毫秒级时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time_ms")] + [System.Text.Json.Serialization.JsonPropertyName("end_time_ms")] + public long EndTimeMilliseconds { get; set; } + } + } + + /// + /// 获取或设置商品来源店铺的 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long ProductId { get; set; } + + /// + /// 获取或设置商家自定义商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("out_product_id")] + [System.Text.Json.Serialization.JsonPropertyName("out_product_id")] + public string? OutProductId { get; set; } + + /// + /// 获取或设置商品标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置商品头图 URL。 + /// + [Newtonsoft.Json.JsonProperty("img_url")] + [System.Text.Json.Serialization.JsonPropertyName("img_url")] + public string ImageUrl { get; set; } = default!; + + /// + /// 获取或设置商品三级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("third_category_id")] + [System.Text.Json.Serialization.JsonPropertyName("third_category_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public int ThirdCategoryId { get; set; } + + /// + /// 获取或设置商品状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置市场价(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("market_price")] + [System.Text.Json.Serialization.JsonPropertyName("market_price")] + public int MarketPrice { get; set; } + + /// + /// 获取或设置销售价(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("selling_price")] + [System.Text.Json.Serialization.JsonPropertyName("selling_price")] + public int SellingPrice { get; set; } + + /// + /// 获取或设置库存。 + /// + [Newtonsoft.Json.JsonProperty("stock")] + [System.Text.Json.Serialization.JsonPropertyName("stock")] + public int Stock { get; set; } + + /// + /// 获取或设置销量。 + /// + [Newtonsoft.Json.JsonProperty("sales")] + [System.Text.Json.Serialization.JsonPropertyName("sales")] + public int Sales { get; set; } + + /// + /// 获取或设置商品详情页小程序信息。 + /// + [Newtonsoft.Json.JsonProperty("page_path")] + [System.Text.Json.Serialization.JsonPropertyName("page_path")] + public Types.MiniProgramPagePath? MiniProgramPagePath { get; set; } + + /// + /// 获取或设置电商平台 ID。 + /// + [Newtonsoft.Json.JsonProperty("platform_id")] + [System.Text.Json.Serialization.JsonPropertyName("platform_id")] + public long? PlatformId { get; set; } + + /// + /// 获取或设置电商平台名。 + /// + [Newtonsoft.Json.JsonProperty("platform_name")] + [System.Text.Json.Serialization.JsonPropertyName("platform_name")] + public string? PlatformName { get; set; } + + /// + /// 获取或设置是否需要在个人橱窗页隐藏。 + /// + [Newtonsoft.Json.JsonProperty("is_hide_for_window")] + [System.Text.Json.Serialization.JsonPropertyName("is_hide_for_window")] + public bool IsHideForWindow { get; set; } + + /// + /// 获取或设置是否禁止售卖。 + /// + [Newtonsoft.Json.JsonProperty("banned")] + [System.Text.Json.Serialization.JsonPropertyName("banned")] + public bool IsBanned { get; set; } + + /// + /// 获取或设置禁售详细信息。 + /// + [Newtonsoft.Json.JsonProperty("banned_details")] + [System.Text.Json.Serialization.JsonPropertyName("banned_details")] + public Types.BannedDetail? BannedDetail { get; set; } + + /// + /// 获取或设置分店信息。 + /// + [Newtonsoft.Json.JsonProperty("branch_info")] + [System.Text.Json.Serialization.JsonPropertyName("branch_info")] + public Types.Branch? Branch { get; set; } + + /// + /// 获取或设置抢购活动信息。 + /// + [Newtonsoft.Json.JsonProperty("limit_discount_info")] + [System.Text.Json.Serialization.JsonPropertyName("limit_discount_info")] + public Types.LimitedDiscount? LimitedDiscount { get; set; } + } + } + + /// + /// 获取或设置橱窗商品信息。 + /// + [Newtonsoft.Json.JsonProperty("product")] + [System.Text.Json.Serialization.JsonPropertyName("product")] + public Types.Product Product { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductListGetRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductListGetRequest.cs new file mode 100644 index 00000000..2a1dacc5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductListGetRequest.cs @@ -0,0 +1,54 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/window/product/list/get 接口的请求。 + /// + public class ChannelsECWindowProductListGetRequest : WechatApiRequest, IInferable + { + /// + /// 获取或设置商品来源店铺的 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置分店 ID。 + /// + [Newtonsoft.Json.JsonProperty("branch_id")] + [System.Text.Json.Serialization.JsonPropertyName("branch_id")] + public long? BranchId { get; set; } + + /// + /// 获取或设置分页页数(从 1 开始)。 + /// 默认值:1 + /// + [Newtonsoft.Json.JsonProperty("page_index")] + [System.Text.Json.Serialization.JsonPropertyName("page_index")] + public int Page { get; set; } = 1; + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonProperty("page_size")] + [System.Text.Json.Serialization.JsonPropertyName("page_size")] + public int Limit { get; set; } = 10; + + /// + /// 获取或设置翻页标记。 + /// + [Newtonsoft.Json.JsonProperty("last_buffer")] + [System.Text.Json.Serialization.JsonPropertyName("last_buffer")] + public string? Cursor { get; set; } + + /// + /// 获取或设置是否需要返回总数量。 + /// + [Newtonsoft.Json.JsonProperty("need_total_num")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("need_total_num")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? RequireTotalCount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductListGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductListGetResponse.cs new file mode 100644 index 00000000..b9535fac --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/Channels/ECWindow/ChannelsECWindowProductListGetResponse.cs @@ -0,0 +1,50 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Models +{ + /// + /// 表示 [POST] /channels/ec/window/product/list/get 接口的响应。 + /// + public class ChannelsECWindowProductListGetResponse : WechatApiResponse + { + public static class Types + { + public class Product + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long ProductId { get; set; } + + /// + /// 获取或设置商品来源店铺的 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + } + } + + /// + /// 获取或设置橱窗商品列表。 + /// + [Newtonsoft.Json.JsonProperty("products")] + [System.Text.Json.Serialization.JsonPropertyName("products")] + public Types.Product[] ProductList { get; set; } = default!; + + /// + /// 获取或设置翻页标记。 + /// + [Newtonsoft.Json.JsonProperty("last_buffer")] + [System.Text.Json.Serialization.JsonPropertyName("last_buffer")] + public string? NextCursor { get; set; } + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_num")] + [System.Text.Json.Serialization.JsonPropertyName("total_num")] + public int? TotalCount { get; set; } + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderCancelEvent.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderCancelEvent.json new file mode 100644 index 00000000..9d9e7bb7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderCancelEvent.json @@ -0,0 +1,11 @@ +{ + "ToUserName": "gh_*", + "FromUserName": "OPENID", + "CreateTime": 1662480000, + "MsgType": "event", + "Event": "channels_ec_order_cancel", + "order_info": { + "order_id": "3705115058471208928", + "cancel_type": "1" + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderConfirmEvent.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderConfirmEvent.json new file mode 100644 index 00000000..9396a7e7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderConfirmEvent.json @@ -0,0 +1,11 @@ +{ + "ToUserName": "gh_*", + "FromUserName": "OPENID", + "CreateTime": 1662480000, + "MsgType": "event", + "Event": "channels_ec_order_confirm", + "order_info": { + "order_id": "3705115058471208928", + "confirm_type": "1" + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderPayEvent.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderPayEvent.json new file mode 100644 index 00000000..6b7ba651 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderPayEvent.json @@ -0,0 +1,11 @@ +{ + "ToUserName": "gh_*", + "FromUserName": "OPENID", + "CreateTime": 1662480000, + "MsgType": "event", + "Event": "channels_ec_order_pay", + "order_info": { + "order_id": "3705115058471208928", + "pay_time": "1658509200" + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderSettleEvent.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderSettleEvent.json new file mode 100644 index 00000000..2efa50fa --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/EventSamples/ChannelsEC/ChannelsECOrderSettleEvent.json @@ -0,0 +1,11 @@ +{ + "ToUserName": "gh_*", + "FromUserName": "OPENID", + "CreateTime": 1662480000, + "MsgType": "event", + "Event": "channels_ec_order_settle", + "order_info": { + "order_id": "3705115058471208928", + "settle_time": "1662480000" + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderAddressUpdateRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderAddressUpdateRequest.json new file mode 100644 index 00000000..cbc77747 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderAddressUpdateRequest.json @@ -0,0 +1,13 @@ +{ + "order_id": "123456", + "user_address": { + "user_name": "陈先生", + "postal_code": "2435245", + "province_name": "广东", + "city_name": "广州", + "county_name": "海珠区", + "detail_info": "大塘", + "national_code": "234234", + "tel_number": "24534252" + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderGetRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderGetRequest.json new file mode 100644 index 00000000..5bf57ee9 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderGetRequest.json @@ -0,0 +1,3 @@ +{ + "order_id": "37423523451235145" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderGetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderGetResponse.json new file mode 100644 index 00000000..06e3e542 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderGetResponse.json @@ -0,0 +1,84 @@ +{ + "errcode": 0, + "errmsg": "ok", + "order": { + "order_id": "37423523451235145", + "status": 20, + "create_time": 1658505600, + "update_time": 1658505600, + "order_detail": { + "product_infos": [ + { + "product_id": 234245, + "sku_id": 23424, + "sku_cnt": 10, + "on_aftersale_sku_cnt": 10, + "finish_aftersale_sku_cnt": 0, + "title": "健身环", + "thumb_img": "https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ", + "sale_price": 2000, + "market_price": 2000 + } + ], + "pay_info": { + "prepay_id": "42526234625", + "transaction_id": "131456479687", + "prepay_time": 1658509200, + "pay_time": 1658509200 + }, + "price_info": { + "product_price": 20000, + "order_price": 10500, + "freight": 500, + "discounted_price": 10000, + "is_discounted": true + }, + "delivery_info": { + "address_info": { + "user_name": "陈先生", + "postal_code": "2435245", + "province_name": "广东", + "city_name": "广州", + "county_name": "海珠区", + "detail_info": "大塘", + "national_code": "234234", + "tel_number": "24534252" + }, + "delivery_product_info": [ + { + "waybill_id": "134654612313", + "delivery_id": "STO", + "delivery_time": 1620738080, + "deliver_type": 1, + "product_infos": [ + { + "product_id": "234245", + "sku_id": "23424", + "product_cnt": 1 + } + ] + } + ], + "ship_done_time": 1620738080, + "deliver_method": 0 + }, + "coupon_info": { + "user_coupon_id": "301234567890" + }, + "ext_info": { + "customer_notes": "发顺丰", + "merchant_notes": "库存不足,取消" + } + }, + "aftersale_detail": { + "aftersale_order_list": [ + { + "aftersale_order_id": "1234", + "status": 13 + } + ], + "on_aftersale_order_cnt": 1 + }, + "openid": "OPENID" + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderListGetRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderListGetRequest.json new file mode 100644 index 00000000..ca6b82bf --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderListGetRequest.json @@ -0,0 +1,8 @@ +{ + "create_time_range": { + "start_time": 1658505600, + "end_time": 1658509200 + }, + "page_size": 10, + "next_key": "THE_NEXT_KEY" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderListGetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderListGetResponse.json new file mode 100644 index 00000000..69dce375 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderListGetResponse.json @@ -0,0 +1,7 @@ +{ + "errcode": 0, + "errmsg": "ok", + "order_id_list": ["3704612354559743232", "3704849110714209536"], + "next_key": "THE_NEXT_KEY_NEW", + "has_more": true +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderMerchantNotesUpdateRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderMerchantNotesUpdateRequest.json new file mode 100644 index 00000000..e9061087 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderMerchantNotesUpdateRequest.json @@ -0,0 +1,4 @@ +{ + "order_id": "123456", + "merchant_notes": "abc" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderPriceUpdateRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderPriceUpdateRequest.json new file mode 100644 index 00000000..a9990021 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderPriceUpdateRequest.json @@ -0,0 +1,12 @@ +{ + "order_id": "123456", + "change_express": true, + "express_fee": 0, + "change_order_infos": [ + { + "product_id": "1234", + "sku_id": "5678", + "change_price": 300 + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderSearchRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderSearchRequest.json new file mode 100644 index 00000000..bda54657 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderSearchRequest.json @@ -0,0 +1,13 @@ +{ + "search_condition": { + "title": "标题关键字", + "sku_code": "12321", + "user_name": "张三", + "tel_number": "13700000000", + "order_id": "3713218625342112768" + }, + "on_aftersale_order_exist": 0, + "status": 20, + "page_size": 10, + "next_key": "THE_NEXT_KEY" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderSearchResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderSearchResponse.json new file mode 100644 index 00000000..33693d61 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECOrder/ChannelsECOrderSearchResponse.json @@ -0,0 +1,7 @@ +{ + "errcode": 0, + "errmsg": "ok", + "orders": ["3715847042071365120", "3715847042071365121"], + "has_more": false, + "next_key": "THE_NEXT_KEY_NEW" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductGetRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductGetRequest.json new file mode 100644 index 00000000..db74e46f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductGetRequest.json @@ -0,0 +1,4 @@ +{ + "product_id": "100234056", + "appid": "wxee9f94a3360ad25f" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductGetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductGetResponse.json new file mode 100644 index 00000000..5be2445b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductGetResponse.json @@ -0,0 +1,32 @@ +{ + "errcode": 0, + "errmsg": "ok", + "product": { + "product_id": "100234056", + "out_product_id": "out_100234056", + "title": "任天堂 Nintendo Switch 国行续航增强版 NS家用体感游戏机掌机 便携掌上游戏机 红蓝主机", + "img_url": "https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ", + "third_category_id": 6091, + "status": 1, + "market_price": 1500, + "selling_price": 1300, + "stock": 100, + "sales": 888, + "appid": "wxee9f94a3360ad25f", + "page_path": { + "appid": "wxee9f94a3360ad25f", + "half_page_path": "pages/buy/productDetail?productId=2176180", + "full_page_path": "pages/productDetail/productDetail?productId=2176180" + }, + "platform_id": 0, + "platform_name": "我的小店", + "is_hide_for_window": false, + "banned": false, + "limit_discount_info": { + "is_effect": true, + "discount_price": 1300, + "end_time_ms": 1666086005500, + "stock": 10 + } + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductListGetRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductListGetRequest.json new file mode 100644 index 00000000..000177e6 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductListGetRequest.json @@ -0,0 +1,6 @@ +{ + "appid": "wxee9f94a3360ad25f", + "page_size": 1, + "page_index": 1, + "need_total_num": true +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductListGetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductListGetResponse.json new file mode 100644 index 00000000..f2dc2acc --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Api.UnitTests/ModelSamples/Channels/ECWindow/ChannelsECWindowProductListGetResponse.json @@ -0,0 +1,12 @@ +{ + "errcode": 0, + "errmsg": "ok", + "products": [ + { + "product_id": "100234056", + "appid": "wxee9f94a3360ad25f" + } + ], + "last_buffer": "EB4YAg=", + "total_num": 11 +}