mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-15 23:13:32 +08:00
feat(wxapi): 新增视频号小店订单相关接口
This commit is contained in:
parent
7389dca63c
commit
9fa7c11ec7
@ -0,0 +1,41 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.channels_ec_order_cancel 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/order/callback/channels_ec_order_cancel.html </para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderCancelEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Order
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单号。
|
||||
/// </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("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; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <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!;
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.channels_ec_order_confirm 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/order/callback/channels_ec_order_confirm.html </para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderConfirmEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Order
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单号。
|
||||
/// </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("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; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <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!;
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.channels_ec_order_pay 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/order/callback/channels_ec_order_pay.html </para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderPayEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Order
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单号。
|
||||
/// </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("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; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <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!;
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.channels_ec_order_settle 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/order/callback/channels_ec_order_settle.html </para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderSettleEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Order
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单号。
|
||||
/// </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("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; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <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!;
|
||||
}
|
||||
}
|
@ -8,7 +8,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class EventData
|
||||
public class Category
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置审核单 ID。
|
||||
@ -24,6 +24,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
/// </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; }
|
||||
|
||||
@ -38,11 +39,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置事件数据。
|
||||
/// 获取或设置分类信息。
|
||||
/// </summary>
|
||||
[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!;
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class EventData
|
||||
public class Product
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。
|
||||
@ -24,6 +24,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
/// </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; }
|
||||
|
||||
@ -38,11 +39,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置事件数据。
|
||||
/// 获取或设置商品信息。
|
||||
/// </summary>
|
||||
[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!;
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class EventData
|
||||
public class Product
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。
|
||||
@ -24,6 +24,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
/// </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; }
|
||||
|
||||
@ -38,11 +39,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置事件数据。
|
||||
/// 获取或设置商品信息。
|
||||
/// </summary>
|
||||
[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!;
|
||||
}
|
||||
}
|
||||
|
@ -568,6 +568,126 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
#endregion
|
||||
|
||||
#region ECOrder
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/search 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/order/search.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECOrderSearchResponse> 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<Models.ChannelsECOrderSearchResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/list/get 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/order/list_get.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECOrderListGetResponse> 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<Models.ChannelsECOrderListGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/get 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/order/get.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECOrderGetResponse> 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<Models.ChannelsECOrderGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/price/update 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/order/price_update.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECOrderPriceUpdateResponse> 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<Models.ChannelsECOrderPriceUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/merchantnotes/update 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/order/merchantnotes_update.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECOrderMerchantNotesUpdateResponse> 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<Models.ChannelsECOrderMerchantNotesUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/address/update 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/order/address_update.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECOrderAddressUpdateResponse> 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<Models.ChannelsECOrderAddressUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
#region ECOrder/Delivery
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/order/deliverycompanylist/get 接口。</para>
|
||||
@ -651,6 +771,46 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECWindowProductOffResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/window/product/get 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/windowproduct/get.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECWindowProductGetResponse> 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<Models.ChannelsECWindowProductGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/window/product/list/get 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/windowproduct/list_get.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECWindowProductListGetResponse> 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<Models.ChannelsECWindowProductListGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,29 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/address/update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderAddressUpdateRequest : WechatApiRequest, IInferable<ChannelsECOrderAddressUpdateRequest, ChannelsECOrderAddressUpdateResponse>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Address : ChannelsECMerchantAddFreightTemplateRequest.Types.FreightTemplate.Types.Address
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置新地址信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_address")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_address")]
|
||||
public Types.Address Address { get; set; } = new Types.Address();
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/address/update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderAddressUpdateResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderGetRequest : WechatApiRequest, IInferable<ChannelsECOrderGetRequest, ChannelsECOrderGetResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long OrderId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,494 @@
|
||||
using System;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
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
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <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)]
|
||||
public long ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU ID。
|
||||
/// </summary>
|
||||
[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; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sku_cnt")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sku_cnt")]
|
||||
public int Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置正在售后流程中的商品数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("on_aftersale_sku_cnt")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("on_aftersale_sku_cnt")]
|
||||
public int OnAftersaleCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置已完成售后流程的商品数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("finish_aftersale_sku_cnt")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("finish_aftersale_sku_cnt")]
|
||||
public int FinishAftersaleCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品缩略图 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("thumb_img")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("thumb_img")]
|
||||
public string ThumbnailImageUrl { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品原价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("market_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("market_price")]
|
||||
public int MarketPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品售价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sale_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sale_price")]
|
||||
public int SalePrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品实付价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("real_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("real_price")]
|
||||
public int? RealPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品属性列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sku_attrs")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sku_attrs")]
|
||||
public Types.Attribute[]? AttributeList { get; set; }
|
||||
}
|
||||
|
||||
public class Payment
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置预支付单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("prepay_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("prepay_id")]
|
||||
public string PrepayId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置预支付时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("prepay_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("prepay_time")]
|
||||
public long PrepayTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信支付交易单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("transaction_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("transaction_id")]
|
||||
public string? TransactionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置付款时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_time")]
|
||||
public long? PayTimestamp { get; set; }
|
||||
}
|
||||
|
||||
public class Amount
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_price")]
|
||||
public int ProductPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_price")]
|
||||
public int OrderPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置运费(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("freight")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("freight")]
|
||||
public int FreightPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("discounted_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("discounted_price")]
|
||||
public int DiscountedPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否有优惠。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_discounted")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_discounted")]
|
||||
public bool IsDiscounted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单原始价格(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("original_order_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("original_order_price")]
|
||||
public int? OriginalOrderPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品预估价格(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("estimate_product_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("estimate_product_price")]
|
||||
public int? EstimatedProductPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置改价后降低金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("change_down_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("change_down_price")]
|
||||
public int? ChangedDownPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置改价后运费(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("change_freight")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("change_freight")]
|
||||
public int? ChangedFreightPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否修改运费。
|
||||
/// </summary>
|
||||
[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
|
||||
{
|
||||
/// <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)]
|
||||
public long ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU ID。
|
||||
/// </summary>
|
||||
[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; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_cnt")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_cnt")]
|
||||
public int Count { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递方式。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("deliver_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("deliver_type")]
|
||||
public int DeliverType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递公司 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
|
||||
public string DeliveryId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递单号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("waybill_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("waybill_id")]
|
||||
public string WaybillId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置发货时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_time")]
|
||||
public long DeliveryTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品列表。
|
||||
/// </summary>
|
||||
[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
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置虚拟发货订单电话号码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("virtual_order_tel_number")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("virtual_order_tel_number")]
|
||||
public string? VirtualOrderTeleNumber { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置发货方式。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("deliver_method")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("deliver_method")]
|
||||
public int DeliverMethod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置地址信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("address_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("address_info")]
|
||||
public Types.Address? Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置发货商品信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_product_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_product_info")]
|
||||
public Types.DeliveryProduct[] DeliveryProductList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置配送完成时间戳。
|
||||
/// </summary>
|
||||
[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
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户优惠券 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_coupon_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_coupon_id")]
|
||||
public string? UserCouponId { get; set; }
|
||||
}
|
||||
|
||||
public class Extra
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户备注。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("customer_notes")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("customer_notes")]
|
||||
public string? CustomerNotes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家备注。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("merchant_notes")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("merchant_notes")]
|
||||
public string? MerchantNotes { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_infos")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_infos")]
|
||||
public Types.Product[] ProductList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置支付信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_info")]
|
||||
public Types.Payment Payment { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置金额信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("price_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("price_info")]
|
||||
public Types.Amount Amount { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置快递信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delivery_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delivery_info")]
|
||||
public Types.Delivery? Delivery { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠券信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("coupon_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("coupon_info")]
|
||||
public Types.Coupon? Coupon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置扩展信息。
|
||||
/// </summary>
|
||||
[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
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置售后单 ID。
|
||||
/// </summary>
|
||||
[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; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售后单状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售后单列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("aftersale_order_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("aftersale_order_list")]
|
||||
public Types.AftersaleOrder[] AftersaleOrderList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置正在售后流程中的售后单数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("on_aftersale_order_cnt")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("on_aftersale_order_cnt")]
|
||||
public int OnAftersaleOrderCount { 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)]
|
||||
public long OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单详细信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_detail")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_detail")]
|
||||
public Types.OrderDetail OrderDetail { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售后详细信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("aftersale_detail")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("aftersale_detail")]
|
||||
public Types.AftersaleDetail? AftersaleDetail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置下单用户 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置更新时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("update_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("update_time")]
|
||||
public long UpdateTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order")]
|
||||
public Types.Order Order { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/list/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderListGetRequest : WechatApiRequest, IInferable<ChannelsECOrderListGetRequest, ChannelsECOrderListGetResponse>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class TimeRange
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置开始时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("start_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("start_time")]
|
||||
public long StartTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置结束时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("end_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("end_time")]
|
||||
public long EndTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建订单时间范围。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time_range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time_range")]
|
||||
public Types.TimeRange? CreateTimeRange { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置更新订单时间范围。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("update_time_range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("update_time_range")]
|
||||
public Types.TimeRange? UpdateTimeRange { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置下单用户 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string? OpenId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// <para>默认值:10</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
|
||||
public int Limit { get; set; } = 10;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/list/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderListGetResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID 列表。
|
||||
/// </summary>
|
||||
[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!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
|
||||
public string? NextCursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否还有更多。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("has_more")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("has_more")]
|
||||
public bool HasMore { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/merchantnotes/update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderMerchantNotesUpdateRequest : WechatApiRequest, IInferable<ChannelsECOrderMerchantNotesUpdateRequest, ChannelsECOrderMerchantNotesUpdateResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家备注。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("merchant_notes")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("merchant_notes")]
|
||||
public string MerchantNotes { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/merchantnotes/update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderMerchantNotesUpdateResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/price/update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderPriceUpdateRequest : WechatApiRequest, IInferable<ChannelsECOrderPriceUpdateRequest, ChannelsECOrderPriceUpdateResponse>
|
||||
{
|
||||
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("change_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("change_price")]
|
||||
public int TotalPrice { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否修改运费。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("change_express")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("change_express")]
|
||||
public bool RequireChangeExpressFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置修改后的运费价格(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("express_fee")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("express_fee")]
|
||||
public int? ExpressFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置改价商品列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("change_order_infos")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("change_order_infos")]
|
||||
public IList<Types.Product>? ProductList { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/price/update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderPriceUpdateResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/search 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderSearchRequest : WechatApiRequest, IInferable<ChannelsECOrderSearchRequest, ChannelsECOrderSearchResponse>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class SearchCondition
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品编码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sku_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sku_code")]
|
||||
public string? SKUCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置收件人姓名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_name")]
|
||||
public string? UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置收件人电话号码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("tel_number")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("tel_number")]
|
||||
public string? TeleNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
|
||||
public long? OrderId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置搜索条件。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("search_condition")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("search_condition")]
|
||||
public Types.SearchCondition SearchCondition { get; set; } = new Types.SearchCondition();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售后订单状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("on_aftersale_order_exist")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("on_aftersale_order_exist")]
|
||||
public int? OnAftersaleOrderStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// <para>默认值:10</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
|
||||
public int Limit { get; set; } = 10;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/order/search 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECOrderSearchResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID 列表。
|
||||
/// </summary>
|
||||
[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!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
|
||||
public string? NextCursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否还有更多。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("has_more")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("has_more")]
|
||||
public bool HasMore { get; set; }
|
||||
}
|
||||
}
|
@ -57,7 +57,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("deliver_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("deliver_type")]
|
||||
public int DeliverMethod { get; set; }
|
||||
public int DeliverType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品列表。
|
||||
|
@ -9,7 +9,6 @@
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
|
||||
public static class Types
|
||||
{
|
||||
public class Detail
|
||||
|
@ -6,7 +6,7 @@
|
||||
public class ChannelsECProductLimitedDiscountTaskListGetRequest : WechatApiRequest, IInferable<ChannelsECProductLimitedDiscountTaskListGetRequest, ChannelsECProductLimitedDiscountTaskListGetResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置指定抢购任务状态。
|
||||
/// 获取或设置抢购任务状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/window/product/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECWindowProductGetRequest : WechatApiRequest, IInferable<ChannelsECWindowProductGetRequest, ChannelsECWindowProductGetResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
|
||||
public long ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品来源店铺的 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,265 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/window/product/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECWindowProductGetResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class MiniProgramPagePath
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置小程序 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置半屏页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("half_page_path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("half_page_path")]
|
||||
public string? HalfPagePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置全屏页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("full_page_path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("full_page_path")]
|
||||
public string? FullPagePath { get; set; }
|
||||
}
|
||||
|
||||
public class BannedDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置仅售原因 ID。
|
||||
/// </summary>
|
||||
[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; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置需要申请的类目 ID。
|
||||
/// </summary>
|
||||
[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!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置需要申请的类目名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("need_apply_category_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("need_apply_category_name")]
|
||||
public string? RequiredCategoryName { get; set; }
|
||||
}
|
||||
|
||||
public class Branch
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分店 ID。
|
||||
/// </summary>
|
||||
[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; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分店名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("branch_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("branch_name")]
|
||||
public string BranchName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分店状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("branch_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("branch_status")]
|
||||
public int BranchStatus { get; set; }
|
||||
}
|
||||
|
||||
public class LimitedDiscount
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否有生效中的抢购活动。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_effect")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_effect")]
|
||||
public bool IsEffective { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置抢购价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("discount_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("discount_price")]
|
||||
public int DiscountPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置剩余库存。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("stock")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("stock")]
|
||||
public int Stock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置活动结束时间毫秒级时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("end_time_ms")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("end_time_ms")]
|
||||
public long EndTimeMilliseconds { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品来源店铺的 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = default!;
|
||||
|
||||
/// <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)]
|
||||
public long ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商家自定义商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("out_product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
|
||||
public string? OutProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品头图 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("img_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("img_url")]
|
||||
public string ImageUrl { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品三级类目 ID。
|
||||
/// </summary>
|
||||
[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; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置市场价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("market_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("market_price")]
|
||||
public int MarketPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置销售价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("selling_price")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("selling_price")]
|
||||
public int SellingPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置库存。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("stock")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("stock")]
|
||||
public int Stock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置销量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sales")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sales")]
|
||||
public int Sales { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品详情页小程序信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_path")]
|
||||
public Types.MiniProgramPagePath? MiniProgramPagePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置电商平台 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("platform_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("platform_id")]
|
||||
public long? PlatformId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置电商平台名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("platform_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("platform_name")]
|
||||
public string? PlatformName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否需要在个人橱窗页隐藏。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_hide_for_window")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_hide_for_window")]
|
||||
public bool IsHideForWindow { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否禁止售卖。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("banned")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("banned")]
|
||||
public bool IsBanned { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置禁售详细信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("banned_details")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("banned_details")]
|
||||
public Types.BannedDetail? BannedDetail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分店信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("branch_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("branch_info")]
|
||||
public Types.Branch? Branch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置抢购活动信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit_discount_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit_discount_info")]
|
||||
public Types.LimitedDiscount? LimitedDiscount { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置橱窗商品信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product")]
|
||||
public Types.Product Product { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/window/product/list/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECWindowProductListGetRequest : WechatApiRequest, IInferable<ChannelsECWindowProductListGetRequest, ChannelsECWindowProductListGetResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品来源店铺的 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string? AppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分店 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("branch_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("branch_id")]
|
||||
public long? BranchId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页页数(从 1 开始)。
|
||||
/// <para>默认值:1</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_index")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_index")]
|
||||
public int Page { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// <para>默认值:10</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
|
||||
public int Limit { get; set; } = 10;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("last_buffer")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("last_buffer")]
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否需要返回总数量。
|
||||
/// </summary>
|
||||
[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; }
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/window/product/list/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECWindowProductListGetResponse : WechatApiResponse
|
||||
{
|
||||
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)]
|
||||
public long ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品来源店铺的 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置橱窗商品列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("products")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("products")]
|
||||
public Types.Product[] ProductList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("last_buffer")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("last_buffer")]
|
||||
public string? NextCursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置总数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("total_num")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("total_num")]
|
||||
public int? TotalCount { get; set; }
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"order_id": "37423523451235145"
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"create_time_range": {
|
||||
"start_time": 1658505600,
|
||||
"end_time": 1658509200
|
||||
},
|
||||
"page_size": 10,
|
||||
"next_key": "THE_NEXT_KEY"
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"order_id_list": ["3704612354559743232", "3704849110714209536"],
|
||||
"next_key": "THE_NEXT_KEY_NEW",
|
||||
"has_more": true
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"order_id": "123456",
|
||||
"merchant_notes": "abc"
|
||||
}
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
@ -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"
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"orders": ["3715847042071365120", "3715847042071365121"],
|
||||
"has_more": false,
|
||||
"next_key": "THE_NEXT_KEY_NEW"
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"product_id": "100234056",
|
||||
"appid": "wxee9f94a3360ad25f"
|
||||
}
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"appid": "wxee9f94a3360ad25f",
|
||||
"page_size": 1,
|
||||
"page_index": 1,
|
||||
"need_total_num": true
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"products": [
|
||||
{
|
||||
"product_id": "100234056",
|
||||
"appid": "wxee9f94a3360ad25f"
|
||||
}
|
||||
],
|
||||
"last_buffer": "EB4YAg=",
|
||||
"total_num": 11
|
||||
}
|
Loading…
Reference in New Issue
Block a user