feat(wxapi): 新增视频号小店获取生效中的品牌资质列表接口

This commit is contained in:
MoondanceZ 2023-11-21 09:49:05 +00:00 committed by RHQYZ
parent f76208a7d7
commit e9e039a086
26 changed files with 747 additions and 21 deletions

View File

@ -417,6 +417,26 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
return await client.SendRequestWithJsonAsync<Models.ChannelsECBrandListGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/brand/valid/list/get 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/brand/valid_list_get.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECBrandValidListGetResponse> ExecuteChannelsECBrandValidListGetAsync(this WechatApiClient client, Models.ChannelsECBrandValidListGetRequest 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", "brand", "valid", "list", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECBrandValidListGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
#region ECMerchant
@ -766,6 +786,66 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
return await client.SendRequestWithJsonAsync<Models.ChannelsECProductAuditCancelResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/product/h5url/get 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/product/get_h5url.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECProductH5UrlGetResponse> ExecuteChannelsECProductH5UrlGetAsync(this WechatApiClient client, Models.ChannelsECProductH5UrlGetRequest 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", "product", "h5url", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECProductH5UrlGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/product/taglink/get 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/product/get_taglink.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECProductTagLinkGetResponse> ExecuteChannelsECProductTagLinkGetAsync(this WechatApiClient client, Models.ChannelsECProductTagLinkGetRequest 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", "product", "taglink", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECProductTagLinkGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/product/qrcode/get 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/product/get_qrcode.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECProductQrcodeGetResponse> ExecuteChannelsECProductQrcodeGetAsync(this WechatApiClient client, Models.ChannelsECProductQrcodeGetRequest 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", "product", "qrcode", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECProductQrcodeGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/product/stock/update 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/product/stock_update.html </para>

View File

@ -0,0 +1,23 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/brand/valid/list/get 接口的请求。</para>
/// </summary>
public class ChannelsECBrandValidListGetRequest : WechatApiRequest, IInferable<ChannelsECBrandValidListGetRequest, ChannelsECBrandListGetResponse>
{
/// <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("next_key")]
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
public string? Cursor { get; set; }
}
}

View File

@ -0,0 +1,36 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/brand/valid/list/get 接口的响应。</para>
/// </summary>
public class ChannelsECBrandValidListGetResponse : WechatApiResponse
{
public static class Types
{
public class Brand : ChannelsECBrandListGetResponse.Types.Brand
{
}
}
/// <summary>
/// 获取或设置品牌列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("brands")]
[System.Text.Json.Serialization.JsonPropertyName("brands")]
public Types.Brand[] BrandList { get; set; } = default!;
/// <summary>
/// 获取或设置品牌总数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_num")]
[System.Text.Json.Serialization.JsonPropertyName("total_num")]
public int TotalCount { get; set; }
/// <summary>
/// 获取或设置翻页标记。
/// </summary>
[Newtonsoft.Json.JsonProperty("next_key")]
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
public string? NextCursor { get; set; }
}
}

View File

@ -155,9 +155,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// 获取或设置是否为默认运费。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_default")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("is_default")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
public bool IsDefault { get; set; }
/// <summary>
@ -267,9 +265,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// 获取或设置是否为默认模版。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_default")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("is_default")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))]
public bool? IsDefault { get; set; }
/// <summary>

View File

@ -152,9 +152,7 @@
/// 获取或设置是否为默认运费。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_default")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("is_default")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
public bool IsDefault { get; set; }
/// <summary>
@ -272,9 +270,7 @@
/// 获取或设置是否为默认模版。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_default")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("is_default")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
public bool IsDefault { get; set; }
/// <summary>

View File

@ -113,6 +113,51 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[Newtonsoft.Json.JsonProperty("sku_attrs")]
[System.Text.Json.Serialization.JsonPropertyName("sku_attrs")]
public IList<Attribute>? AttributeList { get; set; }
/// <summary>
/// 获取或设置商品配送信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_deliver_info")]
[System.Text.Json.Serialization.JsonPropertyName("sku_deliver_info")]
public SKUDeliver? SKUDeliver { get; set; }
}
public class SKUDeliver
{
/// <summary>
/// 获取或设置 SKU 库存情况。
/// </summary>
[Newtonsoft.Json.JsonProperty("stock_type")]
[System.Text.Json.Serialization.JsonPropertyName("stock_type")]
public int StockType { get; set; }
/// <summary>
/// 获取或设置 SKU 发货节点。
/// </summary>
[Newtonsoft.Json.JsonProperty("full_payment_presale_delivery_type")]
[System.Text.Json.Serialization.JsonPropertyName("full_payment_presale_delivery_type")]
public int FullPaymentPresaleDeliveryType { get; set; }
/// <summary>
/// 获取或设置 SKU 预售周期开始时间。
/// </summary>
[Newtonsoft.Json.JsonProperty("presale_begin_time")]
[System.Text.Json.Serialization.JsonPropertyName("presale_begin_time")]
public long PresaleBeginTimestamp { get; set; }
/// <summary>
/// 获取或设置 SKU 预售周期结束时间。
/// </summary>
[Newtonsoft.Json.JsonProperty("presale_end_time")]
[System.Text.Json.Serialization.JsonPropertyName("presale_end_time")]
public long PresaleEndTimestamp { get; set; }
/// <summary>
/// 获取或设置 SKU 发货时效。
/// </summary>
[Newtonsoft.Json.JsonProperty("full_payment_presale_delivery_time")]
[System.Text.Json.Serialization.JsonPropertyName("full_payment_presale_delivery_time")]
public int FullPaymentPresaleDeliveryTime { get; set; }
}
public class Limitation
@ -131,6 +176,44 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("limited_buy_num")]
public int? LimitedBuyCount { get; set; }
}
public class ExtraService
{
/// <summary>
/// 获取或设置是否支持七天无理由退货。
/// </summary>
[Newtonsoft.Json.JsonProperty("seven_day_return")]
[System.Text.Json.Serialization.JsonPropertyName("seven_day_return")]
public int SevenDayReturn { get; set; }
/// <summary>
/// 获取或设置先用后付类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("pay_after_use")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("pay_after_use")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
public bool IsPayAfterUseSupported { get; set; }
/// <summary>
/// 获取或设置是否支持运费险。
/// </summary>
[Newtonsoft.Json.JsonProperty("freight_insurance")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("freight_insurance")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
public bool IsFreightInsuranceSupported { get; set; }
}
public class Aftersale
{
/// <summary>
/// 获取或设置地址 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("after_sale_address_id")]
[System.Text.Json.Serialization.JsonPropertyName("after_sale_address_id")]
public long? AftersaleAddressId { get; set; }
}
}
/// <summary>
@ -182,6 +265,28 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("attrs")]
public IList<Types.Attribute>? AttributeList { get; set; }
/// <summary>
/// 获取或设置商品编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("spu_code")]
[System.Text.Json.Serialization.JsonPropertyName("spu_code")]
public string? ApuCode { get; set; }
/// <summary>
/// 获取或设置品牌 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("brand_id")]
[System.Text.Json.Serialization.JsonPropertyName("brand_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long? BrandId { get; set; }
/// <summary>
/// 获取或设置特殊资质图片媒体文件标识 ID 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("qualifications")]
[System.Text.Json.Serialization.JsonPropertyName("qualifications")]
public IList<string>? QualificationPictureMediaIdList { get; set; }
/// <summary>
/// 获取或设置发货方式。
/// </summary>
@ -216,5 +321,28 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[Newtonsoft.Json.JsonProperty("limited_info")]
[System.Text.Json.Serialization.JsonPropertyName("limited_info")]
public Types.Limitation? Limitation { get; set; }
/// <summary>
/// 获取或设置额外的服务信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("extra_service")]
[System.Text.Json.Serialization.JsonPropertyName("extra_service")]
public Types.ExtraService? ExtraService { get; set; }
/// <summary>
/// 获取或设置更新后是否立即上架。
/// </summary>
[Newtonsoft.Json.JsonProperty("listing")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("listing")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))]
public bool? RequireListing { get; set; }
/// <summary>
/// 获取或设置售后地址。
/// </summary>
[Newtonsoft.Json.JsonProperty("after_sale_info")]
[System.Text.Json.Serialization.JsonPropertyName("after_sale_info")]
public Types.Aftersale? Aftersale { get; set; }
}
}

View File

@ -132,6 +132,51 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
public int Status { get; set; }
/// <summary>
/// 获取或设置商品配送信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_deliver_info")]
[System.Text.Json.Serialization.JsonPropertyName("sku_deliver_info")]
public SKUDeliver? SKUDeliver { get; set; }
}
public class SKUDeliver
{
/// <summary>
/// 获取或设置 SKU 库存情况。
/// </summary>
[Newtonsoft.Json.JsonProperty("stock_type")]
[System.Text.Json.Serialization.JsonPropertyName("stock_type")]
public int StockType { get; set; }
/// <summary>
/// 获取或设置 SKU 发货节点。
/// </summary>
[Newtonsoft.Json.JsonProperty("full_payment_presale_delivery_type")]
[System.Text.Json.Serialization.JsonPropertyName("full_payment_presale_delivery_type")]
public int FullPaymentPresaleDeliveryType { get; set; }
/// <summary>
/// 获取或设置 SKU 预售周期开始时间。
/// </summary>
[Newtonsoft.Json.JsonProperty("presale_begin_time")]
[System.Text.Json.Serialization.JsonPropertyName("presale_begin_time")]
public long PresaleBeginTimestamp { get; set; }
/// <summary>
/// 获取或设置 SKU 预售周期结束时间。
/// </summary>
[Newtonsoft.Json.JsonProperty("presale_end_time")]
[System.Text.Json.Serialization.JsonPropertyName("presale_end_time")]
public long PresaleEndTimestamp { get; set; }
/// <summary>
/// 获取或设置 SKU 发货时效。
/// </summary>
[Newtonsoft.Json.JsonProperty("full_payment_presale_delivery_time")]
[System.Text.Json.Serialization.JsonPropertyName("full_payment_presale_delivery_time")]
public int FullPaymentPresaleDeliveryTime { get; set; }
}
public class Limitation
@ -150,6 +195,44 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("limited_buy_num")]
public int? LimitedBuyCount { get; set; }
}
public class ExtraService
{
/// <summary>
/// 获取或设置是否支持七天无理由退货。
/// </summary>
[Newtonsoft.Json.JsonProperty("seven_day_return")]
[System.Text.Json.Serialization.JsonPropertyName("seven_day_return")]
public int SevenDayReturn { get; set; }
/// <summary>
/// 获取或设置先用后付类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("pay_after_use")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("pay_after_use")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
public bool IsPayAfterUseSupported { get; set; }
/// <summary>
/// 获取或设置是否支持运费险。
/// </summary>
[Newtonsoft.Json.JsonProperty("freight_insurance")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("freight_insurance")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
public bool IsFreightInsuranceSupported { get; set; }
}
public class Aftersale
{
/// <summary>
/// 获取或设置地址 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("after_sale_address_id")]
[System.Text.Json.Serialization.JsonPropertyName("after_sale_address_id")]
public long? AftersaleAddressId { get; set; }
}
}
/// <summary>
@ -209,6 +292,21 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("attrs")]
public Types.Attribute[]? AttributeList { get; set; }
/// <summary>
/// 获取或设置商品编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("spu_code")]
[System.Text.Json.Serialization.JsonPropertyName("spu_code")]
public string? ApuCode { get; set; }
/// <summary>
/// 获取或设置品牌 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("brand_id")]
[System.Text.Json.Serialization.JsonPropertyName("brand_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long? BrandId { get; set; }
/// <summary>
/// 获取或设置发货方式。
/// </summary>
@ -264,6 +362,34 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[Newtonsoft.Json.JsonProperty("limited_info")]
[System.Text.Json.Serialization.JsonPropertyName("limited_info")]
public Types.Limitation? Limitation { get; set; }
/// <summary>
/// 获取或设置额外的服务信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("extra_service")]
[System.Text.Json.Serialization.JsonPropertyName("extra_service")]
public Types.ExtraService? ExtraService { get; set; }
/// <summary>
/// 获取或设置商品类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_type")]
[System.Text.Json.Serialization.JsonPropertyName("product_type")]
public int? ProductType { get; set; }
/// <summary>
/// 获取或设置商品草稿最近一次修改时间。
/// </summary>
[Newtonsoft.Json.JsonProperty("edit_time")]
[System.Text.Json.Serialization.JsonPropertyName("edit_time")]
public long EditTimestamp { get; set; }
/// <summary>
/// 获取或设置售后地址。
/// </summary>
[Newtonsoft.Json.JsonProperty("after_sale_info")]
[System.Text.Json.Serialization.JsonPropertyName("after_sale_info")]
public Types.Aftersale? Aftersale { get; set; }
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/h5url/get 接口的请求。</para>
/// </summary>
public class ChannelsECProductH5UrlGetRequest : WechatApiRequest, IInferable<ChannelsECProductH5UrlGetRequest, ChannelsECProductH5UrlGetResponse>
{
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/h5url/get 接口的响应。</para>
/// </summary>
public class ChannelsECProductH5UrlGetResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置商品 H5 短链。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_h5url")]
[System.Text.Json.Serialization.JsonPropertyName("product_h5url")]
public string ProductH5Url { get; set; } = default!;
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/qrcode/get 接口的请求。</para>
/// </summary>
public class ChannelsECProductQrcodeGetRequest : WechatApiRequest, IInferable<ChannelsECProductQrcodeGetRequest, ChannelsECProductQrcodeGetResponse>
{
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/qrcode/get 接口的响应。</para>
/// </summary>
public class ChannelsECProductQrcodeGetResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置商品二维码链接。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_qrcode")]
[System.Text.Json.Serialization.JsonPropertyName("product_qrcode")]
public string ProductQrcode { get; set; } = default!;
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/taglink/get 接口的请求。</para>
/// </summary>
public class ChannelsECProductTagLinkGetRequest : WechatApiRequest, IInferable<ChannelsECProductTagLinkGetRequest, ChannelsECProductTagLinkGetResponse>
{
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/product/taglink/get 接口的响应。</para>
/// </summary>
public class ChannelsECProductTagLinkGetResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置商品微信口令。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_taglink")]
[System.Text.Json.Serialization.JsonPropertyName("product_taglink")]
public string ProductTagLink { get; set; } = default!;
}
}

View File

@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
@ -75,11 +75,30 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[Newtonsoft.Json.JsonProperty("sku_attrs")]
[System.Text.Json.Serialization.JsonPropertyName("sku_attrs")]
public IList<Attribute>? AttributeList { get; set; }
/// <summary>
/// 获取或设置商品配送信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_deliver_info")]
[System.Text.Json.Serialization.JsonPropertyName("sku_deliver_info")]
public SKUDeliver? SKUDeliver { get; set; }
}
public class SKUDeliver : ChannelsECProductAddRequest.Types.SKUDeliver
{
}
public class Limitation : ChannelsECProductAddRequest.Types.Limitation
{
}
public class ExtraService : ChannelsECProductAddRequest.Types.ExtraService
{
}
public class Aftersale : ChannelsECProductAddRequest.Types.Aftersale
{
}
}
/// <summary>
@ -131,6 +150,28 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("attrs")]
public IList<Types.Attribute>? AttributeList { get; set; }
/// <summary>
/// 获取或设置商品编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("spu_code")]
[System.Text.Json.Serialization.JsonPropertyName("spu_code")]
public string? ApuCode { get; set; }
/// <summary>
/// 获取或设置品牌 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("brand_id")]
[System.Text.Json.Serialization.JsonPropertyName("brand_id")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public long? BrandId { get; set; }
/// <summary>
/// 获取或设置特殊资质图片媒体文件标识 ID 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("qualifications")]
[System.Text.Json.Serialization.JsonPropertyName("qualifications")]
public IList<string>? QualificationPictureMediaIdList { get; set; }
/// <summary>
/// 获取或设置发货方式。
/// </summary>
@ -166,6 +207,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("limited_info")]
public Types.Limitation? Limitation { get; set; }
/// <summary>
/// 获取或设置额外的服务信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("extra_service")]
[System.Text.Json.Serialization.JsonPropertyName("extra_service")]
public Types.ExtraService? ExtraService { get; set; }
/// <summary>
/// 获取或设置更新后是否立即上架。
/// </summary>
@ -174,5 +222,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("listing")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))]
public bool? RequireListing { get; set; }
/// <summary>
/// 获取或设置售后地址。
/// </summary>
[Newtonsoft.Json.JsonProperty("after_sale_info")]
[System.Text.Json.Serialization.JsonPropertyName("after_sale_info")]
public Types.Aftersale? Aftersale { get; set; }
}
}

View File

@ -0,0 +1,104 @@
{
"errcode": 0,
"errmsg": "ok",
"brands": [
{
"brand_id": "10000083",
"ch_name": "",
"en_name": "vivo",
"classification_no": "5",
"trade_mark_symbol": 1,
"register_details": {
"registrant": "111",
"register_no": "1111",
"start_time": 1667318400,
"end_time": 1669219200,
"is_permanent": false,
"register_certifications": [
"file_id_XXXX"
],
"renew_certifications": [
"file_id_XXXX"
]
},
"grant_type": 1,
"grant_details": {
"grant_certifications": [],
"brand_owner_id_photos": []
},
"application_details": {
"acceptance_certification": [
"file_id_XXXX"
]
},
"status": 2,
"create_time": 1668686275,
"update_time": 1668735765
},
{
"brand_id": "10003374",
"ch_name": "",
"en_name": "byj",
"classification_no": "2",
"trade_mark_symbol": 1,
"register_details": {
"registrant": "111",
"register_no": "111",
"start_time": 1667750400,
"end_time": 1669737600,
"is_permanent": false,
"register_certifications": [
"file_id_XXXX"
],
"renew_certifications": [
"file_id_XXXX"
]
},
"application_details": {
"acceptance_certification": []
},
"grant_type": 1,
"grant_details": {
"grant_certifications": [],
"brand_owner_id_photos": []
},
"grant_type": 1,
"status": 2,
"create_time": 1667623597,
"update_time": 1668152185
},
{
"brand_id": "10002934",
"ch_name": "周大生",
"en_name": "",
"classification_no": "5",
"trade_mark_symbol": 1,
"register_details": {
"registrant": "222",
"register_no": "111",
"start_time": 1665417600,
"end_time": 1666713600,
"is_permanent": false,
"register_certifications": [
"file_id_XXXX"
],
"renew_certifications": [
"file_id_XXXX"
]
},
"application_details": {
"acceptance_certification": []
},
"grant_type": 1,
"grant_details": {
"grant_certifications": [],
"brand_owner_id_photos": []
},
"status": 2,
"create_time": 1666349246,
"update_time": 1666352609
}
],
"total_num": 3,
"next_key": "next_key_xxxx"
}

View File

@ -1,4 +1,4 @@
{
{
"errcode": 0,
"errmsg": "ok",
"freight_template": {
@ -27,7 +27,7 @@
},
"create_time": 1653892643,
"update_time": 1653892643,
"is_default": 0,
"is_default": false,
"not_send_area": {
"address_info": []
}

View File

@ -1,4 +1,4 @@
{
{
"title": "任天堂 Nintendo Switch 国行续航增强版 NS家用体感游戏机掌机 便携掌上游戏机 红蓝主机",
"sub_title": "随时随地,一起趣玩。",
"head_imgs": [
@ -49,7 +49,26 @@
"attr_key": "选择套装",
"attr_value": "主机+保护套"
}
]
],
"sku_deliver_info": {
"stock_type": 1,
"full_payment_presale_delivery_type": 2,
"presale_begin_time": 1700450698,
"presale_end_time": 1700882698,
"full_payment_presale_delivery_time": 3
}
}
]
],
"spu_code": "AABBCC",
"brand_id": 2100000000,
"qualifications": [ "123123" ],
"extra_service": {
"seven_day_return": 1,
"pay_after_use": 1,
"freight_insurance": 0
},
"listing": true,
"after_sale_info": {
"after_sale_address_id": 123345
}
}

View File

@ -1,4 +1,4 @@
{
{
"errcode": 0,
"errmsg": "ok",
"product": {
@ -50,9 +50,28 @@
"stock_num": 5,
"sku_code": "SKU_CODE_TEST",
"sku_attrs": [],
"status": 0
"status": 0,
"sku_deliver_info": {
"stock_type": 1,
"full_payment_presale_delivery_type": 2,
"presale_begin_time": 1700450698,
"presale_end_time": 1700882698,
"full_payment_presale_delivery_time": 3
}
}
],
"min_price": 1
"min_price": 1,
"product_type": 1,
"spu_code": "AABBCC",
"brand_id": 2100000000,
"extra_service": {
"seven_day_return": 1,
"pay_after_use": 1,
"freight_insurance": 0
},
"edit_time": 1700450698,
"after_sale_info": {
"after_sale_address_id": 123345
}
}
}

View File

@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "ok",
"product_h5url": "https://channels.weixin.qq.com/shop/a/xsgVVZtSGpqwd45"
}

View File

@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "ok",
"product_qrcode": "https://store.mp.video.tencent-cloud.com/161/20304/snscosdownload/SH/reserved/642a2b730001a542dbe0b846bcc4b00b002000a1000f4f50"
}

View File

@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "ok",
"product_taglink": "#视频号小店://视频号小店/jMv2lqYonCP1qqv"
}

View File

@ -1,4 +1,4 @@
{
{
"product_id": "10000000089215",
"title": "任天堂 Nintendo Switch 国行续航增强版 NS家用体感游戏机掌机 便携掌上游戏机 红蓝主机",
"sub_title": "随时随地,一起趣玩。【更新】",
@ -51,7 +51,14 @@
"attr_key": "选择套装",
"attr_value": "主机+保护套"
}
]
],
"sku_deliver_info": {
"stock_type": 1,
"full_payment_presale_delivery_type": 2,
"presale_begin_time": 1700450698,
"presale_end_time": 1700882698,
"full_payment_presale_delivery_time": 3
}
},
{
"thumb_img": "https://mmecimage.cn/p/wx37f38d59298839c3/HJE9eJaEc5bJk-eaArVdILSB7MMaHgdK2-JIn51nMQ",
@ -68,7 +75,26 @@
"attr_key": "选择套装",
"attr_value": "标配"
}
]
],
"sku_deliver_info": {
"stock_type": 1,
"full_payment_presale_delivery_type": 2,
"presale_begin_time": 1700450698,
"presale_end_time": 1700882698,
"full_payment_presale_delivery_time": 3
}
}
]
],
"spu_code": "AABBCC",
"brand_id": 2100000000,
"qualifications": [ "123123" ],
"extra_service": {
"seven_day_return": 1,
"pay_after_use": 1,
"freight_insurance": 0
},
"listing": true,
"after_sale_info": {
"after_sale_address_id": 123345
}
}