Skip to content

Commit ccdc348

Browse files
committed
feat(tiktokshop): 随官方更新订单相关接口模型
1 parent 456a0da commit ccdc348

3 files changed

Lines changed: 151 additions & 4 deletions

File tree

src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Models/Order/OrderSearchOrdersResponse.cs

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,30 @@ public class Payment
154154
[System.Text.Json.Serialization.JsonPropertyName("buyer_service_fee")]
155155
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
156156
public decimal BuyerServiceFee { get; set; }
157+
158+
/// <summary>
159+
/// 获取或设置额外处理费。
160+
/// </summary>
161+
[Newtonsoft.Json.JsonProperty("handling_fee")]
162+
[System.Text.Json.Serialization.JsonPropertyName("handling_fee")]
163+
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
164+
public decimal? HandlingFee { get; set; }
165+
166+
/// <summary>
167+
/// 获取或设置运输保险费。
168+
/// </summary>
169+
[Newtonsoft.Json.JsonProperty("shipping_insurance_fee")]
170+
[System.Text.Json.Serialization.JsonPropertyName("shipping_insurance_fee")]
171+
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
172+
public decimal? ShippingInsuranceFee { get; set; }
173+
174+
/// <summary>
175+
/// 获取或设置货物保险费。
176+
/// </summary>
177+
[Newtonsoft.Json.JsonProperty("item_insurance_fee")]
178+
[System.Text.Json.Serialization.JsonPropertyName("item_insurance_fee")]
179+
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
180+
public decimal? ItemInsuranceFee { get; set; }
157181
}
158182

159183
public class RecipientAddress
@@ -223,6 +247,20 @@ public class DeliveryPreferences
223247
[System.Text.Json.Serialization.JsonPropertyName("name")]
224248
public string ContactName { get; set; } = default!;
225249

250+
/// <summary>
251+
/// 获取或设置联系人名。
252+
/// </summary>
253+
[Newtonsoft.Json.JsonProperty("first_name")]
254+
[System.Text.Json.Serialization.JsonPropertyName("first_name")]
255+
public string? ContactFirstName { get; set; }
256+
257+
/// <summary>
258+
/// 获取或设置联系人姓。
259+
/// </summary>
260+
[Newtonsoft.Json.JsonProperty("last_name")]
261+
[System.Text.Json.Serialization.JsonPropertyName("last_name")]
262+
public string? ContactLastName { get; set; }
263+
226264
/// <summary>
227265
/// 获取或设置邮编。
228266
/// </summary>
@@ -453,6 +491,15 @@ public class ItemTax
453491
[System.Text.Json.Serialization.JsonPropertyName("cancel_reason")]
454492
public string? CancelReason { get; set; }
455493

494+
/// <summary>
495+
/// 获取或设置卖家处理周期天数。
496+
/// </summary>
497+
[Newtonsoft.Json.JsonProperty("handling_duration_days")]
498+
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))]
499+
[System.Text.Json.Serialization.JsonPropertyName("handling_duration_days")]
500+
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
501+
public int? HandlingDurationDays { get; set; }
502+
456503
/// <summary>
457504
/// 获取或设置准备发货时间戳。
458505
/// </summary>
@@ -527,6 +574,25 @@ public class CombinedListingSKU : LineItem
527574
[System.Text.Json.Serialization.JsonPropertyName("sku_count")]
528575
public int SKUCount { get; set; }
529576
}
577+
578+
public class HandlingDuration
579+
{
580+
/// <summary>
581+
/// 获取或设置类型。
582+
/// </summary>
583+
[Newtonsoft.Json.JsonProperty("type")]
584+
[System.Text.Json.Serialization.JsonPropertyName("type")]
585+
public string Type { get; set; } = default!;
586+
587+
/// <summary>
588+
/// 获取或设置天数。
589+
/// </summary>
590+
[Newtonsoft.Json.JsonProperty("days")]
591+
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))]
592+
[System.Text.Json.Serialization.JsonPropertyName("days")]
593+
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
594+
public int? Days { get; set; }
595+
}
530596
}
531597

532598
/// <summary>
@@ -537,6 +603,20 @@ public class CombinedListingSKU : LineItem
537603
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))]
538604
public string OrderId { get; set; } = default!;
539605

606+
/// <summary>
607+
/// 获取或设置电商平台。
608+
/// </summary>
609+
[Newtonsoft.Json.JsonProperty("commerce_platform")]
610+
[System.Text.Json.Serialization.JsonPropertyName("commerce_platform")]
611+
public string? CommercePlatform { get; set; }
612+
613+
/// <summary>
614+
/// 获取或设置订单类型。
615+
/// </summary>
616+
[Newtonsoft.Json.JsonProperty("order_type")]
617+
[System.Text.Json.Serialization.JsonPropertyName("order_type")]
618+
public string OrderType { get; set; } = default!;
619+
540620
/// <summary>
541621
/// 获取或设置订单状态。
542622
/// </summary>
@@ -712,6 +792,34 @@ public class CombinedListingSKU : LineItem
712792
[System.Text.Json.Serialization.JsonPropertyName("collection_time")]
713793
public long? CollectionTimestamp { get; set; }
714794

795+
/// <summary>
796+
/// 获取或设置揽货截止时间戳。
797+
/// </summary>
798+
[Newtonsoft.Json.JsonProperty("pick_up_cut_off_time")]
799+
[System.Text.Json.Serialization.JsonPropertyName("pick_up_cut_off_time")]
800+
public long? PickupCutOffTimestamp { get; set; }
801+
802+
/// <summary>
803+
/// 获取或设置最晚揽货 SLA 时间戳。
804+
/// </summary>
805+
[Newtonsoft.Json.JsonProperty("fast_dispatch_sla_time")]
806+
[System.Text.Json.Serialization.JsonPropertyName("fast_dispatch_sla_time")]
807+
public long? FastDispatchSLATimestamp { get; set; }
808+
809+
/// <summary>
810+
/// 获取或设置卖家处理周期信息。
811+
/// </summary>
812+
[Newtonsoft.Json.JsonProperty("handling_duration")]
813+
[System.Text.Json.Serialization.JsonPropertyName("handling_duration")]
814+
public Types.HandlingDuration? HandlingDuration { get; set; }
815+
816+
/// <summary>
817+
/// 获取或设置卖家处理开始时间戳。
818+
/// </summary>
819+
[Newtonsoft.Json.JsonProperty("release_date")]
820+
[System.Text.Json.Serialization.JsonPropertyName("release_date")]
821+
public long? ReleaseDataTimestamp { get; set; }
822+
715823
/// <summary>
716824
/// 获取或设置物流单号。
717825
/// </summary>

test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderBatchGetOrderDetailResponse.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"cancellation_initiator": "SELLER",
1212
"collection_due_time": 1678389618,
1313
"collection_time": 1678389618,
14+
"commerce_platform": "TIKTOK_SHOP",
1415
"cpf": "3213-31231412",
1516
"create_time": 1619611561,
1617
"delivery_due_time": 1678389618,
@@ -20,7 +21,12 @@
2021
"delivery_sla_time": 1678389618,
2122
"delivery_time": 1678389618,
2223
"delivery_type": "HOME_DELIVERY",
24+
"fast_dispatch_sla_time": 1678389618,
2325
"fulfillment_type": "FULFILLMENT_BY_SELLER",
26+
"handling_duration": {
27+
"days": "7",
28+
"type": "BUSINESS_DAY"
29+
},
2430
"has_updated_recipient_address": false,
2531
"id": "576461413038785752",
2632
"is_buyer_request_cancel": false,
@@ -36,12 +42,14 @@
3642
"combined_listing_skus": [
3743
{
3844
"product_id": "1729582718312380456",
45+
"seller_sku": "yellow-24-XL ",
3946
"sku_count": 1,
4047
"sku_id": "2729382476852921123"
4148
}
4249
],
4350
"currency": "IDR",
4451
"display_status": "TO_SHIP",
52+
"handling_duration_days": "7",
4553
"id": "577086512123755123",
4654
"is_gift": false,
4755
"item_tax": [
@@ -73,6 +81,7 @@
7381
}
7482
],
7583
"need_upload_invoice": "NEED_INVOICE",
84+
"order_type": "ZERO_LOTTERY",
7685
"packages": [
7786
{
7887
"id": "1152321127278713123"
@@ -82,6 +91,8 @@
8291
"payment": {
8392
"buyer_service_fee": "1000",
8493
"currency": "IDR",
94+
"handling_fee": "1000",
95+
"item_insurance_fee": "1000",
8596
"original_shipping_fee": "5000",
8697
"original_total_product_price": "5000",
8798
"platform_discount": "5000",
@@ -92,12 +103,14 @@
92103
"shipping_fee_platform_discount": "5000",
93104
"shipping_fee_seller_discount": "5000",
94105
"shipping_fee_tax": "11",
106+
"shipping_insurance_fee": "1000",
95107
"small_order_fee": "3000",
96108
"sub_total": "5000",
97109
"tax": "5000",
98110
"total_amount": "5000"
99111
},
100112
"payment_method_name": "CCDC",
113+
"pick_up_cut_off_time": 1678389618,
101114
"recipient_address": {
102115
"address_detail": "Unit one building 8",
103116
"address_line1": "TikTok 5800 bristol Pkwy",
@@ -114,12 +127,15 @@
114127
"address_name": "United Kingdom"
115128
}
116129
],
130+
"first_name": "David",
117131
"full_address": "1199 Coleman Ave San Jose, CA 95110",
118-
"name": "Zay",
132+
"last_name": "Kong",
133+
"name": "David Kong",
119134
"phone_number": "(+1)213-***-1234",
120135
"postal_code": "95110",
121136
"region_code": "US"
122137
},
138+
"release_date": 1619611762,
123139
"replaced_order_id": "576461416728782174",
124140
"request_cancel_time": 1678389618,
125141
"rts_sla_time": 1619611688,

test/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.UnitTests/ModelSamples/_/Order/OrderSearchOrdersResponse.json

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"cancellation_initiator": "SELLER",
1313
"collection_due_time": 1678389618,
1414
"collection_time": 1678389618,
15+
"commerce_platform": "TIKTOK_SHOP",
1516
"cpf": "3213-31231412",
1617
"create_time": 1619611561,
1718
"delivery_due_time": 1678389618,
@@ -21,7 +22,12 @@
2122
"delivery_sla_time": 1678389618,
2223
"delivery_time": 1678389618,
2324
"delivery_type": "HOME_DELIVERY",
25+
"fast_dispatch_sla_time": 1678389618,
2426
"fulfillment_type": "FULFILLMENT_BY_SELLER",
27+
"handling_duration": {
28+
"days": "7",
29+
"type": "BUSINESS_DAY"
30+
},
2531
"has_updated_recipient_address": false,
2632
"id": "576461413038785752",
2733
"is_buyer_request_cancel": false,
@@ -34,8 +40,17 @@
3440
"buyer_service_fee": "1000",
3541
"cancel_reason": "Discount not as expected",
3642
"cancel_user": "BUYER",
43+
"combined_listing_skus": [
44+
{
45+
"product_id": "1729582718312380456",
46+
"seller_sku": "yellow-24-XL ",
47+
"sku_count": 1,
48+
"sku_id": "2729382476852921123"
49+
}
50+
],
3751
"currency": "IDR",
38-
"display_status": "TO_SHIP",
52+
"display_status": "UNPAID",
53+
"handling_duration_days": "7",
3954
"id": "577086512123755123",
4055
"is_gift": false,
4156
"item_tax": [
@@ -66,7 +81,8 @@
6681
"tracking_number": "JX12345"
6782
}
6883
],
69-
"need_upload_invoice": "NEED_INVOICE",
84+
"need_upload_invoice": "NEED_INVOICE\n",
85+
"order_type": "ZERO_LOTTERY",
7086
"packages": [
7187
{
7288
"id": "1152321127278713123"
@@ -76,6 +92,8 @@
7692
"payment": {
7793
"buyer_service_fee": "1000",
7894
"currency": "IDR",
95+
"handling_fee": "1000",
96+
"item_insurance_fee": "1000",
7997
"original_shipping_fee": "5000",
8098
"original_total_product_price": "5000",
8199
"platform_discount": "5000",
@@ -86,12 +104,14 @@
86104
"shipping_fee_platform_discount": "5000",
87105
"shipping_fee_seller_discount": "5000",
88106
"shipping_fee_tax": "11",
107+
"shipping_insurance_fee": "1000",
89108
"small_order_fee": "3000",
90109
"sub_total": "5000",
91110
"tax": "5000",
92111
"total_amount": "5000"
93112
},
94113
"payment_method_name": "CCDC",
114+
"pick_up_cut_off_time": 1678389618,
95115
"recipient_address": {
96116
"address_detail": "Unit one building 8",
97117
"address_line1": "TikTok 5800 bristol Pkwy",
@@ -108,12 +128,15 @@
108128
"address_name": "United Kingdom"
109129
}
110130
],
131+
"first_name": "David",
111132
"full_address": "1199 Coleman Ave San Jose, CA 95110",
112-
"name": "Zay",
133+
"last_name": "Kong",
134+
"name": "David Kong",
113135
"phone_number": "(+1)213-***-1234",
114136
"postal_code": "95110",
115137
"region_code": "US"
116138
},
139+
"release_date": 1619611762,
117140
"replaced_order_id": "576461416728782174",
118141
"request_cancel_time": 1678389618,
119142
"rts_sla_time": 1619611688,

0 commit comments

Comments
 (0)