mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-12-29 18:04:42 +08:00
feat(wxapi): 新增视频号小店批量新增联盟团长推广接口
This commit is contained in:
@@ -2100,6 +2100,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECLeagueItemListGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/league/item/headsupplier/batchadd 接口。</para>
|
||||
/// <para>
|
||||
/// REF: <br/>
|
||||
/// <![CDATA[ https://developers.weixin.qq.com/doc/channels/API/league/ecleague_batchaddheadsupplieritem.html ]]>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECLeagueItemHeadSupplierBatchAddResponse> ExecuteChannelsECLeagueItemHeadSupplierBatchAddAsync(this WechatApiClient client, Models.ChannelsECLeagueItemHeadSupplierBatchAddRequest 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
|
||||
.CreateFlurlRequest(request, HttpMethod.Post, "channels", "ec", "league", "item", "headsupplier", "batchadd")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECLeagueItemHeadSupplierBatchAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ECLeague/Promoter
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/league/item/headsupplier/batchadd 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECLeagueItemHeadSupplierBatchAddRequest : WechatApiRequest, IInferable<ChannelsECLeagueItemHeadSupplierBatchAddRequest, ChannelsECLeagueItemHeadSupplierBatchAddResponse>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Item
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
|
||||
public long ProductId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分佣率(范围:0~100)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ratio")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ratio")]
|
||||
public int? Ratio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广服务费率(范围:0~100)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("service_ratio")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("service_ratio")]
|
||||
public int? ServiceRatio { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置团长开放唯一凭证。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("headsupplier_appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("headsupplier_appid")]
|
||||
public string HeadSupplierAppId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置联盟商品列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public IList<Types.Item> List { get; set; } = new List<Types.Item>();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广开始时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("begin_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("begin_time")]
|
||||
public long? BeginTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广开始时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("end_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("end_time")]
|
||||
public long? EndTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否永久推广。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_forerver")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_forerver")]
|
||||
public bool? IsForerver { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/league/item/headsupplier/batchadd 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECLeagueItemHeadSupplierBatchAddResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Result : ChannelsECLeagueItemBatchAddResponse.Types.Result
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置结果列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result_info_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result_info_list")]
|
||||
public Types.Result[] ResultList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user