Skip to content

Commit 6bddf75

Browse files
committed
feat(tiktokshop): 新增发起商品分类升级任务接口
1 parent 0b8a438 commit 6bddf75

4 files changed

Lines changed: 54 additions & 0 deletions

File tree

docs/TikTokGlobalShop/Basic_ModelDefinition.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ Notes: The following catalog is consistent with the catalog structure of [TikTok
6868
- Get Global Product: `ProductGetGlobalProductDetail`
6969
- Search Global Products: `ProductSearchGlobalProducts`
7070
- Update Global Inventory: `ProductUpdateGlobalProductInventory`
71+
- Create Category Upgrade Task: `ProductCreateProductCategoryUpgradeTask`
7172
- Listing Schemas: `ProductGetListingSchemas`
7273
- Promotion
7374
- Create Activity: `PromotionCreateActivity`

src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteProductExtensions.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,5 +929,27 @@ public static class TikTokShopClientExecuteProductExtensions
929929

930930
return await client.SendFlurlRequesAsJsontAsync<Models.ProductGetProductSuggestionsResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
931931
}
932+
933+
/// <summary>
934+
/// <para>异步调用 [POST] /product/{version}/products/category_upgrade_task 接口。</para>
935+
/// <para>
936+
/// REF: <br/>
937+
/// <![CDATA[ https://partner.tiktokshop.com/docv2/page/6690f62988c3cf02ee1a8d72 ]]>
938+
/// </para>
939+
/// </summary>
940+
/// <param name="client"></param>
941+
/// <param name="request"></param>
942+
/// <param name="cancellationToken"></param>
943+
/// <returns></returns>
944+
public static async Task<Models.ProductCreateProductCategoryUpgradeTaskResponse> ExecuteProductCreateProductCategoryUpgradeTaskAsync(this TikTokShopClient client, Models.ProductCreateProductCategoryUpgradeTaskRequest request, CancellationToken cancellationToken = default)
945+
{
946+
if (client is null) throw new ArgumentNullException(nameof(client));
947+
if (request is null) throw new ArgumentNullException(nameof(request));
948+
949+
IFlurlRequest flurlReq = client
950+
.CreateFlurlRequest(request, HttpMethod.Post, "product", request.ApiVersion, "products", "category_upgrade_task");
951+
952+
return await client.SendFlurlRequesAsJsontAsync<Models.ProductCreateProductCategoryUpgradeTaskResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
953+
}
932954
}
933955
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models
2+
{
3+
/// <summary>
4+
/// <para>表示 [POST] /product/{version}/products/category_upgrade_task 接口的请求。</para>
5+
/// </summary>
6+
public class ProductCreateProductCategoryUpgradeTaskRequest : TikTokShopRequest
7+
{
8+
/// <summary>
9+
/// 获取或设置 API 版本号。
10+
/// <para>默认值:202407</para>
11+
/// </summary>
12+
[Newtonsoft.Json.JsonIgnore]
13+
[System.Text.Json.Serialization.JsonIgnore]
14+
public override int ApiVersion { get; set; } = 202407;
15+
}
16+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models
2+
{
3+
/// <summary>
4+
/// <para>表示 [POST] /product/{version}/products/category_upgrade_task 接口的响应。</para>
5+
/// </summary>
6+
public class ProductCreateProductCategoryUpgradeTaskResponse : TikTokShopResponse<ProductCreateProductCategoryUpgradeTaskResponse.Types.Data>
7+
{
8+
public static class Types
9+
{
10+
public class Data
11+
{
12+
}
13+
}
14+
}
15+
}

0 commit comments

Comments
 (0)