mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-12-29 18:04:42 +08:00
feat(wxapi): 新增小程序联盟相关 API 封装
This commit is contained in:
@@ -0,0 +1,263 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
{
|
||||
public static class WechatApiClientExecuteUnionPromoterExtensions
|
||||
{
|
||||
#region Promotion
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /union/promoter/promotion/add 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/ministore/union/access-guidelines/promoter/api/promotion.html#_1-%E6%B7%BB%E5%8A%A0%E6%8E%A8%E5%B9%BF%E4%BD%8D </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.UnionPromoterPromotionAddResponse> ExecuteUnionPromoterPromotionAddAsync(this WechatApiClient client, Models.UnionPromoterPromotionAddRequest 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(HttpMethod.Post, "union", "promoter", "promotion", "add")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.UnionPromoterPromotionAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /union/promoter/promotion/del 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/ministore/union/access-guidelines/promoter/api/promotion.html#_2-%E5%88%A0%E9%99%A4%E6%8E%A8%E5%B9%BF%E4%BD%8D </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.UnionPromoterPromotionDeleteResponse> ExecuteUnionPromoterPromotionDeleteAsync(this WechatApiClient client, Models.UnionPromoterPromotionDeleteRequest 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(HttpMethod.Post, "union", "promoter", "promotion", "del")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.UnionPromoterPromotionDeleteResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /union/promoter/promotion/upd 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/ministore/union/access-guidelines/promoter/api/promotion.html#_3-%E7%BC%96%E8%BE%91%E6%8E%A8%E5%B9%BF%E4%BD%8D </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.UnionPromoterPromotionUpdateResponse> ExecuteUnionPromoterPromotionUpdateAsync(this WechatApiClient client, Models.UnionPromoterPromotionUpdateRequest 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(HttpMethod.Post, "union", "promoter", "promotion", "upd")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.UnionPromoterPromotionUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /union/promoter/promotion/list 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/ministore/union/access-guidelines/promoter/api/promotion.html#_4-%E8%8E%B7%E5%8F%96%E6%8E%A8%E5%B9%BF%E4%BD%8D%E5%88%97%E8%A1%A8 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.UnionPromoterPromotionListResponse> ExecuteUnionPromoterPromotionListAsync(this WechatApiClient client, Models.UnionPromoterPromotionListRequest 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(HttpMethod.Get, "union", "promoter", "promotion", "list")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("start", request.Offset)
|
||||
.SetQueryParam("limit", request.Limit);
|
||||
|
||||
return await client.SendRequestAsync<Models.UnionPromoterPromotionListResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Product
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /union/promoter/product/category 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/ministore/union/access-guidelines/promoter/api/product/category.html#_1-%E8%8E%B7%E5%8F%96%E8%81%94%E7%9B%9F%E5%95%86%E5%93%81%E7%B1%BB%E7%9B%AE%E5%88%97%E8%A1%A8%E5%8F%8A%E7%B1%BB%E7%9B%AEID </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.UnionPromoterProductCategoryResponse> ExecuteUnionPromoterProductCategoryAsync(this WechatApiClient client, Models.UnionPromoterProductCategoryRequest 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(HttpMethod.Get, "union", "promoter", "product", "category")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestAsync<Models.UnionPromoterProductCategoryResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /union/promoter/product/list 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/ministore/union/access-guidelines/promoter/api/product/category.html#_2-%E6%9F%A5%E8%AF%A2%E5%95%86%E5%93%81%E8%AF%A6%E6%83%85%E4%BF%A1%E6%81%AF </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.UnionPromoterProductListResponse> ExecuteUnionPromoterProductListAsync(this WechatApiClient client, Models.UnionPromoterProductListRequest 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(HttpMethod.Get, "union", "promoter", "product", "list")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("from", request.Offset)
|
||||
.SetQueryParam("limit", request.Limit);
|
||||
|
||||
if (request.QueryType.HasValue)
|
||||
flurlReq.SetQueryParam("queryType", request.QueryType.Value);
|
||||
|
||||
if (!string.IsNullOrEmpty(request.Query))
|
||||
flurlReq.SetQueryParam("query", request.Query);
|
||||
|
||||
if (request.MaxPrice.HasValue)
|
||||
flurlReq.SetQueryParam("maxPrice", request.MaxPrice.Value);
|
||||
|
||||
if (request.MinPrice.HasValue)
|
||||
flurlReq.SetQueryParam("minPrice", request.MinPrice.Value);
|
||||
|
||||
if (request.MinCommissionValue.HasValue)
|
||||
flurlReq.SetQueryParam("minCommissionValue", request.MinCommissionValue.Value);
|
||||
|
||||
if (request.MinCommissionRatio.HasValue)
|
||||
flurlReq.SetQueryParam("minCommissionRatio", request.MinCommissionRatio.Value);
|
||||
|
||||
if (request.SortType.HasValue)
|
||||
flurlReq.SetQueryParam("sortType", request.SortType.Value);
|
||||
|
||||
if (request.HasCoupon.HasValue)
|
||||
flurlReq.SetQueryParam("hasCoupon", request.HasCoupon.Value ? 1 : 0);
|
||||
|
||||
if (request.ShopAppIdList != null && request.ShopAppIdList.Any())
|
||||
flurlReq.SetQueryParam("shopAppIds", string.Join(",", request.ShopAppIdList));
|
||||
|
||||
if (request.CategoryId.HasValue)
|
||||
flurlReq.SetQueryParam("categoryId", request.CategoryId);
|
||||
|
||||
if (request.CategoryIdList != null && request.CategoryIdList.Any())
|
||||
flurlReq.SetQueryParam("category", string.Join(",", request.CategoryIdList));
|
||||
|
||||
if (request.CategoryIdBlackList != null && request.CategoryIdBlackList.Any())
|
||||
flurlReq.SetQueryParam("noCategory", string.Join(",", request.CategoryIdBlackList));
|
||||
|
||||
if (request.ProductIdList != null && request.ProductIdList.Any())
|
||||
flurlReq.SetQueryParam("productId", string.Join(",", request.ProductIdList));
|
||||
|
||||
return await client.SendRequestAsync<Models.UnionPromoterProductListResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /union/promoter/product/generate 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/ministore/union/access-guidelines/promoter/api/product/category.html#_3-%E8%8E%B7%E5%8F%96%E5%95%86%E5%93%81%E6%8E%A8%E5%B9%BF%E7%B4%A0%E6%9D%90 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.UnionPromoterProductGenerateResponse> ExecuteUnionPromoterProductGenerateAsync(this WechatApiClient client, Models.UnionPromoterProductGenerateRequest 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(HttpMethod.Post, "union", "promoter", "product", "generate")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.UnionPromoterProductGenerateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Order
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /union/promoter/order/info 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/ministore/union/access-guidelines/promoter/api/order/order-info.html#_1-%E6%A0%B9%E6%8D%AE%E8%AE%A2%E5%8D%95ID%E6%9F%A5%E8%AF%A2%E8%AE%A2%E5%8D%95%E8%AF%A6%E6%83%85 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.UnionPromoterOrderInfoResponse> ExecuteUnionPromoterOrderInfoAsync(this WechatApiClient client, Models.UnionPromoterOrderInfoRequest 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(HttpMethod.Post, "union", "promoter", "order", "info")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.UnionPromoterOrderInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /union/promoter/order/search 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/ministore/union/access-guidelines/promoter/api/order/order-info.html#_2-%E6%A0%B9%E6%8D%AE%E8%AE%A2%E5%8D%95%E6%94%AF%E4%BB%98%E6%97%B6%E9%97%B4%E3%80%81%E8%AE%A2%E5%8D%95%E5%88%86%E4%BD%A3%E7%8A%B6%E6%80%81%E6%8B%89%E5%8F%96%E8%AE%A2%E5%8D%95%E8%AF%A6%E6%83%85 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.UnionPromoterOrderSearchResponse> ExecuteUnionPromoterOrderSearchAsync(this WechatApiClient client, Models.UnionPromoterOrderSearchRequest 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(HttpMethod.Get, "union", "promoter", "order", "search")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("page", request.Page);
|
||||
|
||||
if (request.StartTimestamp.HasValue)
|
||||
flurlReq.SetQueryParam("startTimestamp", request.StartTimestamp.Value);
|
||||
|
||||
if (request.EndTimestamp.HasValue)
|
||||
flurlReq.SetQueryParam("endTimestamp", request.EndTimestamp.Value);
|
||||
|
||||
if (!string.IsNullOrEmpty(request.CommissionStatus))
|
||||
flurlReq.SetQueryParam("commissionStatus", request.CommissionStatus);
|
||||
|
||||
return await client.SendRequestAsync<Models.UnionPromoterOrderSearchResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Description
|
||||
public class Detail
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品详情图片 Url 列表。
|
||||
@@ -164,7 +164,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc_info")]
|
||||
public Types.Description Description { get; set; } = new Types.Description();
|
||||
public Types.Detail Detail { get; set; } = new Types.Detail();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置品牌 ID。
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Description
|
||||
public class Detail
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品详情图片 Url 列表。
|
||||
@@ -129,7 +129,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc_info")]
|
||||
public Types.Description Description { get; set; } = default!;
|
||||
public Types.Detail Detail { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置品牌 ID。
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Description : ProductSPUAddRequest.Types.Description
|
||||
public class Description : ProductSPUAddRequest.Types.Detail
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /union/promoter/order/info 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterOrderInfoRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("orderIdList")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("orderIdList")]
|
||||
public IList<long> OrderIdList { get; set; } = new List<long>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,245 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /union/promoter/order/info 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterOrderInfoResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Order
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("productId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("productId")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public long ProductId { 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("thumbImg")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("thumbImg")]
|
||||
public string ThumbnailImageUrl { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品价格(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("price")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Converters.NewtonsoftJsonCurrencyConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("price")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.SystemTextJsonCurrencyConverter))]
|
||||
public int Price { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置佣金比例(单位:万分之一)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ratio")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ratio")]
|
||||
public int CommissionRatio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置佣金金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("commission")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Converters.NewtonsoftJsonCurrencyConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("commission")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(Converters.SystemTextJsonCurrencyConverter))]
|
||||
public int CommissionValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分佣状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("commissionStatus")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("commissionStatus")]
|
||||
public string CommissionStatus { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品类目名称,使用逗号分隔。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("categoryStr")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("categoryStr")]
|
||||
public string CategoryNames { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionInfo")]
|
||||
public Promotion? Promotion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义扩展参数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("customizeInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("customizeInfo")]
|
||||
public string? CustomizeExtra { get; set; }
|
||||
}
|
||||
|
||||
public class Promotion
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置推广位 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionSourcePid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionSourcePid")]
|
||||
public string PromotionId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广位 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionSourceName")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionSourceName")]
|
||||
public string SourceName { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("orderId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("orderId")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public long OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("productList")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("productList")]
|
||||
public Types.Product[] ProductList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小商店名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("shopAppid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("shopAppid")]
|
||||
public string? ShopAppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小商店名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("shopName")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("shopName")]
|
||||
public string? ShopName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置付款时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("payTime")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("payTime")]
|
||||
public long? PayTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置确认收货时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("confirmReceiptTime")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("confirmReceiptTime")]
|
||||
public long? ConfirmReceiptTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
internal static class Converters
|
||||
{
|
||||
internal class NewtonsoftJsonCurrencyConverter : Newtonsoft.Json.JsonConverter<int>
|
||||
{
|
||||
public override bool CanRead
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override bool CanWrite
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override int ReadJson(Newtonsoft.Json.JsonReader reader, Type objectType, int existingValue, bool hasExistingValue, Newtonsoft.Json.JsonSerializer serializer)
|
||||
{
|
||||
if (reader.TokenType == Newtonsoft.Json.JsonToken.Null)
|
||||
{
|
||||
return existingValue;
|
||||
}
|
||||
else if (reader.TokenType == Newtonsoft.Json.JsonToken.String)
|
||||
{
|
||||
string? value = serializer.Deserialize<string>(reader);
|
||||
if (value == null)
|
||||
return existingValue;
|
||||
|
||||
value = value.Replace("¥", string.Empty).Replace("-", string.Empty);
|
||||
if (string.IsNullOrEmpty(value))
|
||||
return existingValue;
|
||||
|
||||
if (double.TryParse(value, out double currency))
|
||||
{
|
||||
return (int)(currency * 100);
|
||||
}
|
||||
}
|
||||
|
||||
throw new Newtonsoft.Json.JsonReaderException();
|
||||
}
|
||||
|
||||
public override void WriteJson(Newtonsoft.Json.JsonWriter writer, int value, Newtonsoft.Json.JsonSerializer serializer)
|
||||
{
|
||||
writer.WriteValue("¥" + ((double)value / 100).ToString("#.##"));
|
||||
}
|
||||
}
|
||||
|
||||
internal class SystemTextJsonCurrencyConverter : System.Text.Json.Serialization.JsonConverter<int>
|
||||
{
|
||||
public override int Read(ref System.Text.Json.Utf8JsonReader reader, Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
|
||||
{
|
||||
if (reader.TokenType == System.Text.Json.JsonTokenType.Null)
|
||||
{
|
||||
return default;
|
||||
}
|
||||
else if (reader.TokenType == System.Text.Json.JsonTokenType.String)
|
||||
{
|
||||
string? value = reader.GetString();
|
||||
if (value == null)
|
||||
return default;
|
||||
|
||||
value = value.Replace("¥", string.Empty).Replace("-", string.Empty);
|
||||
if (string.IsNullOrEmpty(value))
|
||||
return default;
|
||||
|
||||
if (double.TryParse(value, out double currency))
|
||||
{
|
||||
return (int)(currency * 100);
|
||||
}
|
||||
}
|
||||
|
||||
throw new System.Text.Json.JsonException();
|
||||
}
|
||||
|
||||
public override void Write(System.Text.Json.Utf8JsonWriter writer, int value, System.Text.Json.JsonSerializerOptions options)
|
||||
{
|
||||
writer.WriteStringValue("¥" + ((double)value / 100).ToString("#.##"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("orderList")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("orderList")]
|
||||
|
||||
public Types.Order[] OrderList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /union/promoter/order/search 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterOrderSearchRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分页页数(从 1 开始)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int Page { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置指定起始时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public long? StartTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置指定结束时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public long? EndTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置指定分佣状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? CommissionStatus { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /union/promoter/order/search 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterOrderSearchResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Order : UnionPromoterOrderInfoResponse.Types.Order
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("orderList")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("orderList")]
|
||||
|
||||
public Types.Order[] OrderList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置订单总数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("totalNum")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("totalNum")]
|
||||
public int Total { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pageSize")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pageSize")]
|
||||
public int Limit { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /union/promoter/product/category 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterProductCategoryRequest : WechatApiRequest
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /union/promoter/product/category 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterProductCategoryResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Category
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("catId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("catId")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int CategoryId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置类目名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string Name { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品类目列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("productCats")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("productCats")]
|
||||
|
||||
public Types.Category[] CategoryList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /union/promoter/product/generate 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterProductGenerateRequest : WechatApiRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("productId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("productId")]
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义扩展参数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("customizeInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("customizeInfo")]
|
||||
public string? CustomizeExtra { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广位 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pid")]
|
||||
public string PromotionId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("productList")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("productList")]
|
||||
public IList<Types.Product> ProductList { get; set; } = new List<Types.Product>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /union/promoter/product/generate 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterProductGenerateResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class ProductPromotion
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("productId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("productId")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public long ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品副标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("subTitle")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("subTitle")]
|
||||
public string? SubTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置主图 Url 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("headImg")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("headImg")]
|
||||
public string[] HeadImageUrlList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU 最低价格(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("minPrice")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("minPrice")]
|
||||
public int MinPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品库存。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("totalStockNum")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("totalStockNum")]
|
||||
public int Stock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小商店名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("shopAppid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("shopAppid")]
|
||||
public string? ShopAppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小商店名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("shopName")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("shopName")]
|
||||
public string? ShopName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否引用小商店组件。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pluginResult")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedNullableBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pluginResult")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedNullableBooleanConverter))]
|
||||
public bool? UsePlugin { get; set; }
|
||||
}
|
||||
|
||||
public class Share
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置小程序 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appId")]
|
||||
public string AppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("path")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("path")]
|
||||
public string PagePath { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置经过 Base64 编码的小程序码图片。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("wxaCode")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("wxaCode")]
|
||||
public string EncodingWxaCode { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广商品文案。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionWording")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionWording")]
|
||||
public string? PromotionText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广商品链接。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionUrl")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionUrl")]
|
||||
public string? PromotionUrl { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广商品带券文案。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("couponPromotionWording")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("couponPromotionWording")]
|
||||
public string? PromotionWithCouponText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广商品带券链接。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("couponPromotionUrl")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("couponPromotionUrl")]
|
||||
public string? PromotionWithCouponUrl { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广位 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pid")]
|
||||
public string PromotionId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("productInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("productInfo")]
|
||||
public Types.Product Product { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广相关信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("shareInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("shareInfo")]
|
||||
public Types.Share? Share { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品推广素材列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
|
||||
public Types.ProductPromotion[] ProductPromotionList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /union/promoter/product/list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterProductListRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分页起始位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int Limit { get; set; } = 20;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置搜索类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? QueryType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置搜索关键词。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? Query { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品最高价格(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? MaxPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品最低价格(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? MinPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置佣金金额下限(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? MinCommissionValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置佣金比例下限(单位:万分之一)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? MinCommissionRatio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置排序方式。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? SortType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小商店 AppId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public IList<string>? ShopAppIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否有联盟优惠券。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public bool? HasCoupon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? CategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品类目 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public IList<int>? CategoryIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品类目 ID 黑名单列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public IList<int>? CategoryIdBlackList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public IList<long>? ProductIdList { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,566 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /union/promoter/product/list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterProductListResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class ProductDetail
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Category
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品类目 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("catId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("catId")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int CategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上级商品类目名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string Name { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置属性的 Key。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("key")]
|
||||
public string Key { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置属性的值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value")]
|
||||
public string Value { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class Information
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Detail
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品详情图片 Url 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("detailImg")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("detailImg")]
|
||||
public string[] ImageUrlList { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class Express
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置运费模板 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("templateId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("templateId")]
|
||||
public int TemplateId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品副标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("subTitle")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("subTitle")]
|
||||
public string? SubTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置主图 Url 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("headImg")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("headImg")]
|
||||
public string[] HeadImageUrlList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品详情信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("detail")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("detail")]
|
||||
public Types.Detail Detail { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置品牌 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brandId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brandId")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int BrandId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置品牌名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("brand")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("brand")]
|
||||
public string? BrandName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置型号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("model")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("model")]
|
||||
public string? Model { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品类目列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("category")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("category")]
|
||||
public Category[] CategoryList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品属性列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("param")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("param")]
|
||||
public Attribute[] AttributeList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置运费信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("expressInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("expressInfo")]
|
||||
public Types.Express Express { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU 最低价格(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("minPrice")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("minPrice")]
|
||||
public int MinPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置总库存。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("totalStockNum")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("totalStockNum")]
|
||||
public int Stock { get; set; }
|
||||
}
|
||||
|
||||
public class SKU
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Information
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Stock
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置库存量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("stockNum")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("stockNum")]
|
||||
public int Value { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置缩略图 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("thumbImg")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("thumbImg")]
|
||||
public string ThumbnailUrl { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置售价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("salePrice")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("salePrice")]
|
||||
public int SalePrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置市场价(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("marketPrice")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("marketPrice")]
|
||||
public int MarketPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置库存信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("stockInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("stockInfo")]
|
||||
public Types.Stock Stock { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品编码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skuCode")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skuCode")]
|
||||
public string? SKUCode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skuId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skuId")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public long SKUId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU 上线状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU 基本信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("productSkuInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("productSkuInfo")]
|
||||
public Types.Information Information { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("productId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("productId")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public long ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品上线状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品基本信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("info")]
|
||||
public Types.Information Information { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 SKU 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skus")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skus")]
|
||||
public Types.SKU[] SKUList { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class League
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否有佣金。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("hasCommission")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("hasCommission")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool HasCommission { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置佣金比例(单位:万分之一)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("commissionRatio")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("commissionRatio")]
|
||||
public int? CommissionRatio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置佣金金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("commissionValue")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("commissionValue")]
|
||||
public int? CommissionValue { get; set; }
|
||||
}
|
||||
|
||||
public class Shop
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置小商店 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appId")]
|
||||
public string AppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小商店名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小商店头像 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("headImgUrl")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("headImgUrl")]
|
||||
public string HeadImageUrl { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class Coupon
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class CouponDetail
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Discount
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class DiscountCondidtion
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("productCnt")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("productCnt")]
|
||||
public int? ProductCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("productIds")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("productIds")]
|
||||
public long[]? ProductIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品价格(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("productPrice")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("productPrice")]
|
||||
public int? ProductPrice { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠条件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("discountCondition")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("discountCondition")]
|
||||
public Types.DiscountCondidtion? DiscountCondidtion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置满减金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("discountFee")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("discountFee")]
|
||||
public int? DiscountFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置折扣数值(范围:1000~10000)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("discountNum")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("discountNum")]
|
||||
public int? DiscountNumber { get; set; }
|
||||
}
|
||||
|
||||
public class Reception
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置单人限领数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limitNumOnePerson")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limitNumOnePerson")]
|
||||
public int LimitPerUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置领取开始时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("startTime")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("startTime")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置领取结束时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("endTime")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("endTime")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? EndTime { get; set; }
|
||||
}
|
||||
|
||||
public class Validity
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置有效期类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("validType")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("validType")]
|
||||
public string ValidType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置相对生效天数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("validDayNum")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("validDayNum")]
|
||||
public int? ValidDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置绝对生效开始时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("startTime")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("startTime")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置绝对生效结束时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("endTime")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("endTime")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CommonNullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? EndTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠券类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠券库存。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("restNum")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("restNum")]
|
||||
public int Stock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("discountInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("discountInfo")]
|
||||
public Types.Discount Discount { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置接收信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("receiveInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("receiveInfo")]
|
||||
public Types.Reception? Reception { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置有效期信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("validInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("validInfo")]
|
||||
public Types.Validity Validity { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否有联盟优惠券。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("hasCoupon")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("hasCoupon")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool HasCommission { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠券 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("couponId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("couponId")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int? CouponId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置优惠券详细信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("couponInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("couponInfo")]
|
||||
public Types.CouponDetail? CouponDetail { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("productId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("productId")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public long ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品详细信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product")]
|
||||
public Types.ProductDetail ProductDetail { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置联盟佣金信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("leagueExInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("leagueExInfo")]
|
||||
public Types.League League { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品所属小商店信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("shopInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("shopInfo")]
|
||||
public Types.Shop Shop { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置联盟优惠券信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("couponInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("couponInfo")]
|
||||
public Types.Coupon? Coupon { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("productList")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("productList")]
|
||||
|
||||
public Types.Product[] ProductList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商品总数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("total")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("total")]
|
||||
public int Total { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /union/promoter/promotion/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterPromotionAddRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置推广位名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionSourceName")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionSourceName")]
|
||||
public string SourceName { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /union/promoter/promotion/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterPromotionAddResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置推广位 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pid")]
|
||||
public string PromotionId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /union/promoter/promotion/del 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterPromotionDeleteRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置推广位 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionSourcePid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionSourcePid")]
|
||||
public string PromotionId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广位名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionSourceName")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionSourceName")]
|
||||
public string SourceName { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /union/promoter/promotion/del 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterPromotionDeleteResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /union/promoter/promotion/list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterPromotionListRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分页起始位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int Limit { get; set; } = 20;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /union/promoter/promotion/list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterPromotionListResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Promotion
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置推广位 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionSourcePid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionSourcePid")]
|
||||
public string PromotionId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广位名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionSourceName")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionSourceName")]
|
||||
public string SourceName { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广位列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionSourceList")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionSourceList")]
|
||||
|
||||
public Types.Promotion[] PromotionList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广位总数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("total")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("total")]
|
||||
public int Total { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置允许创建的推广位最大数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionMaxCnt")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionMaxCnt")]
|
||||
public int MaxPromotionCount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /union/promoter/promotion/upd 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterPromotionUpdateRequest : WechatApiRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Promotion
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置推广位名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionSourceName")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionSourceName")]
|
||||
public string SourceName { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class PreviousPromotion : Promotion
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置推广位 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionSourcePid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionSourcePid")]
|
||||
public string PromotionId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置修改前的推广位信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("previousPromotionInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("previousPromotionInfo")]
|
||||
public Types.PreviousPromotion PreviousPromotion { get; set; } = new Types.PreviousPromotion();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置修改后的推广位信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("promotionInfo")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("promotionInfo")]
|
||||
public Types.Promotion Promotion { get; set; } = new Types.Promotion();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /union/promoter/promotion/upd 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class UnionPromoterPromotionUpdateResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user