-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tiktokshop): 新增 Webhook 相关事件模型及工具方法
- Loading branch information
Showing
26 changed files
with
685 additions
and
7 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/CancellationStatusChangeEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events | ||
{ | ||
/// <summary> | ||
/// <para>表示 CANCELLATION_STATUS_CHANGE 事件。</para> | ||
/// <para> | ||
/// REF: <br/> | ||
/// <![CDATA[ https://partner.tiktokshop.com/docv2/page/65030150746462028285f657 ]]> | ||
/// </para> | ||
/// </summary> | ||
public class CancellationStatusChangeEvent : TikTokShopEvent<CancellationStatusChangeEvent.Types.Data> | ||
{ | ||
public static class Types | ||
{ | ||
public class Data | ||
{ | ||
/// <summary> | ||
/// 获取或设置订单 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("order_id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("order_id")] | ||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] | ||
public string OrderId { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置取消 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("cancel_id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("cancel_id")] | ||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] | ||
public string CancelId { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置取消发起人。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("cancellations_role")] | ||
[System.Text.Json.Serialization.JsonPropertyName("cancellations_role")] | ||
public string CancelRole { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置取消状态。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("cancel_status")] | ||
[System.Text.Json.Serialization.JsonPropertyName("cancel_status")] | ||
public string CancelStatus { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置创建时间戳。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("create_time")] | ||
[System.Text.Json.Serialization.JsonPropertyName("create_time")] | ||
public long CreateTimestamp { get; set; } | ||
} | ||
} | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/OrderStatusChangeEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events | ||
{ | ||
/// <summary> | ||
/// <para>表示 ORDER_STATUS_CHANGE 事件。</para> | ||
/// <para> | ||
/// REF: <br/> | ||
/// <![CDATA[ https://partner.tiktokshop.com/docv2/page/650300b8a57708028b430b4a ]]> | ||
/// </para> | ||
/// </summary> | ||
public class OrderStatusChangeEvent : TikTokShopEvent<OrderStatusChangeEvent.Types.Data> | ||
{ | ||
public static class Types | ||
{ | ||
public class Data | ||
{ | ||
/// <summary> | ||
/// 获取或设置订单 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("order_id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("order_id")] | ||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] | ||
public string OrderId { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置订单状态。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("order_status")] | ||
[System.Text.Json.Serialization.JsonPropertyName("order_status")] | ||
public string OrderStatus { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置更新时间戳。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("update_time")] | ||
[System.Text.Json.Serialization.JsonPropertyName("update_time")] | ||
public long UpdateTimestamp { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置是否是延期订单。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("is_on_hold_order")] | ||
[System.Text.Json.Serialization.JsonPropertyName("is_on_hold_order")] | ||
public bool? IsOnHoldOrder { get; set; } | ||
} | ||
} | ||
} | ||
} |
67 changes: 67 additions & 0 deletions
67
src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/PackageUpdateEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events | ||
{ | ||
/// <summary> | ||
/// <para>表示 PACKAGE_UPDATE 事件。</para> | ||
/// <para> | ||
/// REF: <br/> | ||
/// <![CDATA[ https://partner.tiktokshop.com/docv2/page/650955cabace3e02b73cc886 ]]> | ||
/// </para> | ||
/// </summary> | ||
public class PackageUpdateEvent : TikTokShopEvent<PackageUpdateEvent.Types.Data> | ||
{ | ||
public static class Types | ||
{ | ||
public class Data | ||
{ | ||
public static class Types | ||
{ | ||
public class Package | ||
{ | ||
/// <summary> | ||
/// 获取或设置包裹 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("package_id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("package_id")] | ||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] | ||
public string? PackageId { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置订单 ID 列表。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("order_id_list")] | ||
[System.Text.Json.Serialization.JsonPropertyName("order_id_list")] | ||
public string[]? OrderIdList { get; set; } | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// 获取或设置事件类型。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("sc_type")] | ||
[System.Text.Json.Serialization.JsonPropertyName("sc_type")] | ||
public string Type { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置角色类型。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("role_type")] | ||
[System.Text.Json.Serialization.JsonPropertyName("role_type")] | ||
public string RoleType { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置包裹列表。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("package_list")] | ||
[System.Text.Json.Serialization.JsonPropertyName("package_list")] | ||
public Types.Package[] PackageList { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置更新时间戳。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("update_time")] | ||
[System.Text.Json.Serialization.JsonPropertyName("update_time")] | ||
public long UpdateTimestamp { get; set; } | ||
} | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductCreationEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events | ||
{ | ||
/// <summary> | ||
/// <para>表示 PRODUCT_CREATION 事件。</para> | ||
/// <para> | ||
/// REF: <br/> | ||
/// <![CDATA[ https://partner.tiktokshop.com/docv2/page/663c98b566828e02e4515580 ]]> | ||
/// </para> | ||
/// </summary> | ||
public class ProductCreationEvent : TikTokShopEvent<ProductCreationEvent.Types.Data> | ||
{ | ||
public static class Types | ||
{ | ||
public class Data | ||
{ | ||
/// <summary> | ||
/// 获取或设置商品 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("product_id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("product_id")] | ||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] | ||
public string ProductId { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置商品类型列表。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("product_type")] | ||
[System.Text.Json.Serialization.JsonPropertyName("product_type")] | ||
public string[] ProductTypeList { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置更新时间戳。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("update_time")] | ||
[System.Text.Json.Serialization.JsonPropertyName("update_time")] | ||
public long UpdateTimestamp { get; set; } | ||
} | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductInformationChangeEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events | ||
{ | ||
/// <summary> | ||
/// <para>表示 PRODUCT_INFORMATION_CHANGE 事件。</para> | ||
/// <para> | ||
/// REF: <br/> | ||
/// <![CDATA[ https://partner.tiktokshop.com/docv2/page/65d6f41411a60f02dc1cf8bf ]]> | ||
/// </para> | ||
/// </summary> | ||
public class ProductInformationChangeEvent : TikTokShopEvent<ProductInformationChangeEvent.Types.Data> | ||
{ | ||
public static class Types | ||
{ | ||
public class Data | ||
{ | ||
/// <summary> | ||
/// 获取或设置商品 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("product_id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("product_id")] | ||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] | ||
public string ProductId { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置修改过的字段列表。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("changed_fields")] | ||
[System.Text.Json.Serialization.JsonPropertyName("changed_fields")] | ||
public string[] ChangedFieldList { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置更新时间戳。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("update_time")] | ||
[System.Text.Json.Serialization.JsonPropertyName("update_time")] | ||
public long UpdateTimestamp { get; set; } | ||
} | ||
} | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/ProductStatusChangeEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events | ||
{ | ||
/// <summary> | ||
/// <para>表示 PRODUCT_STATUS_CHANGE 事件。</para> | ||
/// <para> | ||
/// REF: <br/> | ||
/// <![CDATA[ https://partner.tiktokshop.com/docv2/page/650956aff1fd3102b90b6261 ]]> | ||
/// </para> | ||
/// </summary> | ||
public class ProductStatusChangeEvent : TikTokShopEvent<ProductStatusChangeEvent.Types.Data> | ||
{ | ||
public static class Types | ||
{ | ||
public class Data | ||
{ | ||
/// <summary> | ||
/// 获取或设置商品 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("product_id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("product_id")] | ||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] | ||
public string ProductId { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置商品状态。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("status")] | ||
[System.Text.Json.Serialization.JsonPropertyName("status")] | ||
public string ProductStatus { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置审核拒绝原因。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("suspended_reason")] | ||
[System.Text.Json.Serialization.JsonPropertyName("suspended_reason")] | ||
public string? RejectReason { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置更新时间戳。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("update_time")] | ||
[System.Text.Json.Serialization.JsonPropertyName("update_time")] | ||
public long UpdateTimestamp { get; set; } | ||
} | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Events/RecipientAddressUpdateEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Events | ||
{ | ||
/// <summary> | ||
/// <para>表示 RECIPIENT_ADDRESS_UPDATE 事件。</para> | ||
/// <para> | ||
/// REF: <br/> | ||
/// <![CDATA[ https://partner.tiktokshop.com/docv2/page/650301af5a12ff0294ea3bf9 ]]> | ||
/// </para> | ||
/// </summary> | ||
public class RecipientAddressUpdateEvent : TikTokShopEvent<RecipientAddressUpdateEvent.Types.Data> | ||
{ | ||
public static class Types | ||
{ | ||
public class Data | ||
{ | ||
/// <summary> | ||
/// 获取或设置订单 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("order_id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("order_id")] | ||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] | ||
public string OrderId { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置更新时间戳。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("update_time")] | ||
[System.Text.Json.Serialization.JsonPropertyName("update_time")] | ||
public long UpdateTimestamp { get; set; } | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.