Skip to content

Commit

Permalink
feat(tiktokshop): 随官方更新订单相关接口模型
Browse files Browse the repository at this point in the history
  • Loading branch information
fudiwei committed Nov 11, 2024
1 parent 456a0da commit ccdc348
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,30 @@ public class Payment
[System.Text.Json.Serialization.JsonPropertyName("buyer_service_fee")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
public decimal BuyerServiceFee { get; set; }

/// <summary>
/// 获取或设置额外处理费。
/// </summary>
[Newtonsoft.Json.JsonProperty("handling_fee")]
[System.Text.Json.Serialization.JsonPropertyName("handling_fee")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
public decimal? HandlingFee { get; set; }

/// <summary>
/// 获取或设置运输保险费。
/// </summary>
[Newtonsoft.Json.JsonProperty("shipping_insurance_fee")]
[System.Text.Json.Serialization.JsonPropertyName("shipping_insurance_fee")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
public decimal? ShippingInsuranceFee { get; set; }

/// <summary>
/// 获取或设置货物保险费。
/// </summary>
[Newtonsoft.Json.JsonProperty("item_insurance_fee")]
[System.Text.Json.Serialization.JsonPropertyName("item_insurance_fee")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
public decimal? ItemInsuranceFee { get; set; }
}

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

/// <summary>
/// 获取或设置联系人名。
/// </summary>
[Newtonsoft.Json.JsonProperty("first_name")]
[System.Text.Json.Serialization.JsonPropertyName("first_name")]
public string? ContactFirstName { get; set; }

/// <summary>
/// 获取或设置联系人姓。
/// </summary>
[Newtonsoft.Json.JsonProperty("last_name")]
[System.Text.Json.Serialization.JsonPropertyName("last_name")]
public string? ContactLastName { get; set; }

/// <summary>
/// 获取或设置邮编。
/// </summary>
Expand Down Expand Up @@ -453,6 +491,15 @@ public class ItemTax
[System.Text.Json.Serialization.JsonPropertyName("cancel_reason")]
public string? CancelReason { get; set; }

/// <summary>
/// 获取或设置卖家处理周期天数。
/// </summary>
[Newtonsoft.Json.JsonProperty("handling_duration_days")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))]
[System.Text.Json.Serialization.JsonPropertyName("handling_duration_days")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
public int? HandlingDurationDays { get; set; }

/// <summary>
/// 获取或设置准备发货时间戳。
/// </summary>
Expand Down Expand Up @@ -527,6 +574,25 @@ public class CombinedListingSKU : LineItem
[System.Text.Json.Serialization.JsonPropertyName("sku_count")]
public int SKUCount { get; set; }
}

public class HandlingDuration
{
/// <summary>
/// 获取或设置类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("type")]
[System.Text.Json.Serialization.JsonPropertyName("type")]
public string Type { get; set; } = default!;

/// <summary>
/// 获取或设置天数。
/// </summary>
[Newtonsoft.Json.JsonProperty("days")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberReadOnlyConverter))]
[System.Text.Json.Serialization.JsonPropertyName("days")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberReadOnlyConverter))]
public int? Days { get; set; }
}
}

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

/// <summary>
/// 获取或设置电商平台。
/// </summary>
[Newtonsoft.Json.JsonProperty("commerce_platform")]
[System.Text.Json.Serialization.JsonPropertyName("commerce_platform")]
public string? CommercePlatform { get; set; }

/// <summary>
/// 获取或设置订单类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_type")]
[System.Text.Json.Serialization.JsonPropertyName("order_type")]
public string OrderType { get; set; } = default!;

/// <summary>
/// 获取或设置订单状态。
/// </summary>
Expand Down Expand Up @@ -712,6 +792,34 @@ public class CombinedListingSKU : LineItem
[System.Text.Json.Serialization.JsonPropertyName("collection_time")]
public long? CollectionTimestamp { get; set; }

/// <summary>
/// 获取或设置揽货截止时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("pick_up_cut_off_time")]
[System.Text.Json.Serialization.JsonPropertyName("pick_up_cut_off_time")]
public long? PickupCutOffTimestamp { get; set; }

/// <summary>
/// 获取或设置最晚揽货 SLA 时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("fast_dispatch_sla_time")]
[System.Text.Json.Serialization.JsonPropertyName("fast_dispatch_sla_time")]
public long? FastDispatchSLATimestamp { get; set; }

/// <summary>
/// 获取或设置卖家处理周期信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("handling_duration")]
[System.Text.Json.Serialization.JsonPropertyName("handling_duration")]
public Types.HandlingDuration? HandlingDuration { get; set; }

/// <summary>
/// 获取或设置卖家处理开始时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("release_date")]
[System.Text.Json.Serialization.JsonPropertyName("release_date")]
public long? ReleaseDataTimestamp { get; set; }

/// <summary>
/// 获取或设置物流单号。
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"cancellation_initiator": "SELLER",
"collection_due_time": 1678389618,
"collection_time": 1678389618,
"commerce_platform": "TIKTOK_SHOP",
"cpf": "3213-31231412",
"create_time": 1619611561,
"delivery_due_time": 1678389618,
Expand All @@ -20,7 +21,12 @@
"delivery_sla_time": 1678389618,
"delivery_time": 1678389618,
"delivery_type": "HOME_DELIVERY",
"fast_dispatch_sla_time": 1678389618,
"fulfillment_type": "FULFILLMENT_BY_SELLER",
"handling_duration": {
"days": "7",
"type": "BUSINESS_DAY"
},
"has_updated_recipient_address": false,
"id": "576461413038785752",
"is_buyer_request_cancel": false,
Expand All @@ -36,12 +42,14 @@
"combined_listing_skus": [
{
"product_id": "1729582718312380456",
"seller_sku": "yellow-24-XL ",
"sku_count": 1,
"sku_id": "2729382476852921123"
}
],
"currency": "IDR",
"display_status": "TO_SHIP",
"handling_duration_days": "7",
"id": "577086512123755123",
"is_gift": false,
"item_tax": [
Expand Down Expand Up @@ -73,6 +81,7 @@
}
],
"need_upload_invoice": "NEED_INVOICE",
"order_type": "ZERO_LOTTERY",
"packages": [
{
"id": "1152321127278713123"
Expand All @@ -82,6 +91,8 @@
"payment": {
"buyer_service_fee": "1000",
"currency": "IDR",
"handling_fee": "1000",
"item_insurance_fee": "1000",
"original_shipping_fee": "5000",
"original_total_product_price": "5000",
"platform_discount": "5000",
Expand All @@ -92,12 +103,14 @@
"shipping_fee_platform_discount": "5000",
"shipping_fee_seller_discount": "5000",
"shipping_fee_tax": "11",
"shipping_insurance_fee": "1000",
"small_order_fee": "3000",
"sub_total": "5000",
"tax": "5000",
"total_amount": "5000"
},
"payment_method_name": "CCDC",
"pick_up_cut_off_time": 1678389618,
"recipient_address": {
"address_detail": "Unit one building 8",
"address_line1": "TikTok 5800 bristol Pkwy",
Expand All @@ -114,12 +127,15 @@
"address_name": "United Kingdom"
}
],
"first_name": "David",
"full_address": "1199 Coleman Ave San Jose, CA 95110",
"name": "Zay",
"last_name": "Kong",
"name": "David Kong",
"phone_number": "(+1)213-***-1234",
"postal_code": "95110",
"region_code": "US"
},
"release_date": 1619611762,
"replaced_order_id": "576461416728782174",
"request_cancel_time": 1678389618,
"rts_sla_time": 1619611688,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"cancellation_initiator": "SELLER",
"collection_due_time": 1678389618,
"collection_time": 1678389618,
"commerce_platform": "TIKTOK_SHOP",
"cpf": "3213-31231412",
"create_time": 1619611561,
"delivery_due_time": 1678389618,
Expand All @@ -21,7 +22,12 @@
"delivery_sla_time": 1678389618,
"delivery_time": 1678389618,
"delivery_type": "HOME_DELIVERY",
"fast_dispatch_sla_time": 1678389618,
"fulfillment_type": "FULFILLMENT_BY_SELLER",
"handling_duration": {
"days": "7",
"type": "BUSINESS_DAY"
},
"has_updated_recipient_address": false,
"id": "576461413038785752",
"is_buyer_request_cancel": false,
Expand All @@ -34,8 +40,17 @@
"buyer_service_fee": "1000",
"cancel_reason": "Discount not as expected",
"cancel_user": "BUYER",
"combined_listing_skus": [
{
"product_id": "1729582718312380456",
"seller_sku": "yellow-24-XL ",
"sku_count": 1,
"sku_id": "2729382476852921123"
}
],
"currency": "IDR",
"display_status": "TO_SHIP",
"display_status": "UNPAID",
"handling_duration_days": "7",
"id": "577086512123755123",
"is_gift": false,
"item_tax": [
Expand Down Expand Up @@ -66,7 +81,8 @@
"tracking_number": "JX12345"
}
],
"need_upload_invoice": "NEED_INVOICE",
"need_upload_invoice": "NEED_INVOICE\n",
"order_type": "ZERO_LOTTERY",
"packages": [
{
"id": "1152321127278713123"
Expand All @@ -76,6 +92,8 @@
"payment": {
"buyer_service_fee": "1000",
"currency": "IDR",
"handling_fee": "1000",
"item_insurance_fee": "1000",
"original_shipping_fee": "5000",
"original_total_product_price": "5000",
"platform_discount": "5000",
Expand All @@ -86,12 +104,14 @@
"shipping_fee_platform_discount": "5000",
"shipping_fee_seller_discount": "5000",
"shipping_fee_tax": "11",
"shipping_insurance_fee": "1000",
"small_order_fee": "3000",
"sub_total": "5000",
"tax": "5000",
"total_amount": "5000"
},
"payment_method_name": "CCDC",
"pick_up_cut_off_time": 1678389618,
"recipient_address": {
"address_detail": "Unit one building 8",
"address_line1": "TikTok 5800 bristol Pkwy",
Expand All @@ -108,12 +128,15 @@
"address_name": "United Kingdom"
}
],
"first_name": "David",
"full_address": "1199 Coleman Ave San Jose, CA 95110",
"name": "Zay",
"last_name": "Kong",
"name": "David Kong",
"phone_number": "(+1)213-***-1234",
"postal_code": "95110",
"region_code": "US"
},
"release_date": 1619611762,
"replaced_order_id": "576461416728782174",
"request_cancel_time": 1678389618,
"rts_sla_time": 1619611688,
Expand Down

0 comments on commit ccdc348

Please sign in to comment.