-
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.
- Loading branch information
Showing
15 changed files
with
1,010 additions
and
0 deletions.
There are no files selected for viewing
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
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
92 changes: 92 additions & 0 deletions
92
....ByteDance.TikTokGlobalShop/Models/Order/ExternalOrder/OrderCreateExternalOrderRequest.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,92 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models | ||
{ | ||
/// <summary> | ||
/// <para>表示 [POST] /order/{version}/orders/external_orders 接口的请求。</para> | ||
/// </summary> | ||
public class OrderCreateExternalOrderRequest : TikTokShopRequest | ||
{ | ||
public static class Types | ||
{ | ||
public class Order | ||
{ | ||
public static class Types | ||
{ | ||
public class ExternalOrder | ||
{ | ||
public static class Types | ||
{ | ||
public class LineItem | ||
{ | ||
/// <summary> | ||
/// 获取或设置订单行 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("origin_id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("origin_id")] | ||
public string LineItemId { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// 获取或设置外部订单行 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("id")] | ||
public string ExternalLineItemId { get; set; } = string.Empty; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// 获取或设置外部订单 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("id")] | ||
public string ExternalOrderId { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// 获取或设置来源平台。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("platform")] | ||
[System.Text.Json.Serialization.JsonPropertyName("platform")] | ||
public string Platform { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// 获取或设置订单行列表。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("line_items")] | ||
[System.Text.Json.Serialization.JsonPropertyName("line_items")] | ||
public IList<Types.LineItem> LineItemList { get; set; } = new List<Types.LineItem>(); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// 获取或设置订单 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("id")] | ||
public string OrderId { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// 获取或设置外部订单信息。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("external_order")] | ||
[System.Text.Json.Serialization.JsonPropertyName("external_order")] | ||
public Types.ExternalOrder ExternalOrder { get; set; } = new Types.ExternalOrder(); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// 获取或设置 API 版本号。 | ||
/// <para>默认值:202406</para> | ||
/// </summary> | ||
[Newtonsoft.Json.JsonIgnore] | ||
[System.Text.Json.Serialization.JsonIgnore] | ||
public override int ApiVersion { get; set; } = 202406; | ||
|
||
/// <summary> | ||
/// 获取或设置订单列表。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("orders")] | ||
[System.Text.Json.Serialization.JsonPropertyName("orders")] | ||
public IList<Types.Order> OrderList { get; set; } = new List<Types.Order>(); | ||
} | ||
} |
88 changes: 88 additions & 0 deletions
88
...ByteDance.TikTokGlobalShop/Models/Order/ExternalOrder/OrderCreateExternalOrderResponse.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,88 @@ | ||
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models | ||
{ | ||
/// <summary> | ||
/// <para>表示 [POST] /order/{version}/orders/external_orders 接口的响应。</para> | ||
/// </summary> | ||
public class OrderCreateExternalOrderResponse : TikTokShopResponse<OrderCreateExternalOrderResponse.Types.Data> | ||
{ | ||
public static class Types | ||
{ | ||
public class Data | ||
{ | ||
public static class Types | ||
{ | ||
public class Error | ||
{ | ||
public static class Types | ||
{ | ||
public class Detail | ||
{ | ||
public static class Types | ||
{ | ||
public class ExternalOrder | ||
{ | ||
/// <summary> | ||
/// 获取或设置外部订单 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("id")] | ||
public string ExternalOrderId { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置来源平台。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("platform")] | ||
[System.Text.Json.Serialization.JsonPropertyName("platform")] | ||
public string Platform { get; set; } = default!; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// 获取或设置订单 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("order_id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("order_id")] | ||
public string OrderId { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置外部订单信息。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("external_order")] | ||
[System.Text.Json.Serialization.JsonPropertyName("external_order")] | ||
public Types.ExternalOrder ExternalOrder { get; set; } = default!; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// 获取或设置错误码。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("code")] | ||
[System.Text.Json.Serialization.JsonPropertyName("code")] | ||
public int Code { get; set; } | ||
|
||
/// <summary> | ||
/// 获取或设置错误信息。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("message")] | ||
[System.Text.Json.Serialization.JsonPropertyName("message")] | ||
public string Message { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置详细信息。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("detail")] | ||
[System.Text.Json.Serialization.JsonPropertyName("detail")] | ||
public Types.Detail Detail { get; set; } = default!; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// 获取或设置错误列表。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("errors")] | ||
[System.Text.Json.Serialization.JsonPropertyName("errors")] | ||
public Types.Error[]? ErrorList { get; set; } = default!; | ||
} | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...nt.ByteDance.TikTokGlobalShop/Models/Order/ExternalOrder/OrderGetExternalOrdersRequest.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,30 @@ | ||
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models | ||
{ | ||
/// <summary> | ||
/// <para>表示 [GET] /order/{version}/orders/{order_id}/external_orders 接口的请求。</para> | ||
/// </summary> | ||
public class OrderGetExternalOrdersRequest : TikTokShopRequest | ||
{ | ||
/// <summary> | ||
/// 获取或设置 API 版本号。 | ||
/// <para>默认值:202406</para> | ||
/// </summary> | ||
[Newtonsoft.Json.JsonIgnore] | ||
[System.Text.Json.Serialization.JsonIgnore] | ||
public override int ApiVersion { get; set; } = 202406; | ||
|
||
/// <summary> | ||
/// 获取或设置订单 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonIgnore] | ||
[System.Text.Json.Serialization.JsonIgnore] | ||
public string OrderId { get; set; } = string.Empty; | ||
|
||
/// <summary> | ||
/// 获取或设置来源平台。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonIgnore] | ||
[System.Text.Json.Serialization.JsonIgnore] | ||
public string? Platform { get; set; } | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
...t.ByteDance.TikTokGlobalShop/Models/Order/ExternalOrder/OrderGetExternalOrdersResponse.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,68 @@ | ||
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models | ||
{ | ||
/// <summary> | ||
/// <para>表示 [GET] /order/{version}/orders/{order_id}/external_orders 接口的响应。</para> | ||
/// </summary> | ||
public class OrderGetExternalOrdersResponse : TikTokShopResponse<OrderGetExternalOrdersResponse.Types.Data> | ||
{ | ||
public static class Types | ||
{ | ||
public class Data | ||
{ | ||
public static class Types | ||
{ | ||
public class ExternalOrder | ||
{ | ||
public static class Types | ||
{ | ||
public class LineItem | ||
{ | ||
/// <summary> | ||
/// 获取或设置订单行 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("origin_id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("origin_id")] | ||
public string LineItemId { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置外部订单行 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("id")] | ||
public string ExternalLineItemId { get; set; } = default!; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// 获取或设置外部订单 ID。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("id")] | ||
[System.Text.Json.Serialization.JsonPropertyName("id")] | ||
public string ExternalOrderId { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置来源平台。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("platform")] | ||
[System.Text.Json.Serialization.JsonPropertyName("platform")] | ||
public string Platform { get; set; } = default!; | ||
|
||
/// <summary> | ||
/// 获取或设置订单行列表。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("line_items")] | ||
[System.Text.Json.Serialization.JsonPropertyName("line_items")] | ||
public Types.LineItem[] LineItemList { get; set; } = default!; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// 获取或设置外部订单列表。 | ||
/// </summary> | ||
[Newtonsoft.Json.JsonProperty("external_orders")] | ||
[System.Text.Json.Serialization.JsonPropertyName("external_orders")] | ||
public Types.ExternalOrder[] ExternalOrderList { get; set; } = default!; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.