Skip to content

Commit

Permalink
feat(tiktokshop): 新增新版履约相关接口
Browse files Browse the repository at this point in the history
  • Loading branch information
fudiwei committed May 15, 2024
1 parent 522f5fc commit 06afb15
Show file tree
Hide file tree
Showing 74 changed files with 3,095 additions and 6 deletions.
21 changes: 20 additions & 1 deletion docs/TikTokGlobalShop/Basic_ModelDefinition.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,26 @@ Notes: The following catalog is consistent with the catalog structure of [TikTok
- Get Order List: `OrderSearchOrders`
- Get Order Detail: `OrderBatchGetOrderDetail`
- Fulfillment
- _Pending ..._
- Search Package: `FulfillmentSearchPackages`
- Get Package Detail: `FulfillmentGetPackageDetail`
- Get Package Shipping Document: `FulfillmentGetPackageShippingDocuments`
- Get Package Handover Time Slots: `FulfillmentGetPackageHandoverTimeSlots`
- Get Tracking: `FulfillmentGetOrderTracking`
- Update Package Shipping Info: `FulfillmentUpdatePackageShippingInfo`
- Update Package Delivery Status: `FulfillmentBatchUpdatePackagesDeliveryStatus`
- Get Order Split Attributes: `FulfillmentGetOrderSplitAttributes`
- Split Orders: `FulfillmentSplitOrder`
- Search Combinable Packages: `FulfillmentSearchCombinablePackages`
- Combine Package: `FulfillmentCombinePackage`
- Uncombine Packages: `FulfillmentUncombinePackage`
- Mark Package As Shipped: `FulfillmentUpdateOrderPackages`
- Ship Package: `FulfillmentShipPackage`
- Batch Ship Packages: `FulfillmentBatchShipPackages`
- Fulfillment Upload Delivery Image: `FulfillmentUploadImage`
- Fulfillment Upload Delivery File: `FulfillmentUploadFile`
- Get Eligible Shipping Service: `FulfillmentSearchOrderShippingServices`
- Create Packages: `FulfillmentCreatePackage`
- Update Shipping Info: `FulfillmentUpdateOrderShippingInfo`
- Return and Refund
- Search Cancellations: `ReturnRefundSearchCancellations`
- Approve Cancellation: `ReturnRefundApproveCancellation`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public class SKU
/// </summary>
[Newtonsoft.Json.JsonProperty("hand_over_time")]
[System.Text.Json.Serialization.JsonPropertyName("hand_over_time")]
public string HandOverTimeString { get; set; } = string.Empty;
public string HandoverTimeString { get; set; } = string.Empty;
}
}

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models
{
/// <summary>
/// <para>表示 [GET] /fulfillment/{version}/orders/split_attributes 接口的请求。</para>
/// </summary>
public class FulfillmentGetOrderSplitAttributesRequest : TikTokShopRequest
{
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string OrderId { get; set; } = string.Empty;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models
{
/// <summary>
/// <para>表示 [GET] /fulfillment/{version}/orders/split_attributes 接口的响应。</para>
/// </summary>
public class FulfillmentGetOrderSplitAttributesResponse : TikTokShopResponse<FulfillmentGetOrderSplitAttributesResponse.Types.Data>
{
public static class Types
{
public class Data
{
public static class Types
{
public class SplitAttribute
{
/// <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("can_split")]
[System.Text.Json.Serialization.JsonPropertyName("can_split")]
public bool CanSplit { get; set; }

/// <summary>
/// 获取或设置原因。
/// </summary>
[Newtonsoft.Json.JsonProperty("reason")]
[System.Text.Json.Serialization.JsonPropertyName("reason")]
public string? Reason { get; set; }
}
}

/// <summary>
/// 获取或设置拆分属性列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("split_attributes")]
[System.Text.Json.Serialization.JsonPropertyName("split_attributes")]
public Types.SplitAttribute[] SplitAttributeList { get; set; } = default!;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models
{
/// <summary>
/// <para>表示 [GET] /fulfillment/{version}/orders/{order_id}/tracking 接口的请求。</para>
/// </summary>
public class FulfillmentGetOrderTrackingRequest : TikTokShopRequest
{
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string OrderId { get; set; } = string.Empty;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models
{
/// <summary>
/// <para>表示 [GET] /fulfillment/{version}/orders/{order_id}/tracking 接口的响应。</para>
/// </summary>
public class FulfillmentGetOrderTrackingResponse : TikTokShopResponse<FulfillmentGetOrderTrackingResponse.Types.Data>
{
public static class Types
{
public class Data
{
public static class Types
{
public class Tracking
{
/// <summary>
/// 获取或设置描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("description")]
[System.Text.Json.Serialization.JsonPropertyName("description")]
public string Description { get; set; } = default!;

/// <summary>
/// 获取或设置更新时间毫秒级时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("update_time_millis")]
[System.Text.Json.Serialization.JsonPropertyName("update_time_millis")]
public long UpdateTimeMilliseconds { get; set; }
}
}

/// <summary>
/// 获取或设置物流轨迹列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("tracking")]
[System.Text.Json.Serialization.JsonPropertyName("tracking")]
public Types.Tracking[] TrackingList { get; set; } = default!;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using System.Collections.Generic;

namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models
{
/// <summary>
/// <para>表示 [POST] /fulfillment/{version}/orders/{order_id}/shipping_services/query 接口的请求。</para>
/// </summary>
public class FulfillmentSearchOrderShippingServicesRequest : TikTokShopRequest
{
public static class Types
{
public class PackageDimension : FulfillmentCreatePackageRequest.Types.PackageDimension
{
}

public class PackageWeight : FulfillmentCreatePackageRequest.Types.PackageWeight
{
}
}

/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string OrderId { get; set; } = string.Empty;

/// <summary>
/// 获取或设置订单行 ID 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_line_item_ids")]
[System.Text.Json.Serialization.JsonPropertyName("order_line_item_ids")]
public IList<string>? OrderLineItemIdList { get; set; }

/// <summary>
/// 获取或设置包裹尺寸信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("dimension")]
[System.Text.Json.Serialization.JsonPropertyName("dimension")]
public Types.PackageDimension? PackageDimension { get; set; }

/// <summary>
/// 获取或设置包裹重量信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("weight")]
[System.Text.Json.Serialization.JsonPropertyName("weight")]
public Types.PackageWeight? PackageWeight { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models
{
/// <summary>
/// <para>表示 [POST] /fulfillment/{version}/orders/{order_id}/shipping_services/query 接口的响应。</para>
/// </summary>
public class FulfillmentSearchOrderShippingServicesResponse : TikTokShopResponse<FulfillmentSearchOrderShippingServicesResponse.Types.Data>
{
public static class Types
{
public class Data
{
public static class Types
{
public class PackageDimension : FulfillmentGetPackageDetailResponse.Types.Data.Types.PackageDimension
{
}

public class PackageWeight : FulfillmentGetPackageDetailResponse.Types.Data.Types.PackageWeight
{
}

public class ShippingService
{
/// <summary>
/// 获取或设置运输服务 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))]
public string ShippingServiceId { get; set; } = default!;

/// <summary>
/// 获取或设置运输服务名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("name")]
[System.Text.Json.Serialization.JsonPropertyName("name")]
public string Name { get; set; } = default!;

/// <summary>
/// 获取或设置币种。
/// </summary>
[Newtonsoft.Json.JsonProperty("currency")]
[System.Text.Json.Serialization.JsonPropertyName("currency")]
public string Currency { get; set; } = default!;

/// <summary>
/// 获取或设置价格。
/// </summary>
[Newtonsoft.Json.JsonProperty("price")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.TextualNumberConverter))]
[System.Text.Json.Serialization.JsonPropertyName("price")]
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
public decimal Price { get; set; }

/// <summary>
/// 获取或设置最小运输天数。
/// </summary>
[Newtonsoft.Json.JsonProperty("earliest_delivery_days")]
[System.Text.Json.Serialization.JsonPropertyName("earliest_delivery_days")]
public int EarliestDeliveryDays { get; set; }

/// <summary>
/// 获取或设置最大运输天数。
/// </summary>
[Newtonsoft.Json.JsonProperty("latest_delivery_days")]
[System.Text.Json.Serialization.JsonPropertyName("latest_delivery_days")]
public int LatestDeliveryDays { get; set; }

/// <summary>
/// 获取或设置是否为默认服务。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_default")]
[System.Text.Json.Serialization.JsonPropertyName("is_default")]
public bool IsDefault { get; set; }

/// <summary>
/// 获取或设置运输服务商 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("shipping_provider_id")]
[System.Text.Json.Serialization.JsonPropertyName("shipping_provider_id")]
public string? ShippingProviderId { get; set; }

/// <summary>
/// 获取或设置运输服务商名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("shipping_provider_name")]
[System.Text.Json.Serialization.JsonPropertyName("shipping_provider_name")]
public string? ShippingProviderName { get; set; }
}
}

/// <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("order_line_id")]
[System.Text.Json.Serialization.JsonPropertyName("order_line_id")]
public string[]? OrderLineItemIdList { get; set; }

/// <summary>
/// 获取或设置包裹尺寸信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("dimension")]
[System.Text.Json.Serialization.JsonPropertyName("dimension")]
public Types.PackageDimension? PackageDimension { get; set; }

/// <summary>
/// 获取或设置包裹重量信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("weight")]
[System.Text.Json.Serialization.JsonPropertyName("weight")]
public Types.PackageWeight? PackageWeight { get; set; }

/// <summary>
/// 获取或设置运输服务列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("shipping_services")]
[System.Text.Json.Serialization.JsonPropertyName("shipping_services")]
public Types.ShippingService[] ShippingServiceList { get; set; } = default!;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
using System.Collections.Generic;

namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop.Models
{
/// <summary>
/// <para>表示 [POST] /fulfillment/{version}/orders/{order_id}/split 接口的请求。</para>
/// </summary>
public class FulfillmentSplitOrderRequest : TikTokShopRequest
{
public static class Types
{
public class SplittableGroup
{
/// <summary>
/// 获取或设置分组 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public string SplittableGroupId { get; set; } = string.Empty;

/// <summary>
/// 获取或设置订单行 ID 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_line_item_ids")]
[System.Text.Json.Serialization.JsonPropertyName("order_line_item_ids")]
public IList<string> OrderLineItemIdList { get; set; } = new List<string>();
}
}

/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string OrderId { get; set; } = string.Empty;

/// <summary>
/// 获取或设置分组列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("splittable_groups")]
[System.Text.Json.Serialization.JsonPropertyName("splittable_groups")]
public IList<Types.SplittableGroup> SplittableGroupList { get; set; } = new List<Types.SplittableGroup>();
}
}
Loading

0 comments on commit 06afb15

Please sign in to comment.